@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #0b0c10;
  --panel: #141722;
  --text: #f1f5ff;
  --muted: #9aa4b2;
  --accent: #35f0c2;
  --accent-2: #5c8cff;
  --danger: #ff5c5c;
  --border: #262b3a;
  --glow: 0 0 30px rgba(53, 240, 194, 0.2);
  --main-galaxy-sat: 1.08;
  --main-galaxy-bright: 0.96;
  --main-galaxy-opacity: 0.28;
  --main-galaxy-drift-sec: 96s;
  --main-galaxy-canvas-opacity: 0.92;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(92, 140, 255, 0.02), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(53, 240, 194, 0.015), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(120, 80, 255, 0.015), transparent 45%),
    linear-gradient(160deg, #000003, #010207 55%, #000002);
  color: var(--text);
}

#boot_loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.12s linear;
}

#boot_loader.hidden {
  display: none;
}

#boot_loader.exiting {
  opacity: 0;
}

#boot_exit_sweep {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
}

#boot_exit_sweep::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -22%;
  width: 20%;
  height: 120%;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(146, 242, 255, 0.2) 35%,
      rgba(255, 168, 96, 0.42) 50%,
      rgba(146, 242, 255, 0.2) 65%,
      rgba(255, 255, 255, 0) 100%
    );
  filter: blur(2px);
  transform: skewX(-14deg);
}

#boot_exit_sweep.active {
  opacity: 1;
  animation: boot-scan-fade 460ms ease-out forwards;
}

#boot_exit_sweep.active::before {
  animation: boot-scan-pass 460ms cubic-bezier(0.22, 0.9, 0.2, 1) forwards;
}

@keyframes boot-scan-pass {
  from { transform: translateX(0) skewX(-14deg); }
  to { transform: translateX(660%) skewX(-14deg); }
}

@keyframes boot-scan-fade {
  0% { opacity: 0.9; }
  75% { opacity: 0.6; }
  100% { opacity: 0; }
}

#boot_three_wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#boot_three_canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.88;
}

#boot_glitch {
  position: relative;
  z-index: 3;
  display: inline-flex;
  gap: 2px;
  align-items: center;
  justify-content: center;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(42px, 9vw, 120px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#boot_textline {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#boot_glitch .char {
  color: #ff9a4a;
  text-shadow:
    0 0 8px rgba(255, 154, 74, 0.62),
    0 0 16px rgba(90, 240, 210, 0.34);
}

#boot_glitch .char.resolved {
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.4),
    0 0 18px rgba(90, 240, 210, 0.25),
    0 0 24px rgba(255, 140, 70, 0.24);
}

#boot_cursor {
  position: relative;
  z-index: 3;
  width: 14px;
  height: clamp(34px, 8vw, 94px);
  border-radius: 2px;
  background: linear-gradient(180deg, #7fffe4, #ff914d);
  box-shadow: 0 0 14px rgba(255, 145, 77, 0.58), 0 0 10px rgba(127, 255, 228, 0.42);
  animation: boot-blink 0.6s step-end infinite;
}

#boot_subtext {
  position: absolute;
  bottom: 20%;
  z-index: 3;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  opacity: 0;
  transition: opacity 0.35s ease;
}

#boot_subtext.visible {
  opacity: 1;
}

.boot-logo-fly {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.65));
  transition:
    left 0.46s cubic-bezier(0.17, 0.84, 0.23, 1),
    top 0.46s cubic-bezier(0.17, 0.84, 0.23, 1),
    width 0.46s cubic-bezier(0.17, 0.84, 0.23, 1),
    height 0.46s cubic-bezier(0.17, 0.84, 0.23, 1),
    opacity 0.46s ease,
    filter 0.46s ease;
}

#boot_scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.0) 0px,
    rgba(0, 0, 0, 0.0) 2px,
    rgba(0, 0, 0, 0.34) 2px,
    rgba(0, 0, 0, 0.34) 4px
  );
  opacity: 0;
  animation: boot-scan-in 0.45s ease forwards;
}

#boot_loader.exiting #boot_scanlines {
  opacity: 0;
  transition: opacity 0.35s ease;
}

@keyframes boot-scan-in {
  from { opacity: 0; }
  to { opacity: 0.68; }
}

@keyframes boot-blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 2% 5%, rgba(255,255,255,0.45) 0, transparent 100%),
    radial-gradient(1px 1px at 5% 35%, rgba(255,255,255,0.35) 0, transparent 100%),
    radial-gradient(1px 1px at 8% 70%, rgba(255,255,255,0.35) 0, transparent 100%),
    radial-gradient(1px 1px at 12% 15%, rgba(255,255,255,0.4) 0, transparent 100%),
    radial-gradient(1px 1px at 16% 55%, rgba(255,255,255,0.32) 0, transparent 100%),
    radial-gradient(1px 1px at 20% 85%, rgba(255,255,255,0.35) 0, transparent 100%),
    radial-gradient(1px 1px at 24% 25%, rgba(255,255,255,0.38) 0, transparent 100%),
    radial-gradient(1px 1px at 28% 65%, rgba(255,255,255,0.32) 0, transparent 100%),
    radial-gradient(1px 1px at 32% 5%, rgba(255,255,255,0.4) 0, transparent 100%),
    radial-gradient(1px 1px at 36% 45%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 40% 75%, rgba(255,255,255,0.34) 0, transparent 100%),
    radial-gradient(1px 1px at 44% 20%, rgba(255,255,255,0.4) 0, transparent 100%),
    radial-gradient(1px 1px at 48% 55%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 52% 85%, rgba(255,255,255,0.34) 0, transparent 100%),
    radial-gradient(1px 1px at 56% 30%, rgba(255,255,255,0.36) 0, transparent 100%),
    radial-gradient(1px 1px at 60% 10%, rgba(255,255,255,0.42) 0, transparent 100%),
    radial-gradient(1px 1px at 64% 45%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 68% 70%, rgba(255,255,255,0.34) 0, transparent 100%),
    radial-gradient(1px 1px at 72% 25%, rgba(255,255,255,0.38) 0, transparent 100%),
    radial-gradient(1px 1px at 76% 55%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 80% 5%, rgba(255,255,255,0.42) 0, transparent 100%),
    radial-gradient(1px 1px at 84% 40%, rgba(255,255,255,0.32) 0, transparent 100%),
    radial-gradient(1px 1px at 88% 75%, rgba(255,255,255,0.34) 0, transparent 100%),
    radial-gradient(1px 1px at 92% 20%, rgba(255,255,255,0.38) 0, transparent 100%),
    radial-gradient(1px 1px at 96% 60%, rgba(255,255,255,0.32) 0, transparent 100%),
    radial-gradient(1px 1px at 98% 90%, rgba(255,255,255,0.36) 0, transparent 100%),
    radial-gradient(2px 2px at 14% 32%, rgba(255,255,255,0.35) 0, transparent 100%),
    radial-gradient(2px 2px at 58% 62%, rgba(255,255,255,0.35) 0, transparent 100%),
    radial-gradient(2px 2px at 78% 18%, rgba(255,255,255,0.35) 0, transparent 100%),
    radial-gradient(1px 1px at 6% 55%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 11% 90%, rgba(255,255,255,0.25) 0, transparent 100%),
    radial-gradient(1px 1px at 19% 42%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 27% 88%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 33% 38%, rgba(255,255,255,0.28) 0, transparent 100%),
    radial-gradient(1px 1px at 41% 92%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 49% 12%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 57% 46%, rgba(255,255,255,0.28) 0, transparent 100%),
    radial-gradient(1px 1px at 63% 86%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 69% 22%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 74% 48%, rgba(255,255,255,0.28) 0, transparent 100%),
    radial-gradient(1px 1px at 81% 92%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 87% 10%, rgba(255,255,255,0.28) 0, transparent 100%),
    radial-gradient(1px 1px at 93% 52%, rgba(255,255,255,0.3) 0, transparent 100%),
    radial-gradient(1px 1px at 97% 72%, rgba(255,255,255,0.28) 0, transparent 100%);
  opacity: 0.56;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(ellipse 60% 12% at 50% 45%, rgba(255, 245, 220, 0.18), rgba(255, 245, 220, 0.0) 70%),
    radial-gradient(ellipse 70% 16% at 50% 45%, rgba(120, 160, 255, 0.12), rgba(120, 160, 255, 0.0) 72%),
    radial-gradient(ellipse 80% 18% at 50% 45%, rgba(255, 140, 220, 0.08), rgba(255, 140, 220, 0.0) 75%),
    radial-gradient(circle at 20% 30%, rgba(120, 80, 255, 0.08), transparent 45%),
    radial-gradient(circle at 70% 20%, rgba(53, 240, 194, 0.06), transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(255, 120, 220, 0.06), transparent 45%),
    radial-gradient(circle at 40% 60%, rgba(92, 140, 255, 0.08), transparent 50%);
  filter: blur(70px);
  opacity: 0.26;
  pointer-events: none;
  animation: nebula-drift 80s ease-in-out infinite;
}

@keyframes nebula-drift {
  0% { transform: translate3d(-2%, -1%, 0) rotate(0.5deg); }
  50% { transform: translate3d(2%, 1%, 0) rotate(-0.5deg); }
  100% { transform: translate3d(-2%, -1%, 0) rotate(0.5deg); }
}

.shooting-stars,
#starfield-1,
#starfield-2,
#starfield-3,
#main-galaxies-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

#starfield-1,
#starfield-2,
#starfield-3,
#main-galaxies-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#main-galaxies-canvas {
  opacity: 0;
  mix-blend-mode: screen;
  filter: saturate(1.08) brightness(0.98);
  transition: opacity 720ms ease;
}

body.main-space #main-galaxies-canvas {
  opacity: var(--main-galaxy-canvas-opacity);
}

#cursor-sun {
  position: fixed;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 16%, rgba(255, 255, 255, 0.74) 26%, rgba(255, 255, 255, 0.34) 44%, rgba(255, 255, 255, 0.18) 58%, rgba(255, 255, 255, 0.09) 68%, rgba(255, 255, 255, 0) 80%);
  filter: blur(2.2px) saturate(1.02);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  animation: blackhole-core-pulse 3s ease-in-out infinite;
}

#cursor-sun::before,
#cursor-sun::after {
  content: "";
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  pointer-events: none;
}

#cursor-sun::before {
  display: none;
}

#cursor-sun::after {
  inset: -38%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.16) 38%, rgba(255, 255, 255, 0) 74%);
  filter: blur(8px);
  animation: blackhole-halo-breathe 3.4s ease-in-out infinite;
}

#cursor-click-burst {
  position: fixed;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 3;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  background:
    radial-gradient(circle, rgba(208, 238, 255, 0.95) 0, rgba(112, 198, 255, 0.58) 40%, rgba(54, 142, 212, 0) 74%);
  box-shadow:
    0 0 18px rgba(96, 192, 255, 0.76),
    0 0 40px rgba(136, 218, 255, 0.38);
}

#cursor-click-burst.active {
  animation: cursor-burst 420ms cubic-bezier(0.16, 0.85, 0.22, 1);
}

@keyframes cursor-burst {
  0% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(0.2);
  }
  65% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(5.6);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(8.2);
  }
}

@keyframes blackhole-core-pulse {
  0%, 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.98); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes blackhole-spin {
  from { transform: rotate(0deg) scale(1); opacity: 0.78; }
  50% { transform: rotate(180deg) scale(1.03); opacity: 0.9; }
  to { transform: rotate(360deg) scale(1); opacity: 0.78; }
}

@keyframes blackhole-halo-breathe {
  0%, 100% { opacity: 0.58; transform: scale(0.95); }
  50% { opacity: 0.82; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  #boot_exit_sweep.active,
  #boot_exit_sweep.active::before {
    animation: none;
  }
  #boot_exit_sweep {
    opacity: 0 !important;
  }
  #cursor-click-burst.active {
    animation: none;
    opacity: 0;
  }
  #cursor-sun,
  #cursor-sun::before,
  #cursor-sun::after {
    animation: none !important;
  }
}

#hyperspace_overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

#hyperspace_overlay.active {
  opacity: 1;
}

#hyperspace_canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: var(--hs-streak-opacity, 0);
  mix-blend-mode: screen;
}

.hyperspace-glow,
.hyperspace-vignette,
.hyperspace-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hyperspace-glow {
  background:
    radial-gradient(circle at 50% 50%, rgba(195, 238, 255, 0.85), rgba(150, 215, 255, 0.18) 24%, rgba(90, 140, 255, 0.0) 62%);
  opacity: var(--hs-glow-opacity, 0);
  filter: blur(8px);
}

.hyperspace-vignette {
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 24%, rgba(4, 8, 22, 0.7) 78%, rgba(0, 0, 0, 0.95) 100%);
  opacity: var(--hs-vignette-opacity, 0);
}

.hyperspace-flash {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95), rgba(180, 230, 255, 0.65) 35%, rgba(80, 160, 255, 0.0) 65%);
  opacity: var(--hs-flash-opacity, 0);
}

body.hyperspace-transitioning .app {
  pointer-events: none;
}

body.hyperspace-transitioning #starfield-1,
body.hyperspace-transitioning #starfield-2,
body.hyperspace-transitioning #starfield-3,
body.hyperspace-transitioning .shooting-stars {
  transform: translate3d(0, 0, 0) scale(var(--hs-zoom, 1));
  transform-origin: center center;
  filter: brightness(var(--hs-brightness, 1)) saturate(var(--hs-saturation, 1));
}

body.hyperspace-transitioning .shooting-stars {
  opacity: var(--hs-shoot-opacity, 1);
}

body.hyperspace-reduced #hyperspace_canvas {
  opacity: 0;
}


#starfield-2 { opacity: 0.8; }
#starfield-3 { opacity: 0.65; }

.shooting-stars {
  overflow: hidden;
}

.shoot {
  position: absolute;
  width: 160px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.9), rgba(255,255,255,0));
  opacity: 0;
  filter: blur(0.3px);
}

.s1 { --angle: 22deg; animation: shoot1 22s infinite; }
.s2 { --angle: -28deg; animation: shoot2 26s infinite; }
.s3 { --angle: -160deg; animation: shoot3 20s infinite; }
.s4 { --angle: 200deg; animation: shoot4 28s infinite; }
.s5 { --angle: 85deg; animation: shoot5 24s infinite; }
.s6 { --angle: 5deg; animation: shoot6 30s infinite; }

@keyframes shoot1 {
  0% { opacity: 0; transform: translate3d(-20vw, -10vh, 0) rotate(var(--angle)); }
  10% { opacity: 1; }
  20% { opacity: 0; transform: translate3d(120vw, 80vh, 0) rotate(var(--angle)); }
  100% { opacity: 0; }
}

@keyframes shoot2 {
  0% { opacity: 0; transform: translate3d(120vw, -20vh, 0) rotate(var(--angle)); }
  12% { opacity: 1; }
  22% { opacity: 0; transform: translate3d(-20vw, 90vh, 0) rotate(var(--angle)); }
  100% { opacity: 0; }
}

@keyframes shoot3 {
  0% { opacity: 0; transform: translate3d(-10vw, 110vh, 0) rotate(var(--angle)); }
  10% { opacity: 1; }
  20% { opacity: 0; transform: translate3d(110vw, -20vh, 0) rotate(var(--angle)); }
  100% { opacity: 0; }
}

@keyframes shoot4 {
  0% { opacity: 0; transform: translate3d(110vw, 110vh, 0) rotate(var(--angle)); }
  12% { opacity: 1; }
  22% { opacity: 0; transform: translate3d(-20vw, -20vh, 0) rotate(var(--angle)); }
  100% { opacity: 0; }
}

@keyframes shoot5 {
  0% { opacity: 0; transform: translate3d(50vw, -30vh, 0) rotate(var(--angle)); }
  10% { opacity: 1; }
  18% { opacity: 0; transform: translate3d(60vw, 130vh, 0) rotate(var(--angle)); }
  100% { opacity: 0; }
}

@keyframes shoot6 {
  0% { opacity: 0; transform: translate3d(-30vw, 40vh, 0) rotate(var(--angle)); }
  10% { opacity: 1; }
  20% { opacity: 0; transform: translate3d(130vw, 50vh, 0) rotate(var(--angle)); }
  100% { opacity: 0; }
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.landing .app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing .header {
  width: 100%;
}

body.landing-space::before,
body.landing-space::after {
  opacity: 0.62;
}

body.main-space::before {
  opacity: 0.42;
  filter: saturate(0.82) brightness(0.68);
}

body.main-space::after {
  opacity: 0.16;
  filter: blur(90px) saturate(0.82) brightness(0.66);
}

body.main-space .shooting-stars {
  opacity: 0.58;
}

body.main-space #starfield-1 { opacity: 0.66; }
body.main-space #starfield-2 { opacity: 0.54; }
body.main-space #starfield-3 { opacity: 0.44; }

body.main-space::selection {
  background: rgba(120, 210, 255, 0.25);
}

body.main-space .app::before,
body.main-space .app::after {
  content: "";
  position: fixed;
  inset: -18%;
  pointer-events: none;
}

body.main-space .app::before {
  z-index: 0;
  opacity: var(--main-galaxy-opacity);
  background:
    radial-gradient(ellipse 42% 19% at 20% 26%, rgba(120, 220, 255, 0.35), rgba(52, 150, 255, 0.12) 33%, rgba(18, 24, 48, 0) 70%),
    radial-gradient(ellipse 48% 21% at 78% 20%, rgba(255, 172, 96, 0.34), rgba(255, 108, 54, 0.13) 36%, rgba(36, 18, 12, 0) 72%),
    radial-gradient(ellipse 46% 20% at 27% 78%, rgba(248, 122, 168, 0.28), rgba(184, 56, 104, 0.11) 34%, rgba(28, 10, 20, 0) 72%),
    radial-gradient(ellipse 50% 24% at 75% 75%, rgba(146, 126, 255, 0.28), rgba(92, 74, 195, 0.1) 35%, rgba(18, 12, 32, 0) 74%),
    radial-gradient(ellipse 26% 12% at 47% 47%, rgba(188, 212, 255, 0.15), rgba(58, 82, 148, 0.03) 55%, rgba(12, 14, 22, 0) 76%);
  filter: blur(68px) saturate(var(--main-galaxy-sat)) brightness(var(--main-galaxy-bright));
  animation: main-galaxy-drift var(--main-galaxy-drift-sec) ease-in-out infinite;
}

.star-toggle-btn {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 10, 18, 0.78);
  color: #e9f0ff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.star-toggle-btn:hover {
  border-color: rgba(255, 166, 102, 0.58);
  color: #ffd9ba;
}

body.starfield-off {
  background: linear-gradient(180deg, #02030a, #010208);
}

body.starfield-off::before,
body.starfield-off::after,
body.starfield-off .app::before,
body.starfield-off .app::after {
  opacity: 0 !important;
}

body.starfield-off #starfield-1,
body.starfield-off #starfield-2,
body.starfield-off #starfield-3,
body.starfield-off #main-galaxies-canvas,
body.starfield-off .shooting-stars,
body.starfield-off #cursor-sun,
body.starfield-off #cursor-click-burst {
  opacity: 0 !important;
}

body.main-space .app::after {
  z-index: 0;
  opacity: 0.22;
  background-image:
    radial-gradient(1px 1px at 8% 12%, rgba(205, 236, 255, 0.65) 0, transparent 100%),
    radial-gradient(2px 2px at 19% 26%, rgba(255, 205, 162, 0.72) 0, transparent 100%),
    radial-gradient(1px 1px at 32% 18%, rgba(248, 156, 197, 0.68) 0, transparent 100%),
    radial-gradient(2px 2px at 44% 33%, rgba(168, 162, 255, 0.7) 0, transparent 100%),
    radial-gradient(1px 1px at 57% 12%, rgba(194, 236, 255, 0.68) 0, transparent 100%),
    radial-gradient(2px 2px at 73% 29%, rgba(255, 188, 130, 0.72) 0, transparent 100%),
    radial-gradient(1px 1px at 88% 16%, rgba(226, 168, 247, 0.66) 0, transparent 100%),
    radial-gradient(1px 1px at 14% 62%, rgba(200, 232, 255, 0.58) 0, transparent 100%),
    radial-gradient(2px 2px at 28% 74%, rgba(255, 164, 120, 0.6) 0, transparent 100%),
    radial-gradient(1px 1px at 41% 66%, rgba(255, 138, 176, 0.62) 0, transparent 100%),
    radial-gradient(2px 2px at 59% 72%, rgba(150, 150, 255, 0.6) 0, transparent 100%),
    radial-gradient(1px 1px at 71% 64%, rgba(160, 228, 255, 0.58) 0, transparent 100%),
    radial-gradient(2px 2px at 83% 74%, rgba(255, 200, 146, 0.62) 0, transparent 100%);
  filter: blur(0.4px);
  animation: main-star-shift 112s linear infinite;
}

@keyframes main-galaxy-drift {
  0% {
    transform: translate3d(-2%, -1.2%, 0) scale(1.02) rotate(0deg);
  }
  33% {
    transform: translate3d(1.4%, 0.9%, 0) scale(1.05) rotate(0.35deg);
  }
  66% {
    transform: translate3d(-1.1%, 1.1%, 0) scale(1.04) rotate(-0.28deg);
  }
  100% {
    transform: translate3d(-2%, -1.2%, 0) scale(1.02) rotate(0deg);
  }
}

@keyframes main-star-shift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-1.2%, 0.9%, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-galaxies-canvas {
    transition: none;
  }
  body.main-space .app::before,
  body.main-space .app::after {
    animation: none;
  }
}

.landing-wrap {
  position: relative;
  width: 100%;
  min-height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 720px) {
  .app {
    padding: 16px;
  }
  .header {
    padding-bottom: 16px;
    min-height: 64px;
  }
  .title {
    font-size: 28px;
  }
  .subtitle-pills {
    gap: 8px;
  }
  .subtitle-pill {
    font-size: 12px;
    padding: 5px 11px;
  }
  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .header-actions {
    position: fixed;
    top: 4px;
    right: 4px;
    z-index: 20;
  }
  .change-account,
  .advanced-toggle {
    margin-top: 0;
    width: auto;
  }
  .landing-wrap {
    min-height: 640px;
  }
  .advanced-panel {
    top: 60px;
    left: 10px;
    width: calc(100vw - 20px);
  }
  #connect_page {
    width: min(92vw, 520px);
    min-height: 300px;
  }
  .chip {
    font-size: 18px;
    padding: 8px 12px;
    letter-spacing: 1px;
  }
  .row {
    grid-template-columns: 1fr 1fr;
    row-gap: 6px;
  }
}

/* Desktop half-screen tuning (avoid clipping/offset when window is not fullscreen) */
@media (min-width: 721px) and (max-width: 1280px) {
  .landing .app {
    padding-left: 14px;
    padding-right: 14px;
  }
  body.landing-space .hero-box {
    width: 100%;
    max-width: 100%;
  }
  body.landing-space .title-fill.title-fill-image {
    transform: scale(1.08);
  }
  #connect_page {
    width: min(95vw, 900px);
    top: 18%;
    transform: translate(-50%, -18%);
  }
}

@media (min-width: 721px) and (max-width: 1280px) and (max-height: 820px) {
  #connect_page {
    top: 13%;
    transform: translate(-50%, -13%);
  }
}

.hidden {
  display: none !important;
}

.header {
  padding: 16px 0 24px 0;
  position: relative;
  text-align: center;
}

.header-actions {
  position: fixed;
  top: 4px;
  right: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.menu-btn {
  width: 42px;
  height: 38px;
  padding: 8px 7px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  border: 1px solid rgba(145, 194, 255, 0.34);
  background: linear-gradient(165deg, rgba(18, 22, 34, 0.88), rgba(8, 10, 16, 0.86));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: rgba(232, 242, 255, 0.94);
  transition: transform 200ms ease, opacity 200ms ease;
}

.menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn.open span:nth-child(2) {
  opacity: 0;
}

.menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 27;
  background: rgba(2, 5, 10, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.main-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.main-menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 92vw);
  height: 100vh;
  z-index: 28;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 1px solid rgba(92, 140, 255, 0.2);
  background:
    linear-gradient(160deg, rgba(14, 18, 32, 0.98) 0%, rgba(8, 10, 18, 0.98) 100%);
  box-shadow:
    -24px 0 60px rgba(0, 0, 0, 0.65),
    inset 1px 0 0 rgba(92, 140, 255, 0.12);
  transform: translateX(102%);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms cubic-bezier(0.24, 0.77, 0.26, 1), opacity 200ms ease;
}

.main-menu-drawer.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.main-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(92, 140, 255, 0.15);
  margin-bottom: 4px;
}

.main-menu-head .panel-title {
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.main-menu-items {
  display: grid;
  gap: 6px;
}

.menu-item-btn {
  justify-content: flex-start;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(220, 232, 255, 0.75);
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: none;
  text-decoration: none;
  padding: 11px 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 170ms ease, color 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.menu-item-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(255, 150, 72, 0.6);
  border-radius: 0 2px 2px 0;
  transition: width 170ms ease;
}

.menu-item-btn:hover,
.menu-item-btn:focus-visible {
  outline: none;
  color: #ffc28a;
  border-color: rgba(255, 150, 72, 0.3);
  background: rgba(255, 150, 72, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.menu-item-btn:hover::before,
.menu-item-btn:focus-visible::before {
  width: 3px;
}

.menu-item-link {
  text-decoration: none;
}

.menu-item-link::after {
  content: " ↗";
  font-size: 10px;
  opacity: 0.45;
  vertical-align: super;
}

/* Séparateur avant les items internes (Profile, Advanced) */
#menu_open_profile {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.change-account {
  font-size: 11px;
  padding: 8px 10px;
  background: #1a1d25;
}

.stats-header-btn {
  font-size: 11px;
  padding: 8px 10px;
  background: rgba(14, 16, 22, 0.84);
  border-color: rgba(95, 182, 255, 0.62);
  color: #9fd3ff;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(95, 182, 255, 0.28);
  box-shadow: 0 0 12px rgba(95, 182, 255, 0.16);
}

.stats-header-btn:hover {
  color: #d6ecff;
  border-color: rgba(137, 202, 255, 0.85);
}

.stats-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(2, 5, 10, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.stats-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.stats-drawer {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: min(620px, 96vw);
  padding: 18px 14px;
  background: linear-gradient(180deg, rgba(12, 16, 24, 0.95), rgba(8, 10, 16, 0.94));
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 22px 0 48px rgba(0, 0, 0, 0.45);
  z-index: 26;
  overflow-y: auto;
  scrollbar-width: none;
}
.stats-drawer::-webkit-scrollbar {
  display: none;
}

.stats-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stats-kpi-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.stats-chart-wrap {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.8);
  padding: 8px;
  overflow: visible;
}

#stats_daily_volume_chart {
  display: block;
  width: 100%;
  height: 220px;
}

#stats_daily_fees_chart {
  display: block;
  width: 100%;
  height: 220px;
}

.stats-chart-tooltip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 6;
  min-width: 146px;
  max-width: min(260px, calc(100% - 16px));
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 9, 16, 0.95);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42);
  color: rgba(240, 246, 255, 0.96);
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.2px;
  pointer-events: none;
  white-space: nowrap;
}

.advanced-toggle {
  font-size: 11px;
  padding: 8px 10px;
  background: rgba(14, 16, 22, 0.82);
  border-color: rgba(255, 140, 60, 0.72);
  color: #ff9f5b;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 140, 60, 0.35);
  box-shadow: 0 0 16px rgba(255, 140, 60, 0.24);
}

.advanced-toggle:hover {
  color: #ffc18f;
  border-color: rgba(255, 170, 110, 0.9);
}

.title {
  font-size: clamp(72px, 9vw, 139px);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  align-items: baseline;
  position: relative;
  width: 100%;
  margin: 0 auto;
  line-height: 1;
  transform-style: preserve-3d;
  transform:
    perspective(760px)
    rotateX(calc(7deg + var(--title-tilt-y, 0deg)))
    rotateY(var(--title-tilt-x, 0deg))
    translateZ(0);
  transition: transform 0.16s ease-out;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.8),
    0 8px 20px rgba(0,0,0,0.6),
    0 0 18px rgba(92, 140, 255, 0.4);
}

.title-corner {
  position: absolute;
  top: 6px;
  left: -10px;
  font-size: 18px;
  letter-spacing: 2px;
  color: #d7fff3;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.75),
    0 0 10px rgba(93, 240, 203, 0.42);
  pointer-events: none;
}

.title-outline {
  color: rgba(10, 12, 18, 0.15);
  -webkit-text-stroke: 1.4px rgba(161, 255, 232, 0.95);
  text-shadow:
    0 2px 0 rgba(0,0,0,0.75),
    0 0 16px rgba(93, 240, 203, 0.32);
}

.title-fill {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.85),
    0 10px 22px rgba(0,0,0,0.7),
    0 0 10px rgba(206, 216, 235, 0.3);
}

/* TRADOOR wordmark — eye elements */
.title-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.title-frag {
  display: inline;
}

.title-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.62em;
  height: 0.7em;
  border-radius: 50%;
  border: 0.11em solid #7a8090;
  position: relative;
  flex-shrink: 0;
  margin: 0 0.01em;
  color: #7a8090;
  text-shadow: none;
  overflow: hidden;
}

.title-eye-cyan {
  border-color: #ffffff;
  color: #35f0c2;
  background: transparent;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
  transform-origin: center bottom;
  animation: tradoor-blink-cyan 6s linear 0s infinite;
}

.title-eye-orange {
  border-color: #ffffff;
  color: #ff8a3a;
  background: transparent;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
  transform-origin: center bottom;
  animation: tradoor-blink-orange 6s linear 0.2s infinite;
}

.title-eye-pupil {
  display: block;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: currentColor;
  position: relative;
  flex-shrink: 0;
  opacity: 0.88;
}

.title-eye-glint {
  display: block;
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
}

.title-eye-glint-big {
  display: block;
  width: 42%;
  height: 42%;
  top: 6%;
  right: 6%;
}

.title-eye-glint-small {
  display: block;
  width: 22%;
  height: 22%;
  bottom: 13%;
  left: 10%;
}

@keyframes tradoor-blink-cyan {
  /* repos */
  0%, 78% {
    transform: scaleY(1);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
    animation-timing-function: ease-in;
  }
  /* plissement */
  83% {
    transform: scaleY(0.38);
    animation-timing-function: ease-in;
  }
  /* fermé */
  86% {
    transform: scaleY(0.04);
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.05);
    animation-timing-function: ease-out;
  }
  /* réouverture + flash cyan */
  91% {
    transform: scaleY(1);
    box-shadow: 0 0 18px rgba(53, 240, 194, 0.85);
    animation-timing-function: ease-out;
  }
  96%, 100% {
    transform: scaleY(1);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
  }
}

@keyframes tradoor-blink-orange {
  0%, 78% {
    transform: scaleY(1);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
    animation-timing-function: ease-in;
  }
  83% {
    transform: scaleY(0.38);
    animation-timing-function: ease-in;
  }
  86% {
    transform: scaleY(0.04);
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.05);
    animation-timing-function: ease-out;
  }
  91% {
    transform: scaleY(1);
    box-shadow: 0 0 18px rgba(255, 138, 58, 0.85);
    animation-timing-function: ease-out;
  }
  96%, 100% {
    transform: scaleY(1);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
  }
}

/* Extended mode: logo pupil */
body.mode-extended .title-eye-pupil {
  background: transparent url('/web/ext.png') center / contain no-repeat;
  border-radius: 0;
  opacity: 1;
  width: 55%;
  height: 55%;
}

body.mode-extended .title-eye-glint {
  display: none;
}

.title-fill.title-fill-hl {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
}

.title .title-fill.title-fill-image,
.title.idle .title-fill.title-fill-image,
.title.active .title-fill.title-fill-image,
body.landing-space .title-fill.title-fill-image {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: transparent;
  text-shadow: none;
}

.title-main-image {
  width: min(92vw, 1100px);
  height: auto;
  max-height: 44vh;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}

body.landing-space .title-main-image {
  width: min(92vw, 1100px);
  max-height: 44vh;
  filter: saturate(1.1) contrast(1.03);
}

.title-o-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transform: translateY(4px);
}

.title-o-split {
  width: 0.82em;
  height: 0.82em;
  display: inline-block;
  background-image: url("/web/hlgreen.png");
  background-repeat: no-repeat;
  background-size: 200% 100%;
  filter: drop-shadow(0 0 8px rgba(53, 240, 194, 0.28));
}

.title-o-split.left {
  background-position: 0% 50%;
}

.title-o-split.right {
  background-position: 100% 50%;
}

.title-o-icon {
  width: auto;
  height: 0.82em;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 8px rgba(53, 240, 194, 0.28));
}

.hero-box {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(14, 16, 22, 0.75), rgba(8, 10, 16, 0.55));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 50px rgba(0,0,0,0.55);
}

body.landing-space .hero-box {
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: none;
  width: fit-content;
  margin: 0 auto;
  padding: 0;
  display: inline-flex;
}

body.landing-space .header {
  padding: 0;
}

body.landing-space #app_title {
  margin: 0;
  width: auto;
  gap: 0;
}

body.landing-space .title-fill.title-fill-image {
  position: relative;
  display: inline-block;
  line-height: 0;
  isolation: isolate;
  transform: scale(1.24);
  transform-origin: center center;
}

body.landing-space .title-eyes-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  /* YEUX: single calibration point */
  --eye-width: 11.6%;
  --eye-height: 85%;
  --eye-y: 45.6%;
  --eye-left-x: 58.8%;
  --eye-right-x: 70.1%;
}

body.landing-space .title-eyes-overlay .title-eye {
  position: absolute;
  width: var(--eye-width);
  height: var(--eye-height);
  top: var(--eye-y);
  background-image: url("/web/yeux.png");
  background-repeat: no-repeat;
  background-size: 200% 100%;
  filter: drop-shadow(0 0 8px rgba(22, 28, 38, 0.6));
  mix-blend-mode: screen;
  opacity: 0.98;
  transform: translate(-50%, -50%);
}

body.landing-space .title-eyes-overlay .title-eye-left {
  left: var(--eye-left-x);
  background-position: 0% 50%;
}

body.landing-space .title-eyes-overlay .title-eye-right {
  left: var(--eye-right-x);
  background-position: 100% 50%;
}

body.landing-space .title-fill.title-fill-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255, 154, 74, 0.95) 0%, rgba(255, 131, 56, 0.92) 46%, rgba(103, 239, 222, 0.96) 100%);
  mix-blend-mode: color;
  opacity: 0.62;
  pointer-events: none;
  -webkit-mask-image: var(--landing-logo-mask);
  mask-image: var(--landing-logo-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

body.main-space .hero-box {
  background: transparent;
  border: none;
  box-shadow: none;
}

.hero-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.logo-chooser {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

body.main-space .logo-chooser {
  display: none;
}

.logo-card {
  all: unset;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(10, 14, 24, 0.66);
  padding: 8px 10px;
  display: grid;
  gap: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: border-color 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}

.logo-card:hover {
  border-color: rgba(255, 190, 120, 0.45);
  transform: translateY(-1px);
}

.logo-card.active {
  border-color: rgba(255, 210, 152, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 14px rgba(255, 176, 92, 0.22);
}

.logo-card-preview {
  width: 100%;
  height: 42px;
  object-fit: contain;
  display: block;
}

.logo-card-label {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(236, 242, 255, 0.78);
}

.chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.chip {
  position: absolute;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 30px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(8, 10, 16, 0.7);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255, 140, 60, 0.95);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  animation: chip-float 10s ease-in-out infinite;
}

.chip.c1 { top: 6%; left: 10%; }
.chip.c2 { top: 6%; right: 10%; animation-delay: 1s; }
.chip.c3 { top: 52%; left: -20%; animation-delay: 2s; }
.chip.c4 { top: 52%; right: -35%; animation-delay: 3s; }
.chip.c5 { bottom: 10%; left: 8%; animation-delay: 4s; }
.chip.c6 { bottom: 10%; right: 8%; animation-delay: 5s; }

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

#connect_page {
  max-width: 980px;
  width: min(92vw, 980px);
  min-height: 340px;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translate(-50%, -14%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;
  isolation: isolate;
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
}

#connect_page::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    116deg,
    rgba(96, 234, 255, 0.52) 0%,
    rgba(124, 228, 241, 0.28) 28%,
    rgba(255, 166, 88, 0.34) 62%,
    rgba(255, 137, 64, 0.5) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.65;
  pointer-events: none;
  z-index: -1;
}

#connect_page::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 16% 18%, rgba(96, 234, 255, 0.08), transparent 46%),
    radial-gradient(circle at 84% 82%, rgba(255, 158, 76, 0.08), transparent 44%);
  pointer-events: none;
  z-index: -1;
}

#connect_page.panel-green {
  background: linear-gradient(180deg, rgba(22, 30, 26, 0.24), rgba(12, 16, 14, 0.18));
}

@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  #connect_page::before {
    inset: 0;
    padding: 0;
    background: none;
    border: 1px solid rgba(137, 231, 246, 0.34);
    opacity: 1;
  }
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  #connect_page {
    background: linear-gradient(180deg, rgba(22, 30, 26, 0.38), rgba(12, 16, 14, 0.28));
  }
}

#main_page.hyperspace-arrival {
  animation: hyperspace-arrival 360ms cubic-bezier(0.19, 0.74, 0.21, 1);
}

@keyframes hyperspace-arrival {
  0% {
    opacity: 0.78;
    transform: translate3d(0, 12px, 0) scale(0.992);
    filter: saturate(1.2) brightness(1.1);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: saturate(1) brightness(1);
  }
}

#connect_page .grid {
  max-width: 720px;
  margin: 0 auto;
}

#connect_page .actions {
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px !important;
  margin-bottom: 10px;
}

.connect-steps {
  width: min(720px, calc(100% - 24px));
  margin: 20px auto 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.connect-step {
  all: unset;
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 11px 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(128, 146, 180, 0.3);
  background:
    linear-gradient(180deg, rgba(17, 23, 37, 0.94), rgba(10, 14, 24, 0.9)),
    radial-gradient(circle at 90% 10%, rgba(139, 176, 255, 0.08), transparent 45%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.connect-step::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7f8aa1;
  box-shadow: 0 0 10px rgba(127, 138, 161, 0.45);
}

.connect-step:hover {
  transform: translateY(-1px);
  border-color: rgba(144, 196, 255, 0.52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 10px 22px rgba(0, 0, 0, 0.34);
}

.connect-step:focus-visible {
  outline: 2px solid rgba(96, 225, 255, 0.78);
  outline-offset: 2px;
}

.connect-step .step-kicker {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(184, 202, 233, 0.8);
  font-weight: 700;
}

.connect-step .step-label {
  font-size: 14px;
  line-height: 1.2;
  color: #eef3ff;
  font-weight: 600;
}

.connect-step .step-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(131, 145, 170, 0.42);
  background: rgba(15, 20, 32, 0.74);
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #cad4e7;
}

.connect-step.is-pending::before {
  background: #7f8aa1;
  box-shadow: 0 0 10px rgba(127, 138, 161, 0.45);
}

.connect-step.is-active {
  border-color: rgba(112, 228, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(14, 29, 39, 0.96), rgba(9, 18, 27, 0.9)),
    radial-gradient(circle at 85% 10%, rgba(91, 230, 255, 0.24), transparent 45%);
  box-shadow: inset 0 0 0 1px rgba(118, 226, 255, 0.24), 0 0 16px rgba(74, 224, 255, 0.2);
}

.connect-step.is-active::before {
  background: #5ce4ff;
  box-shadow: 0 0 14px rgba(92, 228, 255, 0.72);
}

.connect-step.is-active .step-state {
  border-color: rgba(114, 231, 255, 0.6);
  color: #c9f7ff;
}

.connect-step.is-done {
  border-color: rgba(98, 242, 179, 0.58);
  background:
    linear-gradient(180deg, rgba(12, 32, 24, 0.95), rgba(9, 21, 17, 0.92)),
    radial-gradient(circle at 85% 10%, rgba(92, 238, 171, 0.2), transparent 45%);
}

.connect-step.is-done::before {
  background: #62f2b3;
  box-shadow: 0 0 14px rgba(98, 242, 179, 0.72);
}

.connect-step.is-done .step-state {
  border-color: rgba(98, 242, 179, 0.52);
  color: #c9ffe7;
}

.connect-step.is-busy {
  pointer-events: none;
  opacity: 0.9;
}

.connect-step:disabled {
  cursor: default;
}

.connect-help-compact {
  max-width: 720px;
  margin: 10px auto 8px;
  text-align: center;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.15px;
  color: rgba(226, 234, 247, 0.9);
}

.connect-help-toggle {
  width: min(360px, calc(100% - 24px));
  margin: 0 auto;
  display: block;
}

.connect-help-details {
  width: min(620px, calc(100% - 24px));
  margin: 8px auto 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(210, 223, 244, 0.82);
}

.api-keys-tip {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 144, 71, 0.68);
  background: linear-gradient(180deg, rgba(44, 22, 10, 0.56), rgba(22, 12, 8, 0.44));
  color: #ffc08f;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 195, 139, 0.1), 0 8px 18px rgba(0, 0, 0, 0.28);
  transition: border-color 0.14s ease, color 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}

.api-keys-tip:hover,
.api-keys-tip:focus-visible {
  border-color: rgba(255, 165, 92, 0.86);
  color: #ffd6b4;
  box-shadow: inset 0 0 0 1px rgba(255, 209, 166, 0.2), 0 0 14px rgba(255, 144, 71, 0.24);
  transform: translateY(-1px);
}

.connect-help-path {
  border: 1px solid rgba(255, 147, 78, 0.34);
  background: linear-gradient(180deg, rgba(28, 17, 11, 0.56), rgba(16, 10, 8, 0.44));
  border-radius: 10px;
  padding: 10px 12px;
  color: rgba(253, 234, 218, 0.92);
  font-size: 12px;
  line-height: 1.45;
}

.connect-help-path a {
  color: #ffbf8a;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 191, 138, 0.55);
}

.connect-help-path a:hover {
  color: #ffd4b2;
}

.connect-help-note {
  margin-top: 7px;
  font-size: 11px;
  color: rgba(221, 230, 245, 0.78);
}

@media (max-width: 920px) {
  .connect-steps {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }

  .connect-help-compact {
    font-size: 15px;
  }
}

#extended_credentials_panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(146, 176, 228, 0.22);
  background: linear-gradient(180deg, rgba(10, 15, 26, 0.62), rgba(8, 12, 20, 0.5));
  box-shadow: inset 0 0 0 1px rgba(185, 208, 244, 0.05);
}

#extended_credentials_panel .grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 10px 14px;
}

#extended_credentials_panel .field-label-with-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: rgba(228, 236, 249, 0.86);
}

#extended_credentials_panel input {
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(141, 166, 206, 0.26);
  background: rgba(4, 10, 19, 0.68);
}

#extended_credentials_panel .field-inline-msg {
  min-height: 14px;
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.25px;
}

#extended_credentials_panel .extended-save-sticky {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  #extended_credentials_panel .grid {
    grid-template-columns: 1fr;
  }
}

#extended_credentials_panel #extended_credentials_save {
  min-width: 140px;
  border-radius: 8px;
  border-color: rgba(151, 176, 221, 0.35);
  background: linear-gradient(180deg, rgba(19, 27, 45, 0.84), rgba(12, 17, 30, 0.78));
  color: #e6efff;
}

#extended_credentials_panel #extended_credentials_save:hover {
  border-color: rgba(188, 211, 255, 0.48);
  background: linear-gradient(180deg, rgba(22, 34, 57, 0.9), rgba(14, 22, 39, 0.82));
}

#extended_credentials_panel #extended_save_state {
  font-size: 12px;
  color: rgba(212, 226, 249, 0.85);
}

.wallet-auth-btn {
  background: rgba(28, 34, 52, 0.9);
  border-color: rgba(146, 170, 255, 0.45);
  color: #d9e3ff;
}

.builder-approve-btn {
  background: rgba(43, 36, 22, 0.78);
  border-color: rgba(255, 182, 84, 0.5);
  color: #ffe0ae;
}

.agent-approve-btn {
  background: rgba(24, 28, 44, 0.82);
  border-color: rgba(128, 170, 255, 0.52);
  color: #d3e5ff;
}

.setup-all-btn {
  background: rgba(22, 40, 52, 0.9);
  border-color: rgba(95, 225, 255, 0.5);
  color: #d5f7ff;
}

.setup-all-btn.connected {
  background: rgba(26, 78, 56, 0.3);
  border-color: rgba(74, 220, 159, 0.6);
  color: #c9ffe7;
}

.builder-approve-btn.connected {
  background: rgba(39, 166, 118, 0.2);
  border-color: rgba(74, 220, 159, 0.55);
  color: #c8ffe6;
}

.agent-approve-btn.connected {
  background: rgba(39, 166, 118, 0.2);
  border-color: rgba(74, 220, 159, 0.55);
  color: #c8ffe6;
}

.wallet-auth-btn.connected {
  background: rgba(39, 166, 118, 0.2);
  border-color: rgba(74, 220, 159, 0.55);
  color: #c8ffe6;
}

.wallet-auth-status,
.builder-fee-status,
.agent-status,
.zero1-referral-status {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: #bfc9da;
  text-align: center;
}

.wallet-auth-status.ok,
.builder-fee-status.ok,
.agent-status.ok,
.zero1-referral-status.ok {
  color: #9effcd;
}

.wallet-auth-status.warn,
.builder-fee-status.warn,
.agent-status.warn,
.zero1-referral-status.warn {
  color: #ffd191;
}

.wallet-auth-status.error,
.builder-fee-status.error,
.agent-status.error,
.zero1-referral-status.error {
  color: #ff9f9f;
}

.zero1-referral-panel {
  margin-top: 12px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.zero1-referral-panel .actions {
  justify-content: center;
  flex-wrap: wrap;
}

#zero1_referral_proof {
  margin-top: 8px;
}

.signature-mini-row {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.step-mini {
  position: relative;
  margin-top: 0;
  padding: 6px 10px 6px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 14, 24, 0.7);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #c5d0e6;
  cursor: help;
}

.security-note {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.2px;
  color: rgba(220, 230, 245, 0.82);
}

.step-mini::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: #7b869e;
  box-shadow: 0 0 8px rgba(123, 134, 158, 0.35);
}

.step-mini.ok::before {
  background: #62f2b3;
  box-shadow: 0 0 10px rgba(98, 242, 179, 0.6);
}

.step-mini.warn::before {
  background: #ffbf7a;
  box-shadow: 0 0 10px rgba(255, 191, 122, 0.55);
}

.step-mini.error::before {
  background: #ff8484;
  box-shadow: 0 0 10px rgba(255, 132, 132, 0.6);
}

.signature-explain {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: #aeb7ca;
  letter-spacing: 0.2px;
}

.wallet-identity {
  position: absolute;
  top: 12px;
  left: 14px;
  min-width: 178px;
  padding: 9px 11px;
  border: 1px solid rgba(140, 182, 255, 0.24);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(10, 16, 28, 0.92), rgba(7, 12, 22, 0.8));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(173, 209, 255, 0.06);
  z-index: 4;
}

.wallet-identity-label {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: #bcd1ff;
  text-transform: uppercase;
  font-weight: 700;
}

.wallet-identity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wallet-identity-value {
  font-size: 13px;
  color: #f5f7ff;
  font-weight: 600;
  letter-spacing: 0.4px;
  word-break: normal;
}

.wallet-identity-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-network-badge {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 24, 0.72);
  font-size: 10px;
  letter-spacing: 0.6px;
  color: #d2dffb;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wallet-network-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
  display: block;
}

.wallet-network-badge.ok {
  border-color: rgba(98, 242, 179, 0.55);
  background: rgba(23, 56, 43, 0.5);
  color: #bcffd9;
}

.wallet-network-badge.warn {
  border-color: rgba(255, 191, 122, 0.56);
  background: rgba(52, 37, 16, 0.52);
  color: #ffd9a8;
}

.profile-disconnect-btn {
  all: unset;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 150, 150, 0.5);
  background: rgba(34, 10, 10, 0.68);
  color: #ffb0b0;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.profile-disconnect-btn:hover {
  background: rgba(58, 16, 16, 0.84);
  box-shadow: 0 0 10px rgba(255, 100, 100, 0.3);
}

.profile-disconnect-btn:active {
  transform: translateY(1px) scale(0.95);
}

.help-dot {
  all: unset;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 140, 60, 0.22);
  border: 1px solid rgba(255, 140, 60, 0.58);
  color: #ffb97f;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.help-dot:hover,
.help-dot.active {
  background: rgba(255, 140, 60, 0.35);
  box-shadow: 0 0 14px rgba(255, 140, 60, 0.35);
}

.api-key-wrap {
  position: relative;
  width: 100%;
}

.api-key-wrap > input {
  width: 100%;
}

.api-key-wrap .help-dot {
  position: absolute;
  top: 50%;
  right: -30px;
  transform: translateY(-50%);
}

.api-key-wrap .help-dot:hover,
.api-key-wrap .help-dot.active {
  transform: translateY(calc(-50% - 1px));
}

#connect_page label,
#connect_page .panel-title,
#connect_page input,
#connect_page select {
  color: #f7f7f7;
}

#connect_page .panel-title {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  border-bottom: none;
  text-align: center;
  font-size: 33px;
  letter-spacing: 3px;
  color: #fff2de;
  text-shadow:
    0 0 8px rgba(255, 173, 102, 0.55),
    0 0 18px rgba(255, 173, 102, 0.4),
    0 0 30px rgba(255, 173, 102, 0.2);
  animation: connection-sparkle 1.8s ease-in-out infinite;
}

@keyframes connection-sparkle {
  0%, 100% {
    opacity: 0.9;
    filter: brightness(1);
    text-shadow:
      0 0 8px rgba(255, 173, 102, 0.45),
      0 0 18px rgba(255, 173, 102, 0.3);
  }
  50% {
    opacity: 1;
    filter: brightness(1.2);
    text-shadow:
      0 0 10px rgba(255, 204, 153, 0.7),
      0 0 24px rgba(255, 173, 102, 0.65),
      0 0 36px rgba(255, 173, 102, 0.35);
  }
}

.api-help-inline {
  margin-top: 9px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 140, 60, 0.28);
  background: linear-gradient(180deg, rgba(26, 18, 14, 0.45), rgba(12, 10, 9, 0.3));
}

.api-key-status {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: rgba(164, 246, 220, 0.95);
}

.api-help-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: rgba(255, 182, 120, 0.95);
  margin-bottom: 8px;
}

.api-help-steps {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: rgba(245, 245, 245, 0.95);
  margin-bottom: 8px;
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(255, 140, 60, 0.25);
  border: 1px solid rgba(255, 140, 60, 0.55);
  color: #ffb87f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.step-key {
  color: #ffb77a;
  font-weight: 600;
}

.api-help-note {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

@media (max-width: 720px) {
  .logo-chooser {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .logo-card-word {
    font-size: 18px;
  }
  .api-key-wrap .help-dot {
    right: -24px;
  }
  #connect_page {
    padding-top: 52px;
  }
  #connect_page .panel-title {
    font-size: 24px;
    letter-spacing: 2px;
  }
  .api-help-inline .api-help-steps {
    font-size: 12px;
    line-height: 1.4;
  }
}

/* Disable mobile-specific compact layout: keep desktop proportions */
@media (max-width: 720px) {
  .title {
    font-size: 139px !important;
  }
  .landing-wrap {
    min-height: 720px !important;
  }
  #connect_page {
    width: min(92vw, 980px) !important;
    min-height: 340px !important;
    padding-top: 64px !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }
}

.title.idle {
  text-shadow:
    0 2px 0 rgba(0,0,0,0.8),
    0 8px 20px rgba(0,0,0,0.6),
    0 0 18px rgba(255, 140, 60, 0.45);
}

.title.idle .title-fill {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
}

.title.active {
  animation: title-blink 1.2s ease-in-out infinite;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.8),
    0 0 20px rgba(53, 240, 194, 0.6);
}

.title.active .title-outline {
  -webkit-text-stroke: 1.4px rgba(171, 255, 227, 0.95);
  text-shadow:
    0 2px 0 rgba(0,0,0,0.75),
    0 0 18px rgba(53, 240, 194, 0.35);
}

.title.active .title-fill {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.8),
    0 0 18px rgba(220, 230, 245, 0.5);
}

.title.active .title-fill.title-fill-hl {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
}

/* Landing-only logo variants */
body.landing-space[data-logo-variant="v1"] .title-outline {
  color: rgba(10, 12, 18, 0.15);
  -webkit-text-stroke: 1.4px rgba(161, 255, 232, 0.95);
  text-shadow:
    0 2px 0 rgba(0,0,0,0.75),
    0 0 16px rgba(93, 240, 203, 0.32);
}

body.landing-space[data-logo-variant="v1"] .title-fill {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.85),
    0 10px 22px rgba(0,0,0,0.7),
    0 0 10px rgba(206, 216, 235, 0.3);
}

body.landing-space[data-logo-variant="v1"] .title-corner {
  color: #d7fff3;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.75),
    0 0 10px rgba(93, 240, 203, 0.42);
}

body.landing-space[data-logo-variant="v2"] .title-outline {
  color: rgba(234, 241, 252, 0.1);
  -webkit-text-stroke: 1px rgba(203, 218, 241, 0.56);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.62),
    0 0 8px rgba(160, 184, 218, 0.2);
}

body.landing-space[data-logo-variant="v2"] .title-fill {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.85),
    0 10px 22px rgba(0,0,0,0.7),
    0 0 10px rgba(206, 216, 235, 0.3);
}

body.landing-space[data-logo-variant="v2"] .title-corner {
  color: #eef3fb;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.66),
    0 0 6px rgba(173, 189, 214, 0.22);
}

body.landing-space[data-logo-variant="v3"] .title-outline {
  color: rgba(214, 242, 255, 0.1);
  -webkit-text-stroke: 1.2px rgba(180, 235, 255, 0.9);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.66),
    0 0 10px rgba(97, 203, 255, 0.28);
}

body.landing-space[data-logo-variant="v3"] .title-fill {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.85),
    0 10px 22px rgba(0,0,0,0.7),
    0 0 10px rgba(206, 216, 235, 0.3);
}

body.landing-space[data-logo-variant="v3"] .title-corner {
  color: #e8f7ff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.65),
    0 0 8px rgba(97, 203, 255, 0.28);
}

body.landing-space[data-logo-variant="v4"] .title-outline {
  color: rgba(244, 247, 252, 0.08);
  -webkit-text-stroke: 1px rgba(220, 228, 241, 0.74);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.66),
    0 0 8px rgba(206, 216, 235, 0.2);
}

body.landing-space[data-logo-variant="v4"] .title-fill {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.85),
    0 10px 22px rgba(0,0,0,0.7),
    0 0 10px rgba(206, 216, 235, 0.3);
}

body.landing-space[data-logo-variant="v4"] .title-corner {
  color: #f3f7ff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.64),
    0 0 6px rgba(206, 216, 235, 0.22);
}

.title.active .title-corner {
  color: #e4fff5;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.75),
    0 0 12px rgba(53, 240, 194, 0.5);
}

@keyframes title-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.subtitle {
  color: var(--muted);
  margin-top: -18px;
  margin-bottom: 0;
}

.subtitle-pills {
  margin-top: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.subtitle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(12, 16, 24, 0.68), rgba(7, 10, 16, 0.52));
  color: rgba(232, 239, 252, 0.86);
  letter-spacing: 0.4px;
  font-size: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  animation: subtitle-pill-in 440ms ease forwards;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.subtitle-pill:nth-child(1) { animation-delay: 0ms; }
.subtitle-pill:nth-child(2) { animation-delay: 80ms; }
.subtitle-pill:nth-child(3) { animation-delay: 160ms; }

.subtitle-pill:hover {
  border-color: rgba(143, 248, 255, 0.44);
  color: #f4fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 16px rgba(96, 234, 255, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.35);
}

@keyframes subtitle-pill-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  background: linear-gradient(180deg, rgba(22, 24, 30, 0.6), rgba(12, 13, 18, 0.45));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 18px 40px rgba(0,0,0,0.55);
  position: relative;
  overflow: visible;
  backdrop-filter: blur(10px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 6px;
  opacity: 0.8;
  pointer-events: none;
}

.panel-green {
  background: linear-gradient(180deg, rgba(22, 30, 26, 0.55), rgba(12, 16, 14, 0.45));
}

.panel-orange {
  background: linear-gradient(180deg, rgba(30, 24, 18, 0.55), rgba(16, 12, 10, 0.45));
}

.panel-blue {
  background: linear-gradient(180deg, rgba(18, 22, 30, 0.55), rgba(10, 12, 16, 0.45));
}

.advanced-panel {
  position: fixed;
  left: 16px;
  top: 82px;
  width: min(380px, calc(100vw - 32px));
  margin: 0;
  z-index: 8;
}

.advanced-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.advanced-head .panel-title {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.panel-title {
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.65);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.panel-title.dashboard-title {
  text-align: center;
  font-size: 13px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.75);
  text-shadow: 0 0 14px rgba(92, 140, 255, 0.3);
  padding-bottom: 14px;
  position: relative;
}

.panel-title.dashboard-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(92, 140, 255, 0.7), transparent);
  border-radius: 2px;
}

.dashboard-head {
  margin-bottom: 12px;
}

.dashboard-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.tab-btn {
  min-width: 120px;
  background: rgba(15, 19, 27, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tab-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 140, 60, 0.28), rgba(255, 140, 60, 0.08));
  border-color: rgba(255, 140, 60, 0.65);
  color: #ffb27a;
  box-shadow: 0 0 16px rgba(255, 140, 60, 0.25);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.notional-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 20, 0.68);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Compact "trading terminal" row for notional on the main page */
body.main-space #notional_panel .grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: end;
  gap: 10px;
}

body.main-space #notional_panel label > span#session_notional_label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

body.main-space #notional_panel .notional-input-wrap > input {
  height: 44px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

body.main-space #notional_panel .notional-max-btn {
  height: 28px;
  padding: 4px 10px;
}

body.main-space #notional_panel .notional-card {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
}

body.main-space #notional_panel .notional-label {
  margin: 0;
  grid-column: 1;
  grid-row: 1;
}

body.main-space #notional_panel .notional-value {
  margin: 0;
  grid-column: 2;
  grid-row: 1;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  color: #bfeeff;
  text-align: right;
}

body.main-space #notional_panel #selected_leverage {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
}

body.main-space #notional_panel .notional-hint:last-child {
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0;
}

@media (max-width: 720px) {
  body.main-space #notional_panel .grid {
    grid-template-columns: 1fr;
  }
  body.main-space #notional_panel .notional-card {
    grid-template-columns: 1fr auto;
  }
}

.notional-input-wrap {
  position: relative;
  width: 100%;
}

.notional-input-wrap > input {
  width: 100%;
  padding-right: 62px;
}

.notional-max-btn {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 140, 60, 0.58);
  background: linear-gradient(135deg, rgba(255, 140, 60, 0.34), rgba(255, 140, 60, 0.16));
  color: #ffbf8a;
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 700;
  cursor: pointer;
}

.notional-max-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.notional-label {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.notional-value {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  color: #9ce6ff;
}

.notional-hint {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

.risk-mode-wrap {
  margin-bottom: 14px;
}

.risk-mode-title {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.hip3-notice {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(80, 160, 255, 0.10);
  border: 1px solid rgba(80, 160, 255, 0.30);
  color: rgba(160, 210, 255, 0.95);
  font-size: 11.5px;
  line-height: 1.5;
}

.hip3-notice a {
  color: rgba(100, 180, 255, 1);
  text-decoration: underline;
}

.hip3-notice-mockup {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 5px;
  background: #1a1c24;
  border: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
}

.hip3-notice-mockup-label {
  font-size: 12px;
  color: rgba(220, 225, 235, 0.9);
  flex: 1;
}

.hip3-notice-mockup-checkbox {
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(180, 185, 200, 0.6);
  border-radius: 2px;
  background: transparent;
  flex-shrink: 0;
}

.aggressive-notice {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 160, 0, 0.12);
  border: 1px solid rgba(255, 160, 0, 0.35);
  color: rgba(255, 200, 80, 0.95);
  font-size: 11.5px;
  line-height: 1.5;
}

.risk-mode-selector {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 12, 20, 0.72);
  overflow: hidden;
}

.risk-mode-selector.is-locked {
  border-color: rgba(255, 171, 94, 0.46);
  box-shadow: inset 0 0 0 1px rgba(255, 171, 94, 0.14);
}

.risk-mode-selector.is-locked .risk-mode-option {
  cursor: not-allowed;
  opacity: 0.88;
}

.risk-mode-selector.is-locked .risk-mode-slider {
  filter: saturate(0.8) brightness(0.95);
}

.risk-mode-selector::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.risk-mode-selector.flash-aggressive::after {
  background: radial-gradient(circle at 25% 50%, rgba(255, 142, 66, 0.5), rgba(255, 142, 66, 0.0) 64%);
  animation: risk-mode-flash 360ms ease;
}

.risk-mode-selector.flash-conservative::after {
  background: radial-gradient(circle at 75% 50%, rgba(53, 240, 194, 0.46), rgba(53, 240, 194, 0.0) 64%);
  animation: risk-mode-flash 360ms ease;
}

.risk-mode-selector.flash-classic::after {
  background: radial-gradient(circle at 50% 50%, rgba(235, 244, 255, 0.44), rgba(235, 244, 255, 0.0) 64%);
  animation: risk-mode-flash 360ms ease;
}

@keyframes risk-mode-flash {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}

.risk-mode-slider {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc((100% - 24px) / 3);
  height: calc(100% - 12px);
  border-radius: 8px;
  background: rgba(20, 24, 36, 0.9);
  border: 1px solid rgba(53, 240, 194, 0.72);
  box-shadow: 0 0 16px rgba(53, 240, 194, 0.28);
  transform: translateX(0);
  transition: transform 260ms cubic-bezier(0.24, 0.77, 0.26, 1), border-color 220ms ease, box-shadow 220ms ease;
  pointer-events: none;
}

.risk-mode-selector.mode-aggressive .risk-mode-slider {
  transform: translateX(0);
  border-color: rgba(255, 140, 60, 0.84);
  box-shadow: 0 0 18px rgba(255, 140, 60, 0.34);
}

.risk-mode-selector.mode-conservative .risk-mode-slider {
  transform: translateX(calc(200% + 12px));
  border-color: rgba(53, 240, 194, 0.72);
  box-shadow: 0 0 16px rgba(53, 240, 194, 0.28);
}

.risk-mode-selector.mode-classic .risk-mode-slider {
  transform: translateX(calc(100% + 6px));
  border-color: rgba(232, 242, 255, 0.82);
  box-shadow: 0 0 16px rgba(214, 228, 250, 0.3);
}

.risk-mode-option {
  position: relative;
  z-index: 2;
  padding: 10px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  transition: color 180ms ease, text-shadow 200ms ease, border-color 180ms ease;
}

.risk-mode-option.aggressive {
  border-color: rgba(255, 140, 60, 0.26);
}

.risk-mode-option.conservative {
  border-color: rgba(53, 240, 194, 0.26);
}

.risk-mode-option.classic {
  border-color: rgba(234, 244, 255, 0.3);
}

.risk-mode-option.active {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.34);
}

.advanced-mm-section {
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(11, 15, 24, 0.7), rgba(8, 11, 19, 0.62));
  padding: 10px;
}

.advanced-mm-head {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  justify-items: center;
  text-align: center;
}

.advanced-mm-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: min(340px, 100%);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 224, 191, 0.92);
  cursor: pointer;
}

.advanced-mm-toggle-text {
  user-select: none;
}

.advanced-mm-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.advanced-mm-toggle input[type="checkbox"]:focus-visible {
  outline: none;
}

.advanced-mm-switch {
  position: relative;
  width: 84px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(50, 52, 58, 0.88), rgba(34, 36, 42, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 6px 14px rgba(0, 0, 0, 0.26);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.advanced-mm-switch::before {
  content: "OFF";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(235, 235, 235, 0.75);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.advanced-mm-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(253, 253, 253, 1), rgba(230, 230, 230, 1));
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s cubic-bezier(0.22, 0.75, 0.22, 1);
}

.advanced-mm-toggle input[type="checkbox"]:checked + .advanced-mm-switch {
  border-color: rgba(28, 208, 107, 0.84);
  background: linear-gradient(180deg, rgba(20, 214, 104, 0.95), rgba(10, 194, 90, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 7px 16px rgba(0, 0, 0, 0.3), 0 0 14px rgba(20, 214, 104, 0.25);
}

.advanced-mm-toggle input[type="checkbox"]:checked + .advanced-mm-switch::before {
  content: "ON";
  left: 12px;
  right: auto;
  color: rgba(7, 72, 31, 0.95);
}

.advanced-mm-toggle input[type="checkbox"]:checked + .advanced-mm-switch::after {
  transform: translateX(44px);
}

.advanced-mm-toggle input[type="checkbox"]:focus-visible + .advanced-mm-switch {
  outline: 2px solid rgba(97, 226, 255, 0.86);
  outline-offset: 2px;
}

.advanced-mm-helper {
  font-size: 11px;
  letter-spacing: 0.25px;
  color: rgba(206, 218, 236, 0.75);
}

.advanced-mm-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px 12px;
}

.advanced-mm-fields > label {
  font-size: 11px;
  letter-spacing: 1px;
}

.advanced-mm-fields.is-disabled {
  display: none;
}

.advanced-mm-error {
  margin-top: 8px;
  font-size: 11px;
  color: #ffb980;
  letter-spacing: 0.25px;
}

@media (max-width: 720px) {
  .risk-mode-option {
    font-size: 10px;
    letter-spacing: 0.8px;
    padding: 9px 6px;
  }

  .advanced-mm-fields {
    grid-template-columns: 1fr;
  }
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

input, select, button {
  padding: 10px;
  border-radius: 4px;
  background: #0d0f14;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: box-shadow 0.2s ease, border 0.2s ease, transform 0.08s ease;
}

select {
  background: #0d0f14;
  color: var(--text);
  border-color: #000000;
}

#mode {
  background-color: #000000;
  background-image: url("./hl.gif");
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 18px 18px;
  padding-left: 36px;
}

select option {
  background: #0d0f14;
  color: #ffffff;
}

.mode-native-hidden {
  display: none !important;
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mode-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 45%),
    rgba(12, 16, 24, 0.84);
  color: rgba(239, 245, 255, 0.9);
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.mode-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 24px rgba(3, 6, 12, 0.35);
}

.mode-card.active {
  border-color: rgba(95, 182, 255, 0.8);
  background:
    linear-gradient(150deg, rgba(95, 182, 255, 0.26), rgba(32, 64, 110, 0.3) 48%, rgba(12, 16, 24, 0.95)),
    rgba(12, 16, 24, 0.9);
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(95, 182, 255, 0.3),
    0 0 20px rgba(95, 182, 255, 0.24);
}

.mode-card:focus-visible {
  outline: none;
  border-color: rgba(255, 140, 60, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(255, 140, 60, 0.36),
    0 0 0 2px rgba(255, 140, 60, 0.18),
    0 0 18px rgba(255, 140, 60, 0.25);
}

.mode-card-logo {
  width: min(100%, 170px);
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.mode-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 720px) {
  .mode-card {
    min-height: 48px;
    padding: 8px 10px;
    font-size: 12px;
  }
}

input:focus, select:focus, button:focus-visible {
  outline: none;
  border-color: rgba(255, 140, 60, 0.7);
  box-shadow:
    inset 0 0 0 1px rgba(255, 140, 60, 0.3),
    inset 0 0 18px rgba(255, 140, 60, 0.22),
    0 0 0 2px rgba(255, 140, 60, 0.18),
    0 0 18px rgba(255, 140, 60, 0.25);
  background: radial-gradient(circle at 30% 30%, rgba(255, 140, 60, 0.12), rgba(13, 15, 20, 0.9));
}

input.clicked, select.clicked, button.clicked {
  animation: select-pulse 0.35s ease;
  background: radial-gradient(circle at 50% 50%, rgba(255, 140, 60, 0.12), rgba(13, 15, 20, 0.9));
}

@keyframes select-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(53,240,194,0.0); }
  50% { transform: scale(0.985); box-shadow: 0 0 18px rgba(53,240,194,0.35); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(53,240,194,0.0); }
}

label.focused {
  color: rgba(255, 255, 255, 0.98);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.42),
    0 0 20px rgba(255, 255, 255, 0.22);
}

.select-wrap {
  position: relative;
}

.market-inline-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: visible;
}

.market-token-label {
  position: relative;
  z-index: 12;
  margin: 0;
  width: min(360px, 100%);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 11px;
  color: rgba(220, 232, 250, 0.74);
  text-shadow: 0 0 10px rgba(120, 180, 255, 0.14);
}

.source-selector {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 6px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.source-slider {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc((100% - 32px) / 3);
  height: calc(100% - 12px);
  border-radius: 10px;
  background: rgba(20, 30, 46, 0.5);
  border: 2px solid rgba(95, 182, 255, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 20px rgba(95, 182, 255, 0.38);
  transform: translateX(0);
  transition: transform 260ms cubic-bezier(0.24, 0.77, 0.26, 1), border-color 220ms ease, box-shadow 220ms ease;
  pointer-events: none;
  z-index: 1;
}

.source-selector.mode-top20 .source-slider {
  transform: translateX(0);
  border-color: rgba(73, 224, 169, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(176, 255, 226, 0.2),
    0 0 22px rgba(73, 224, 169, 0.45);
}

.source-selector.mode-hip3 .source-slider {
  transform: translateX(calc(100% + 10px));
  border-color: rgba(95, 182, 255, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(214, 236, 255, 0.2),
    0 0 22px rgba(95, 182, 255, 0.44);
}

.source-selector.mode-xyz .source-slider {
  transform: translateX(calc(200% + 20px));
  border-color: rgba(255, 154, 66, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 221, 188, 0.2),
    0 0 22px rgba(255, 154, 66, 0.46);
}

.source-option {
  position: relative;
  z-index: 2;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 45%),
    rgba(12, 16, 24, 0.84);
  transition:
    transform 140ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.source-option:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 10px 24px rgba(3, 6, 12, 0.35);
}

.source-option.active {
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.12), rgba(28, 46, 78, 0.26) 48%, rgba(12, 16, 24, 0.9)),
    rgba(12, 16, 24, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.source-selector.mode-top20 .source-option[data-source="top20"].active {
  border-color: rgba(73, 224, 169, 0.78);
  background:
    linear-gradient(145deg, rgba(73, 224, 169, 0.2), rgba(16, 44, 34, 0.24) 52%, rgba(10, 18, 16, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(176, 255, 226, 0.16),
    0 0 14px rgba(73, 224, 169, 0.24);
}

.source-selector.mode-hip3 .source-option[data-source="hip3"].active {
  border-color: rgba(95, 182, 255, 0.8);
  background:
    linear-gradient(145deg, rgba(95, 182, 255, 0.2), rgba(20, 44, 74, 0.24) 52%, rgba(10, 16, 26, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(214, 236, 255, 0.16),
    0 0 14px rgba(95, 182, 255, 0.24);
}

.source-selector.mode-xyz .source-option[data-source="xyz"].active {
  border-color: rgba(255, 154, 66, 0.8);
  background:
    linear-gradient(145deg, rgba(255, 154, 66, 0.22), rgba(70, 38, 14, 0.24) 52%, rgba(24, 14, 8, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 221, 188, 0.15),
    0 0 14px rgba(255, 154, 66, 0.26);
}

.source-option:focus-visible {
  outline: none;
  border-color: rgba(255, 140, 60, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(255, 140, 60, 0.34),
    0 0 0 2px rgba(255, 140, 60, 0.16),
    0 0 16px rgba(255, 140, 60, 0.24);
}

.source-option img {
  width: min(100%, 170px);
  height: 30px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.source-option[data-source="top20"] img {
  height: 32px;
}

.source-option[data-source="hip3"] img {
  height: 28px;
}

.source-option[data-source="xyz"] img {
  height: 26px;
}

.source-selector.is-disabled .source-option {
  opacity: 0.5;
  pointer-events: none;
}

.source-native-hidden {
  display: none !important;
}

.market-token-label .token-select-wrap {
  position: relative;
  z-index: 20;
  margin-top: 6px;
  border-radius: 11px;
  border: 1px solid rgba(168, 207, 255, 0.26);
  background:
    linear-gradient(150deg, rgba(22, 28, 42, 0.68), rgba(10, 14, 22, 0.58) 56%),
    rgba(7, 10, 16, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 10px 22px rgba(2, 5, 12, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: visible;
}

.token-picker {
  position: relative;
  width: 100%;
  z-index: 21;
}

.token-picker-btn {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 44px 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #f3f8ff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-shadow: 0 0 12px rgba(168, 214, 255, 0.14);
}

.token-picker-btn:focus-visible {
  outline: none;
}

.token-picker-chevron {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 34px;
  height: calc(100% - 8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(220, 238, 255, 0.92);
  font-size: 16px;
  z-index: 3;
}

.token-picker-chevron:hover,
.token-picker-chevron:focus-visible {
  outline: none;
  color: #ffffff;
  background: rgba(120, 175, 240, 0.16);
}

.token-picker-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 120;
  border-radius: 11px;
  border: 1px solid rgba(168, 207, 255, 0.26);
  background:
    linear-gradient(160deg, rgba(12, 18, 30, 0.96), rgba(6, 10, 18, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 32px rgba(1, 4, 10, 0.55);
  overflow: hidden;
}

.token-picker-search {
  width: calc(100% - 12px);
  margin: 6px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(149, 190, 238, 0.34);
  background: rgba(8, 12, 20, 0.9);
  color: #eaf5ff;
  font-size: 14px;
}

.token-picker-list {
  max-height: 280px;
  overflow: auto;
  padding: 4px 0;
}

.token-picker-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #eaf4ff;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.15px;
}

.token-picker-item:hover,
.token-picker-item:focus-visible {
  outline: none;
  background: rgba(64, 129, 200, 0.22);
}

.token-picker-item.active {
  background: rgba(74, 142, 218, 0.3);
}

.token-native-hidden {
  display: none !important;
}

.market-token-label #market_symbol {
  width: 100%;
  min-height: 46px;
  padding: 10px 34px 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #f3f8ff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-shadow: 0 0 12px rgba(168, 214, 255, 0.14);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.market-token-label #market_symbol:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(98, 191, 255, 0.42);
}

.market-token-label .token-select-wrap:focus-within {
  border-color: rgba(95, 192, 255, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(95, 192, 255, 0.28),
    0 0 0 2px rgba(95, 192, 255, 0.15),
    0 0 18px rgba(95, 192, 255, 0.22);
}

.token-picker-btn.token-switch-anim {
  animation: token-switch-in 120ms ease;
}

@keyframes token-switch-in {
  0% {
    opacity: 0.65;
    transform: translateY(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .market-inline-row {
    width: 100%;
  }
  .source-selector {
    grid-template-columns: 1fr;
  }
}

/* Market selection: keep Source + Token on one row with fixed Source width */
body.main-space #market_panel .market-grid-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

body.main-space #market_panel .market-grid {
  /* Desktop: center the two selects as a compact group (align visually with the Notional "MAX" row). */
  width: 100%;
  max-width: 100%;
  justify-content: center;
  grid-template-columns: 260px minmax(320px, 520px);
  align-items: end;
  gap: 12px;
  position: relative;
  background: none;
}

@media (max-width: 720px) {
  body.main-space #market_panel .market-grid-wrap {
    display: block;
  }
  body.main-space #market_panel .market-grid {
    width: 100%;
    grid-template-columns: 1fr;
    background: none;
  }
}

body.main-space #market_panel label {
  margin: 0;
}

.select-wrap::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: var(--rx, 50%);
  top: var(--ry, 50%);
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 140, 60, 0.45), rgba(255, 140, 60, 0.0) 60%);
  opacity: 0;
  pointer-events: none;
}

.select-wrap.rippling::after {
  animation: ripple 0.6s ease;
}

@keyframes ripple {
  0% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(6); }
}



.actions {
  display: flex;
  gap: 12px;
}

.actions-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.actions-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.action-btn {
  width: min(100%, 196px);
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(132, 255, 220, 0.62);
  background:
    linear-gradient(135deg, rgba(122, 255, 217, 0.88), rgba(42, 232, 171, 0.84));
  color: #002019;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 22px rgba(29, 184, 136, 0.34),
    0 0 22px rgba(83, 255, 212, 0.4);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.action-btn > * {
  position: relative;
  z-index: 1;
}

.action-btn.stopped::before {
  content: "";
  position: absolute;
  top: -130%;
  left: -45%;
  width: 28%;
  height: 360%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(236, 255, 255, 0.75), rgba(255, 255, 255, 0));
  transform: translateX(-220%) rotate(18deg);
  opacity: 0;
  pointer-events: none;
  animation: connect-sweep 3s ease-in-out infinite;
  z-index: 0;
}

.action-btn.stopped:hover,
.action-btn.stopped:focus-visible {
  border-color: rgba(178, 255, 231, 0.9);
  background:
    linear-gradient(135deg, rgba(150, 255, 225, 0.96), rgba(52, 242, 180, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 12px 26px rgba(36, 198, 148, 0.44),
    0 0 28px rgba(106, 255, 220, 0.56);
  transform: translateY(-1px);
}

.action-btn-label {
  font-size: 15px;
  font-weight: 800;
}

.action-btn.running,
.action-btn.degraded {
  border-color: rgba(255, 154, 66, 0.62);
  background: linear-gradient(135deg, rgba(255, 164, 95, 0.94), rgba(236, 108, 48, 0.94));
  color: #1b0901;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 22px rgba(196, 104, 49, 0.34),
    0 0 16px rgba(255, 154, 66, 0.24);
}

.action-btn.running::before,
.action-btn.degraded::before,
.action-btn.loading::before {
  animation: none;
  opacity: 0;
}

.action-btn-spinner {
  display: none;
}

.action-btn.loading .action-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.22);
  border-top-color: rgba(0, 0, 0, 0.72);
  animation: btn-spin 0.7s linear infinite;
}

@media (max-width: 720px) {
  .actions-row {
    flex-direction: column;
  }
}

.state-badge {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
}

.state-badge.running {
  color: #0b2218;
  background: rgba(53, 240, 194, 0.8);
  box-shadow: 0 0 14px rgba(53, 240, 194, 0.5);
  animation: badge-blink 1.1s ease-in-out infinite;
}

.state-badge.stopped {
  color: #2a0a0a;
  background: rgba(255, 90, 90, 0.58);
  box-shadow: 0 0 10px rgba(255, 90, 90, 0.3);
}

@keyframes badge-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.btn {
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #1a1d25;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #14c9ff);
  color: #00131a;
  border-color: transparent;
  font-weight: 700;
  box-shadow: var(--glow);
}

#connect_continue {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

#connect_continue::before {
  content: "";
  position: absolute;
  top: -130%;
  left: -45%;
  width: 28%;
  height: 360%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(236, 255, 255, 0.75), rgba(255, 255, 255, 0));
  transform: translateX(-220%) rotate(18deg);
  opacity: 0;
  pointer-events: none;
  animation: connect-sweep 3s ease-in-out infinite;
  z-index: 0;
}

#connect_continue > * {
  position: relative;
  z-index: 1;
}

#connect_continue.loading::before,
#connect_continue:disabled::before {
  animation: none;
  opacity: 0;
}

@keyframes connect-sweep {
  0%, 64% {
    transform: translateX(-220%) rotate(18deg);
    opacity: 0;
  }
  70% {
    opacity: 0.05;
  }
  76% {
    opacity: 0.78;
  }
  88%,
  100% {
    transform: translateX(420%) rotate(18deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .subtitle-pill {
    animation: none;
    opacity: 1;
    transform: none;
  }
  #connect_continue::before {
    animation: none;
    opacity: 0;
  }
}

.btn.loading {
  cursor: wait;
  opacity: 0.92;
}

.btn.loading::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(0, 19, 26, 0.25);
  border-top-color: rgba(0, 19, 26, 0.9);
  animation: btn-spin 0.7s linear infinite;
  vertical-align: -1px;
}

@keyframes btn-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn.danger {
  background: var(--danger);
  border-color: transparent;
  color: #1a0000;
  font-weight: 700;
}

#start_bot {
  background: linear-gradient(135deg, #2f7bff, #24b4ff);
  border-color: transparent;
  color: #041126;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(47, 123, 255, 0.35);
}

.status {
  margin-top: 10px;
  color: var(--muted);
}

.form-error {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 92, 92, 0.5);
  background: rgba(50, 8, 8, 0.35);
  color: #ff9f9f;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.logs {
  background: #0b0e13;
  color: #a7f3d0;
  height: 260px;
  overflow: auto;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.stat {
  background: linear-gradient(160deg, rgba(18, 22, 34, 0.82), rgba(10, 13, 22, 0.72));
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 2px solid rgba(92, 140, 255, 0.45);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
}

.stat:hover {
  border-color: rgba(255,255,255,0.18);
  border-top-color: rgba(92, 140, 255, 0.75);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(92, 140, 255, 0.08);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
  line-height: 1.4;
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
  margin-top: 0;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.92);
}

.table {
  margin-top: 8px;
  border: 1px solid rgba(92, 140, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
  transition: background 150ms ease;
}

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

.row:not(.header):hover {
  background: rgba(92, 140, 255, 0.06);
}

.row:not(.header):nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.row:not(.header):nth-child(even):hover {
  background: rgba(92, 140, 255, 0.06);
}

.row.header {
  background: linear-gradient(90deg, rgba(92, 140, 255, 0.1), rgba(8, 10, 18, 0.8));
  border-bottom: 1px solid rgba(92, 140, 255, 0.2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 10px;
  color: rgba(180, 200, 255, 0.7);
}

.row-history {
  grid-template-columns: 1.4fr 0.7fr 0.8fr 1fr 0.8fr 0.7fr 0.7fr;
}

/* Alignement explicite toutes colonnes — header ET data alignés ensemble */
.row-history > div:nth-child(1),
.row-history > div:nth-child(3),
.row-history > div:nth-child(4) {
  text-align: left;
}

.row-history > div:nth-child(2),
.row-history > div:nth-child(5),
.row-history > div:nth-child(6),
.row-history > div:nth-child(7) {
  text-align: right;
}

/* Monospace pour les dates — data rows uniquement, pas le header */
.row-history:not(.header) > div:first-child {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: rgba(220, 230, 255, 0.7);
}

.history-empty {
  padding: 18px 14px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  text-align: center;
}

.temp-debug-panel {
  margin-top: 10px;
}

.temp-pnl-logs {
  margin: 0;
  min-height: 140px;
  max-height: 260px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid rgba(92, 140, 255, 0.2);
  background: rgba(8, 12, 22, 0.72);
  color: rgba(185, 222, 255, 0.9);
  padding: 10px 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.fees-neg {
  color: #ffaa55;
  text-shadow: 0 0 12px rgba(255, 160, 70, 0.4);
}

.pnl-pos {
  color: #35f0c2;
  text-shadow: 0 0 18px rgba(53, 240, 194, 0.5);
}

.pnl-neg {
  color: #ff5c5c;
  text-shadow: 0 0 18px rgba(255, 92, 92, 0.5);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.btn.pressing {
  animation: btn-press 170ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

@keyframes btn-press {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(1px) scale(0.97); }
  100% { transform: translateY(0) scale(1); }
}
