/* ==========================================================================
   WidgetExamples Living Canvas — New Fullscreen Responsive Experience
   Dynamic Theming, Movable Floating Environment Orb & Glassmorphism Panel
   ========================================================================== */

/* Fullscreen Core Viewport & Page Scrolling */
html {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  font-family: var(--we-font-sans);
  background: var(--we-bg);
  color: var(--we-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--we-bg);
  color: var(--we-ink);
  line-height: 1.6;
  transition: background var(--we-trans-speed) cubic-bezier(0.16, 1, 0.3, 1),
              color var(--we-trans-speed) cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top Site Header — Colors according to theme primary color */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 60px;
  background: var(--we-primary);
  background-image: linear-gradient(135deg, var(--we-primary) 0%, rgba(255, 255, 255, 0.12) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px var(--we-primary-glow);
  transition: background var(--we-trans-speed) ease, box-shadow var(--we-trans-speed) ease;
}

.site-header .header-inner {
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
}

.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-right: auto;
}

.site-header .header-actions {
  margin-left: auto;
}

/* Ensure header content is high contrast on primary color */
.site-header .brand-title {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.15;
}

.site-header .brand-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 9.5px;
  letter-spacing: 0.8px;
}

.site-header .brand-mark {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.site-header .brand-mark-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: block;
  object-fit: cover;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header .brand-group:hover .brand-mark-img {
  transform: scale(1.08);
}

.site-header .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-header .nav-link:hover {
  color: #ffffff;
}

.site-header .nav-link.active {
  color: #ffffff;
  font-weight: 800;
}

.site-header .nav-link.active::after {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.site-header .btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  padding: 7px 15px;
  font-size: 12px;
}

.site-header .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.site-header .btn-gradient {
  background: #ffffff;
  color: var(--we-primary);
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header .btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: #ffffff;
}

/* Master Canvas Stage Attached Below Header */
.canvas-fullscreen-stage {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  min-height: 580px;
  overflow: hidden;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}

/* Setup Hub Wrapper & Page Flow Below Canvas */
.setup-hub-wrapper {
  position: relative;
  width: 100%;
  background: var(--we-bg);
  padding: 48px 0 64px;
  transition: background var(--we-trans-speed) cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  user-select: text;
  -webkit-user-select: text;
}

.setup-hub-wrapper .container {
  max-width: var(--we-max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* Scroll Cue Button at Bottom of Living Canvas */
.hero-scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: var(--we-surface-trans, rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--we-line, rgba(255, 255, 255, 0.85));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  border-radius: var(--we-radius-full);
  color: var(--we-ink, #1e293b);
  font-family: var(--we-font-heading);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  animation: scrollCueBob 2.4s ease-in-out infinite;
}

.hero-scroll-cue .scroll-cue-text {
  color: var(--we-ink, #1e293b);
  transition: color 0.2s ease;
}

.hero-scroll-cue:hover {
  background: var(--we-surface-hover, #ffffff);
  color: var(--we-primary);
  border-color: var(--we-line-focus, var(--we-primary));
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 12px 36px var(--we-primary-glow);
}

.hero-scroll-cue:hover .scroll-cue-text {
  color: var(--we-primary);
}

/* Dark Mode & Night Environment Support */
body[data-environment="night"] .hero-scroll-cue,
html.dark .hero-scroll-cue,
body.dark .hero-scroll-cue,
[data-theme="dark"] .hero-scroll-cue {
  background: var(--we-surface-trans) !important;
  border: 1px solid rgba(93, 132, 220, 0.4) !important;
  color: var(--we-ink) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55), 0 0 20px rgba(93, 132, 220, 0.28) !important;
}

body[data-environment="night"] .hero-scroll-cue .scroll-cue-text,
html.dark .hero-scroll-cue .scroll-cue-text,
body.dark .hero-scroll-cue .scroll-cue-text,
[data-theme="dark"] .hero-scroll-cue .scroll-cue-text {
  color: #f0f4fd !important;
}

body[data-environment="night"] .hero-scroll-cue:hover,
html.dark .hero-scroll-cue:hover,
body.dark .hero-scroll-cue:hover,
[data-theme="dark"] .hero-scroll-cue:hover {
  background: var(--we-surface-hover) !important;
  border-color: #7b9fed !important;
  color: #ffffff !important;
  box-shadow: 0 12px 36px rgba(93, 132, 220, 0.45) !important;
}

body[data-environment="night"] .hero-scroll-cue:hover .scroll-cue-text,
html.dark .hero-scroll-cue:hover .scroll-cue-text,
body.dark .hero-scroll-cue:hover .scroll-cue-text,
[data-theme="dark"] .hero-scroll-cue:hover .scroll-cue-text {
  color: #ffffff !important;
}

.scroll-cue-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--we-primary);
  box-shadow: 0 0 10px var(--we-primary);
}

.scroll-cue-arrow {
  font-size: 14px;
  font-weight: 800;
  color: var(--we-primary);
  transition: transform 0.2s ease;
}

.hero-scroll-cue:hover .scroll-cue-arrow {
  transform: translateY(2px);
}


@keyframes scrollCueBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

@media (max-width: 768px) {
  .hero-scroll-cue {
    bottom: 14px;
    padding: 7px 14px;
    font-size: 11.5px;
  }
}

/* ==========================================================================
   AUTO-SCROLLING LIVING CANVAS FEATURE SHOWCASE CARDS (DOCK MARQUEE)
   ========================================================================== */
.hero-marquee-wrapper {
  position: absolute;
  bottom: 86px;
  left: 0;
  width: 100%;
  overflow: hidden;
  z-index: 18;
  padding: 8px 0;
  pointer-events: auto;
  mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}

.hero-marquee-inner {
  display: flex;
  width: max-content;
  gap: 24px;
}

.hero-marquee-group {
  display: flex;
  align-items: center;
  gap: 24px;
  animation: heroMarqueeScroll 36s linear infinite;
  will-change: transform;
}

.hero-marquee-wrapper:hover .hero-marquee-group {
  animation-play-state: paused;
}

@keyframes heroMarqueeScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 24px));
  }
}

.hero-nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 310px;
  min-width: 310px;
  height: 86px;
  padding: 13px 18px;
  border-radius: 20px;
  text-decoration: none;
  background: var(--we-surface-trans, rgba(255, 255, 255, 0.92));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--we-line, rgba(255, 255, 255, 0.85));
  box-shadow: var(--we-card-shadow, 0 16px 45px rgba(0, 0, 0, 0.12)), 0 4px 18px rgba(0, 0, 0, 0.06);
  color: var(--we-ink, #1e293b);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.hero-nav-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: var(--we-surface-hover, #ffffff);
  border-color: var(--we-line-focus, var(--we-primary));
  box-shadow: 0 18px 42px var(--we-primary-glow, rgba(99, 102, 241, 0.3)), 0 6px 20px rgba(0, 0, 0, 0.1);
}

.hero-card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.hero-nav-card:hover .hero-card-icon-wrap {
  transform: scale(1.12) rotate(4deg);
}

.hero-card-icon-wrap.icon-setup {
  background: rgba(16, 185, 129, 0.16);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.hero-card-icon-wrap.icon-ai {
  background: rgba(6, 182, 212, 0.16);
  border: 1.5px solid rgba(6, 182, 212, 0.35);
  color: #06b6d4;
}

.hero-card-icon-wrap.icon-tools {
  background: rgba(245, 158, 11, 0.16);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  color: #d97706;
}

.hero-card-icon-wrap.icon-blog {
  background: rgba(168, 85, 247, 0.16);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  color: #9333ea;
}

.hero-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.hero-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.hero-card-tag {
  font-size: 10px;
  font-family: var(--we-font-mono, monospace);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--we-ink-muted, #64748b);
}

.hero-card-action-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.hero-card-action-pill.pill-scroll {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

.hero-card-action-pill.pill-nav {
  background: rgba(99, 102, 241, 0.14);
  color: #4f46e5;
}

.hero-nav-card:hover .hero-card-action-pill.pill-scroll {
  background: #10b981;
  color: #ffffff;
}

.hero-nav-card:hover .hero-card-action-pill.pill-nav {
  background: var(--we-primary, #6366f1);
  color: #ffffff;
}

.hero-card-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--we-ink, #0f172a);
}

.hero-card-desc {
  font-size: 11.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--we-ink-secondary, #475569);
  opacity: 0.9;
}

/* Specific Environment Night Theme (Deep Cosmic Starlight) */
html.dark body .hero-nav-card {
  background: var(--we-surface-trans);
  border: 1.5px solid color-mix(in srgb, var(--we-primary) 40%, transparent);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), 0 0 20px color-mix(in srgb, var(--we-primary) 22%, transparent);
  color: var(--we-ink);
}

html.dark body .hero-nav-card:hover {
  background: var(--we-surface-hover);
  border-color: var(--we-accent-ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.7), 0 0 28px color-mix(in srgb, var(--we-accent-ink) 40%, transparent);
}

html.dark body .hero-card-title {
  color: var(--we-ink);
}

html.dark body .hero-card-desc {
  color: var(--we-ink-secondary);
}

html.dark body .hero-card-tag {
  color: var(--we-ink-muted);
}

html.dark body .hero-card-action-pill.pill-scroll {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
}

html.dark body .hero-card-action-pill.pill-nav {
  background: rgba(129, 140, 248, 0.22);
  color: #a5b4fc;
}

/* Offset Target Anchors for Fixed Header */
#setup-hub,
#ai-setup-lab {
  scroll-margin-top: 70px;
}

@media (max-width: 768px) {
  .hero-marquee-wrapper {
    bottom: 64px;
    padding: 6px 0;
  }
  .hero-marquee-inner {
    gap: 16px;
  }
  .hero-marquee-group {
    gap: 16px;
  }
  .hero-nav-card {
    width: 260px;
    min-width: 260px;
    height: 74px;
    padding: 10px 12px;
    gap: 12px;
  }
  .hero-card-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border-radius: 12px;
  }
  .hero-card-title {
    font-size: 12.5px;
  }
  .hero-card-desc {
    font-size: 10.5px;
  }
}

.canvas-fullscreen-stage .scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  isolation: isolate;
  background: #000000;
}

/* Background Artwork Layers */
.canvas-fullscreen-stage .bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.canvas-fullscreen-stage .environment-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.canvas-fullscreen-stage .environment-bg.visible {
  opacity: 1;
}

/* Swing Rigging SVG - perfectly scaled via slice to match object-fit: cover */
.canvas-fullscreen-stage .swing-rig {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
  transition: filter 800ms ease;
}

/* Parallax Cloud Layers */
.canvas-fullscreen-stage .cloud-layer {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  z-index: 2;
  transition: filter 800ms ease, opacity 800ms ease;
}

.canvas-fullscreen-stage .cloud-layer.near {
  width: 120%;
  left: -10%;
  bottom: 12%;
  opacity: 0.18;
  filter: blur(1px);
  mask-image: linear-gradient(transparent, #000 25%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 70%, transparent);
}

.canvas-fullscreen-stage .cloud-layer.far {
  width: 90%;
  right: -20%;
  top: 30%;
  opacity: 0.09;
  filter: blur(2px);
  mask-image: linear-gradient(transparent, #000 30%, #000 65%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 65%, transparent);
}

/* Fullscreen Particle Canvas */
.canvas-fullscreen-stage .particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

/* Right-aligned HUD telemetry and badge group */
.hud-top-right-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

/* ==========================================================================
   MINIMALIST FLOATING HUD (Top Bar & Bottom Brand Badge)
   ========================================================================== */
.top-hud-bar {
  position: fixed;
  top: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  pointer-events: none;
}

.hud-pill-group {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hud-glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--we-surface-trans);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-full);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  color: var(--we-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-glass-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px var(--we-primary-glow);
  border-color: var(--we-line-focus);
}

.hud-glass-pill .brand-w {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--we-accent-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
}

.live-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseLive 2s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ==========================================================================
   MOVABLE FLOATING ENVIRONMENT ORB (Draggable Anywhere on Screen)
   ========================================================================== */
.floating-env-orb {
  position: fixed;
  z-index: 1000;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  will-change: transform, left, top;
}

.floating-env-orb:active,
.floating-env-orb.is-dragging {
  cursor: grabbing;
  transform: scale(1.12);
  transition: none;
}

/* Orb Outer Dynamic Chromatic Ring */
.orb-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6), var(--c1)
  );
  animation: rotateOrbRing 12s linear infinite;
  box-shadow: 0 0 24px var(--we-primary-glow), 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.5s ease;
}

@keyframes rotateOrbRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Inner Orb Surface */
.orb-core {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--we-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.55s ease, border-color 0.55s ease;
  overflow: hidden;
}

.orb-env-icon {
  font-size: 22px;
  line-height: 1;
  transform: translateY(-1px);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-env-orb:hover .orb-env-icon {
  transform: translateY(-2px) scale(1.15);
}

/* Mini 6-tone color indicator bar inside orb */
.orb-mini-palette {
  display: flex;
  gap: 2.5px;
  margin-top: 3px;
}

.orb-palette-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transition: background 0.55s ease;
}

/* Tooltip Badge Attached to Orb */
.orb-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  background: var(--we-surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--we-line);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
  color: var(--we-ink);
  padding: 6px 12px;
  border-radius: var(--we-radius-full);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.orb-tooltip .drag-badge {
  font-size: 10px;
  color: var(--we-ink-muted);
  font-weight: 500;
}

.floating-env-orb:hover .orb-tooltip,
.floating-env-orb.show-hint .orb-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Position tooltip downwards if orb is too close to top edge */
.floating-env-orb.tooltip-below .orb-tooltip {
  bottom: auto;
  top: calc(100% + 10px);
}

/* ==========================================================================
   FLOATING ENVIRONMENTS PANEL (Opened when clicking the floating orb)
   ========================================================================== */
.floating-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.floating-panel-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.floating-env-panel {
  position: fixed;
  z-index: 1100;
  width: 410px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  background: var(--we-surface-trans);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), 0 0 30px var(--we-primary-glow);
  color: var(--we-ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92) translateY(12px);
  transform-origin: center center;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.55s ease,
              box-shadow 0.55s ease;
}

.floating-env-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

/* Panel Header */
.panel-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--we-line);
  background: rgba(255, 255, 255, 0.05);
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--we-font-heading);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.panel-header-title .pulse-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--we-primary);
  box-shadow: 0 0 8px var(--we-primary);
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auto-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--we-ink-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--we-radius-sm);
  background: var(--we-surface);
  border: 1px solid var(--we-line);
  transition: all 0.2s ease;
}

.auto-toggle-label:hover {
  border-color: var(--we-primary);
}

.auto-toggle-label input {
  cursor: pointer;
  accent-color: var(--we-primary);
}

.panel-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--we-line);
  background: var(--we-surface);
  color: var(--we-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-close-btn:hover {
  background: var(--we-primary);
  color: #ffffff;
  border-color: var(--we-primary);
  transform: rotate(90deg);
}

/* Panel Body & Tabs */
.panel-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 150px);
}

/* Custom Scrollbar for Panel */
.panel-body::-webkit-scrollbar {
  width: 6px;
}
.panel-body::-webkit-scrollbar-track {
  background: transparent;
}
.panel-body::-webkit-scrollbar-thumb {
  background: var(--we-line);
  border-radius: 4px;
}
.panel-body::-webkit-scrollbar-thumb:hover {
  background: var(--we-primary);
}

/* Environments List in Panel */
.panel-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--we-ink-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.env-card-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Environment Card */
.panel-env-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--we-radius-md);
  border: 1px solid var(--we-line);
  background: var(--we-surface-card);
  color: var(--we-ink);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
}

.panel-env-card:hover {
  border-color: var(--we-line-focus);
  background: var(--we-surface-hover);
  transform: translateX(3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.panel-env-card.active {
  border-color: var(--we-primary);
  background: var(--we-primary-light);
  box-shadow: 0 4px 18px var(--we-primary-glow);
  transform: translateX(4px);
}

.panel-env-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-env-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--we-surface);
  border: 1px solid var(--we-line);
  transition: all 0.2s ease;
}

.panel-env-card.active .panel-env-icon {
  background: var(--we-primary);
  color: #ffffff;
  border-color: var(--we-primary);
  box-shadow: 0 0 10px var(--we-primary-glow);
}

.panel-env-meta {
  display: flex;
  flex-direction: column;
}

.panel-env-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
}

.panel-env-sub {
  font-size: 11px;
  color: var(--we-ink-secondary);
}

.panel-env-palette {
  display: flex;
  gap: 3px;
  align-items: center;
}

.panel-palette-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Palette Swatches Container in Panel */
.palette-swatches-box {
  background: var(--we-surface-card);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.swatch-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--we-radius-sm);
  background: var(--we-surface);
  border: 1px solid var(--we-line);
  color: var(--we-ink);
  font-family: var(--we-font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.swatch-chip:hover {
  border-color: var(--we-primary);
  transform: translateY(-1px);
}

.swatch-color-bubble {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

/* Motion Controls Inside Panel */
.panel-controls-box {
  background: var(--we-surface-card);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 600;
}

.control-slider {
  flex: 1;
  accent-color: var(--we-primary);
  cursor: pointer;
}

.toggles-row {
  display: flex;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--we-line);
}

.panel-toggle-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--we-ink-secondary);
  cursor: pointer;
}

.panel-toggle-item input {
  accent-color: var(--we-primary);
}

/* Panel Buttons Row */
.panel-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.panel-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--we-radius-md);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid var(--we-line);
  background: var(--we-surface);
  color: var(--we-ink);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-btn:hover {
  border-color: var(--we-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.panel-btn-primary {
  background: var(--we-accent-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 16px var(--we-primary-glow);
}

.panel-btn-primary:hover {
  box-shadow: 0 8px 24px var(--we-primary-glow);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .top-hud-bar {
    top: 10px;
    left: 10px;
    right: 10px;
  }
  .hud-glass-pill {
    padding: 6px 10px;
    font-size: 11px;
  }
  .floating-env-panel {
    width: calc(100vw - 20px);
    left: 10px !important;
    right: 10px !important;
    bottom: 20px !important;
    top: auto !important;
    max-height: 80vh;
  }
  .swatches-pills-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   FAQ MODAL DRAWER
   ========================================================================== */
.faq-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.faq-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.faq-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 1250;
  width: 580px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  background: var(--we-surface-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 30px var(--we-primary-glow);
  color: var(--we-ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.faq-modal-header {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--we-line);
}

.faq-modal-header h3 {
  margin: 0;
  font-family: var(--we-font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--we-ink);
}

.faq-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-card-item {
  background: var(--we-surface);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-md);
  padding: 14px 16px;
  transition: border-color 0.2s ease;
}

.faq-card-item:hover {
  border-color: var(--we-primary);
}

.faq-card-question {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--we-ink);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-card-answer {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--we-ink-secondary);
}

/* ==========================================================================
   HEADER ACTIONS & USER PROFILE MENUBAR DROPDOWN
   ========================================================================== */
.site-header .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(35deg) scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.profile-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.profile-avatar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.profile-avatar-btn:hover {
  transform: scale(1.08);
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-online-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px #22c55e;
}

/* Profile Menubar Dropdown Menu */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-lg);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
  padding: 12px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

html.dark body .profile-dropdown-menu {
  background: rgba(20, 24, 38, 0.96);
  border-color: rgba(255, 255, 255, 0.15);
}

.profile-dropdown-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 10px;
}

.dropdown-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--we-primary);
  flex-shrink: 0;
}

.dropdown-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-user-meta {
  flex: 1;
  min-width: 0;
}

.dropdown-user-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--we-ink);
  line-height: 1.2;
}

.dropdown-user-email {
  font-size: 11px;
  color: var(--we-ink-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-tier-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--we-radius-full);
  background: var(--we-primary-light);
  color: var(--we-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-divider {
  height: 1px;
  background: var(--we-line);
  margin: 6px 0;
}

.dropdown-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--we-radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--we-ink);
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.dropdown-item:hover {
  background: var(--we-primary-light);
  color: var(--we-primary);
  transform: translateX(2px);
}

.dropdown-item.logout-item:hover {
  background: #fef2f2;
  color: #ef4444;
}

.dropdown-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--we-radius-full);
  background: var(--we-primary);
  color: #ffffff;
}

/* ==========================================================================
   FLOATING SPEED DIAL (Exact High-Fidelity Match to User Screenshot)
   ========================================================================== */
.speed-dial-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.speed-dial-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.floating-speed-dial-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
}

.speed-dial-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
}

/* Pure White Capsule Pills from user image */
.fab-pill {
  pointer-events: none;
  background: #ffffff;
  color: #1e1e2d;
  font-family: var(--we-font-sans);
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 26px;
  border-radius: 9999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.fab-pill-icon {
  font-size: 18px;
  line-height: 1;
  color: #e01083; /* vibrant magenta matching user screenshot */
  filter: drop-shadow(0 1px 2px rgba(224, 16, 131, 0.3));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fab-pill-text {
  letter-spacing: -0.2px;
}

.fab-pill:hover {
  transform: translateX(-4px) scale(1.02);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.fab-pill:active {
  transform: translateX(-2px) scale(0.98);
}

/* Open State - Staggered Cascade Animation */
.floating-speed-dial-container.open .fab-pill {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.floating-speed-dial-container.open #pillWallpaper  { transition-delay: 0.02s; }
.floating-speed-dial-container.open .fab-theme-selector-group { transition-delay: 0.05s; }
.floating-speed-dial-container.open #pillVoice      { transition-delay: 0.08s; }
.floating-speed-dial-container.open #pillEntry      { transition-delay: 0.11s; }
.floating-speed-dial-container.open #pillBookmark   { transition-delay: 0.14s; }

/* Quick 8-Theme Strip in Speed Dial */
.fab-theme-selector-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.floating-speed-dial-container.open .fab-theme-selector-group {
  pointer-events: auto;
}

.speed-dial-theme-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-speed-dial-container.open .speed-dial-theme-strip {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: 0.04s;
}

.theme-strip-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.theme-strip-chip:hover {
  transform: scale(1.22);
  z-index: 10;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.theme-strip-chip.selected {
  transform: scale(1.15);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px var(--we-primary), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.theme-strip-chip.selected::after {
  content: '✓';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffffff;
}

.fab-selected-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(34, 197, 94, 0.16);
  color: #16a34a;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.fab-mini-palette {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 2px;
}

.fab-palette-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Settings Modal Theme Selector Grid */
.settings-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 540px) {
  .settings-theme-grid {
    grid-template-columns: 1fr;
  }
}

.settings-theme-card {
  background: var(--we-surface);
  border: 2px solid var(--we-line);
  border-radius: var(--we-radius-md);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  text-align: left;
}

.settings-theme-card:hover {
  border-color: var(--we-line-focus);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.settings-theme-card.selected {
  border-color: var(--we-primary);
  background: var(--we-primary-light);
  box-shadow: 0 0 0 1px var(--we-primary), 0 6px 20px var(--we-primary-glow);
}

.settings-theme-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-theme-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-theme-icon {
  font-size: 16px;
  line-height: 1;
}

.settings-theme-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--we-ink);
}

.settings-theme-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9999px;
  background: #22c55e;
  color: #ffffff;
  display: none;
}

.settings-theme-card.selected .settings-theme-badge {
  display: inline-block;
}

.settings-theme-sub {
  font-size: 11px;
  color: var(--we-ink-secondary);
  line-height: 1.2;
}

.settings-theme-palette {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.settings-palette-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.theme-active-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--we-primary-light);
  color: var(--we-primary);
  border: 1px solid var(--we-primary-glow);
}

/* Circular FAB Trigger Button (Magenta with '✕' when active) */
.fab-trigger-btn {
  pointer-events: auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  background: #e01083;
  background-image: linear-gradient(135deg, #e01083 0%, #c41276 100%);
  box-shadow: 0 10px 28px rgba(224, 16, 131, 0.48), 0 3px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  padding: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

.fab-trigger-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 36px rgba(224, 16, 131, 0.6);
}

.fab-trigger-btn:active {
  transform: scale(0.94);
}

.fab-trigger-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fab-icon-idle,
.fab-icon-close {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease;
}

.fab-icon-idle {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.fab-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
}

/* Morph to White Cross when open */
.floating-speed-dial-container.open .fab-icon-idle {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}

.floating-speed-dial-container.open .fab-icon-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ==========================================================================
   MODAL DIALOGS (Settings, Entry, Voice)
   ========================================================================== */
.modal-backdrop-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

.app-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: 92%;
  max-width: 540px;
  max-height: 88vh;
  background: var(--we-surface-card);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  z-index: 1060;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-modal.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.app-modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--we-line);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-icon {
  font-size: 22px;
}

.app-modal-header h3 {
  margin: 0;
  font-family: var(--we-font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--we-ink);
}

.modal-subtitle {
  font-size: 11.5px;
  color: var(--we-ink-secondary);
  display: block;
  margin-top: 2px;
}

.app-modal-body {
  padding: 20px 24px 28px 24px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--we-line-focus) transparent;
}

.app-modal-body::-webkit-scrollbar {
  width: 6px;
}
.app-modal-body::-webkit-scrollbar-thumb {
  background: var(--we-line-focus);
  border-radius: 9999px;
}

.settings-group {
  background: var(--we-surface);
  border: 1px solid var(--we-line);
  border-radius: var(--we-radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.settings-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.settings-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--we-ink);
  display: block;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-toggle-row p {
  font-size: 12px;
  color: var(--we-ink-secondary);
  margin: 2px 0 0;
}

/* Switch Control */
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--we-line);
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-control input:checked + .switch-slider {
  background-color: var(--we-primary);
}

.switch-control input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* Form inputs in modal */
.app-input-text {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--we-radius-md);
  border: 1px solid var(--we-line);
  background: var(--we-surface);
  color: var(--we-ink);
  font-family: inherit;
  font-size: 13.5px;
  box-sizing: border-box;
}

.app-input-text:focus {
  outline: none;
  border-color: var(--we-primary);
  box-shadow: 0 0 0 3px var(--we-primary-glow);
}

/* Voice Waveform Animation */
.voice-waveform-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 60px;
  padding: 10px 0;
}

.voice-bar {
  width: 6px;
  height: 14px;
  background: #e01083;
  border-radius: 3px;
  transition: height 0.15s ease;
}

.voice-waveform-box.active .voice-bar {
  animation: voiceWave 1.2s ease-in-out infinite;
}

.voice-waveform-box.active .voice-bar:nth-child(2) { animation-delay: 0.1s; }
.voice-waveform-box.active .voice-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-waveform-box.active .voice-bar:nth-child(4) { animation-delay: 0.3s; }
.voice-waveform-box.active .voice-bar:nth-child(5) { animation-delay: 0.4s; }
.voice-waveform-box.active .voice-bar:nth-child(6) { animation-delay: 0.3s; }
.voice-waveform-box.active .voice-bar:nth-child(7) { animation-delay: 0.2s; }
.voice-waveform-box.active .voice-bar:nth-child(8) { animation-delay: 0.1s; }

@keyframes voiceWave {
  0%, 100% { height: 10px; }
  50% { height: 46px; }
}

/* ==========================================================================
   DEVELOPER SETUP HUB & PC PREFLIGHT MATRIX — 100% ENVIRONMENT-REACTIVE
   Inherits full 8-environment sky palette, glass surfaces & chromatic tokens
   ========================================================================== */

.setup-hub-wrapper {
  position: relative;
  background: var(--we-bg);
  color: var(--we-ink);
  padding: 0 0 80px;
  overflow: hidden;
  transition: background var(--we-trans-speed) cubic-bezier(0.16, 1, 0.3, 1),
              color var(--we-trans-speed) cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-ambient-bg-1 {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, var(--we-primary-glow) 0%, var(--we-primary-light) 40%, transparent 70%);
  animation: ambientPulse 8s ease-in-out infinite alternate;
  z-index: 0;
  opacity: 0.65;
}

.hub-ambient-bg-2 {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 80% 90%, var(--we-primary-glow) 0%, transparent 60%);
  animation: ambientPulse2 10s ease-in-out infinite alternate;
  z-index: 0;
  opacity: 0.5;
}

.hub-mesh-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, var(--we-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--we-line) 1px, transparent 1px);
  z-index: 0;
  opacity: 0.45;
}

@keyframes ambientPulse {
  0% { transform: scale(1) translateY(0); opacity: 0.7; }
  100% { transform: scale(1.08) translateY(15px); opacity: 0.95; }
}

@keyframes ambientPulse2 {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.12); opacity: 0.8; }
}

/* Setup Hub Header & Topbar */
.setup-hub-wrapper header {
  background: var(--we-surface-trans) !important;
  border-bottom: 1px solid var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  transition: background var(--we-trans-speed) ease, border-color var(--we-trans-speed) ease;
}

.setup-hub-wrapper header .text-slate-400,
.setup-hub-wrapper header .text-slate-300 {
  color: var(--we-ink-secondary) !important;
}

.setup-hub-wrapper header strong.text-white {
  color: var(--we-ink) !important;
}

.setup-hub-wrapper header .bg-white\/\[0\.03\] {
  background: var(--we-surface) !important;
  border-color: var(--we-line) !important;
  color: var(--we-ink) !important;
}

/* Hero Section */
.setup-hub-wrapper #setup-hub-title {
  color: var(--we-ink) !important;
  background: linear-gradient(135deg, var(--we-ink) 0%, var(--we-primary) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block !important;
  line-height: 1.25 !important;
  padding-bottom: 0.22em !important;
}

.setup-hub-wrapper p {
  color: var(--we-ink-secondary) !important;
}

/* Feature Navigation Tabs */
.setup-hub-wrapper #navTabsContainer {
  background: var(--we-surface-card) !important;
  border: 1px solid var(--we-line) !important;
  box-shadow: var(--we-card-shadow) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.setup-hub-wrapper .nav-tab-btn {
  color: var(--we-ink-secondary) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  transition: all 0.25s ease;
}

.setup-hub-wrapper .nav-tab-btn:hover {
  color: var(--we-ink) !important;
  background: var(--we-surface-hover) !important;
}

.setup-hub-wrapper .nav-tab-btn.theme-active-tab {
  background: var(--we-accent-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px var(--we-primary-glow) !important;
  border: 1px solid transparent !important;
}

/* Spotlight Card / Wizard Container */
.setup-hub-wrapper .spotlight-card {
  position: relative;
  background: var(--we-surface-card) !important;
  border: 1px solid var(--we-line) !important;
  box-shadow: var(--we-card-shadow) !important;
  color: var(--we-ink) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  transition: background var(--we-trans-speed) ease, border-color var(--we-trans-speed) ease, box-shadow var(--we-trans-speed) ease;
}

/* Soft & Light Mouse Hover Radiant Glow */
.setup-hub-wrapper .spotlight-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(750px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), color-mix(in srgb, var(--we-primary) 8%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: 1;
}

.setup-hub-wrapper .spotlight-card:hover::before {
  opacity: 1;
}

/* Left Column / Stepper Timeline */
.setup-hub-wrapper aside {
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper aside .border-b {
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper aside h3 {
  color: var(--we-ink) !important;
}

.setup-hub-wrapper aside .bg-surface-700\/60 {
  background: var(--we-surface) !important;
  border-color: var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
}

.setup-hub-wrapper .bg-surface-700 {
  background: var(--we-line) !important;
}

.setup-hub-wrapper .theme-beam-gradient {
  background: linear-gradient(to bottom, var(--we-primary) 0%, var(--we-primary-glow) 60%, transparent 100%) !important;
}

@keyframes verticalBeamFlow {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(300%); }
}

.vertical-beam-shimmer {
  animation: verticalBeamFlow 3s ease-in-out infinite;
}

/* Stepper Items (Steps 1-6) */
.setup-hub-wrapper [data-step-nav] {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.setup-hub-wrapper [data-step-nav]:hover {
  background: var(--we-surface-hover) !important;
  border-color: var(--we-line-focus) !important;
  transform: translateX(3px);
}

.setup-hub-wrapper [data-step-nav] .w-8.h-8 {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink-muted) !important;
  transition: all 0.25s ease;
}

.setup-hub-wrapper [data-step-nav] span {
  color: var(--we-ink-secondary);
}

.setup-hub-wrapper [data-step-nav] .text-slate-300,
.setup-hub-wrapper [data-step-nav] .font-bold,
.setup-hub-wrapper [data-step-nav] .font-semibold {
  color: var(--we-ink) !important;
}

.setup-hub-wrapper [data-step-nav] p {
  color: var(--we-ink-muted) !important;
}

.setup-hub-wrapper [data-step-nav] .bg-surface-750 {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
}

/* Dynamic Active State for Any Step 1 to 6 */
.setup-hub-wrapper [data-step-nav].active {
  background: linear-gradient(135deg, var(--we-primary-light) 0%, var(--we-surface) 100%) !important;
  border: 1px solid var(--we-primary) !important;
  box-shadow: 0 4px 18px var(--we-primary-glow) !important;
}

.setup-hub-wrapper [data-step-nav].active .w-8.h-8 {
  background: var(--we-primary) !important;
  border-color: var(--we-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px var(--we-primary-glow) !important;
}

.setup-hub-wrapper [data-step-nav].completed .w-8.h-8 {
  background: color-mix(in srgb, var(--we-primary) 18%, var(--we-surface)) !important;
  border-color: var(--we-primary) !important;
  color: var(--we-primary) !important;
  font-weight: 700;
}

.setup-hub-wrapper [data-step-nav] .step-active-badge {
  display: none;
}

.setup-hub-wrapper [data-step-nav].active .step-active-badge {
  display: inline-block;
  background: var(--we-primary) !important;
  color: #ffffff !important;
}

.setup-hub-wrapper [data-step-nav].active .step-title {
  color: var(--we-primary) !important;
}

@keyframes pulseRing {
  0% { transform: scale(0.96); opacity: 0.85; }
  50% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(0.96); opacity: 0.85; }
}

.active-step-pulse {
  animation: pulseRing 2.4s infinite cubic-bezier(0.45, 0, 0.2, 1);
  will-change: transform, opacity;
}

/* Host Preflight Status Capsule */
.setup-hub-wrapper aside .bg-surface-800\/60 {
  background: var(--we-surface-hover) !important;
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper aside .bg-surface-900\/70 {
  background: var(--we-surface) !important;
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper aside .text-slate-500 {
  color: var(--we-ink-muted) !important;
}

.setup-hub-wrapper aside .text-slate-200 {
  color: var(--we-ink) !important;
}

/* Right Column Workspace Header */
.setup-hub-wrapper section .border-b {
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper section h3,
.setup-hub-wrapper section h4 {
  color: var(--we-ink) !important;
}

.setup-hub-wrapper section .bg-surface-800 {
  background: var(--we-surface) !important;
  border-color: var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
}

/* Goal & Option Cards — Soft & Light Hover Radiant */
.wizard-card-item,
.goal-card-wrapper {
  position: relative;
  border-radius: 16px !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
  overflow: hidden;
}

.wizard-card-item:not(.active-card-border),
.goal-card-wrapper:not(.active-card-border) {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
}

.wizard-card-item:not(.active-card-border):hover,
.goal-card-wrapper:not(.active-card-border):hover {
  background: radial-gradient(420px circle at var(--mouse-card-x, 50%) var(--mouse-card-y, 50%), color-mix(in srgb, var(--we-primary) 8%, transparent), transparent 70%), var(--we-surface-hover) !important;
  border-color: color-mix(in srgb, var(--we-primary) 50%, var(--we-line)) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06), 0 0 18px color-mix(in srgb, var(--we-primary) 10%, transparent) !important;
}

.wizard-card-item:not(.active-card-border) .goal-inner-card,
.goal-card-wrapper:not(.active-card-border) .goal-inner-card {
  background: transparent !important;
  border: none !important;
}

/* Selected Card State — High-Contrast Dark Surface with Glowing Accent Border */
.wizard-card-item.active-card-border,
.goal-card-wrapper.active-card-border {
  background: radial-gradient(480px circle at 85% 15%, color-mix(in srgb, var(--we-primary) 14%, transparent), transparent 70%), color-mix(in srgb, var(--we-primary) 5%, var(--we-surface)) !important;
  border: 2px solid var(--we-primary) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--we-primary) 55%, transparent), 0 10px 28px color-mix(in srgb, var(--we-primary) 22%, transparent) !important;
  transform: translateY(-1px);
}

.wizard-card-item.active-card-border:hover,
.goal-card-wrapper.active-card-border:hover {
  background: radial-gradient(480px circle at var(--mouse-card-x, 85%) var(--mouse-card-y, 15%), color-mix(in srgb, var(--we-primary) 18%, transparent), transparent 70%), color-mix(in srgb, var(--we-primary) 7%, var(--we-surface)) !important;
  box-shadow: 0 0 0 1.5px var(--we-primary), 0 14px 34px color-mix(in srgb, var(--we-primary) 28%, transparent) !important;
}

.wizard-card-item.active-card-border .goal-inner-card,
.goal-card-wrapper.active-card-border .goal-inner-card {
  background: transparent !important;
  border: none !important;
}

/* Legible typography across all card states */
.wizard-card-item h3,
.wizard-card-item h4,
.goal-card-wrapper h3,
.goal-card-wrapper h4,
.goal-inner-card h4,
.goal-inner-card h3 {
  color: var(--we-ink) !important;
}

.wizard-card-item p,
.goal-card-wrapper p,
.goal-inner-card p {
  color: var(--we-ink-secondary) !important;
}

.goal-inner-card .card-icon-box {
  background: color-mix(in srgb, var(--we-primary) 12%, var(--we-surface)) !important;
  border: 1px solid color-mix(in srgb, var(--we-primary) 30%, transparent) !important;
  color: var(--we-primary) !important;
}

.wizard-card-item .theme-check-bubble,
.goal-card-wrapper .theme-check-bubble,
.goal-inner-card .theme-check-bubble {
  background: var(--we-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--we-primary) 40%, transparent) !important;
}

.wizard-card-item .border-t,
.goal-card-wrapper .border-t,
.goal-inner-card .border-t {
  border-color: var(--we-line) !important;
}

.wizard-card-item.active-card-border .border-t,
.goal-card-wrapper.active-card-border .border-t {
  border-color: color-mix(in srgb, var(--we-primary) 30%, var(--we-line)) !important;
}

.wizard-card-item .text-slate-400,
.wizard-card-item .text-slate-500,
.goal-inner-card .text-slate-400,
.goal-inner-card .text-slate-500 {
  color: var(--we-ink-muted) !important;
}

/* Step 2 Preview Accordion */
.setup-hub-wrapper .bg-surface-800\/50 {
  background: var(--we-surface) !important;
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper #step2PreviewToggle {
  background: var(--we-surface-hover) !important;
  color: var(--we-ink) !important;
}

.setup-hub-wrapper #step2PreviewToggle span {
  color: var(--we-ink) !important;
}

.setup-hub-wrapper #step2PreviewDrawer {
  background: var(--we-surface) !important;
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper #step2PreviewDrawer .bg-surface-900\/70 {
  background: var(--we-surface-card) !important;
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper #step2PreviewDrawer .text-slate-200 {
  color: var(--we-ink) !important;
}

.setup-hub-wrapper #step2PreviewDrawer .text-slate-500 {
  color: var(--we-ink-muted) !important;
}

/* Bottom Action Bar */
.setup-hub-wrapper footer {
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper #btnStartOver,
.setup-hub-wrapper #wizardPrevBtn {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
}

.setup-hub-wrapper #btnStartOver:hover,
.setup-hub-wrapper #wizardPrevBtn:hover {
  background: var(--we-surface-hover) !important;
  color: var(--we-ink) !important;
  border-color: var(--we-line-focus) !important;
}

.setup-hub-wrapper .theme-accent-btn,
.theme-accent-btn,
.setup-hub-wrapper #wizardNextBtn,
#wizardNextBtn,
.setup-hub-wrapper #btnContinue {
  background: var(--we-accent-gradient, linear-gradient(135deg, #8467D7 0%, #6343C7 100%)) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px var(--we-primary-glow, rgba(132, 103, 215, 0.45)) !important;
  border: 1px solid color-mix(in srgb, var(--we-primary, #8467D7) 60%, transparent) !important;
  cursor: pointer !important;
}

.setup-hub-wrapper .theme-accent-btn:hover,
.theme-accent-btn:hover,
.setup-hub-wrapper #wizardNextBtn:hover,
#wizardNextBtn:hover,
.setup-hub-wrapper #btnContinue:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 22px var(--we-primary-glow, rgba(132, 103, 215, 0.55)) !important;
}

.setup-hub-wrapper .theme-accent-btn *,
.theme-accent-btn *,
.setup-hub-wrapper #wizardNextBtn *,
#wizardNextBtn * {
  color: #ffffff !important;
}

/* Semantic Component Bindings */
.setup-hub-wrapper .hub-topbar {
  background: var(--we-surface-trans) !important;
  border-bottom: 1px solid var(--we-line) !important;
  color: var(--we-ink) !important;
}

.setup-hub-wrapper .hub-telemetry-badge {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink) !important;
}

.setup-hub-wrapper .hub-nav-tabs-wrapper {
  background: var(--we-surface-card) !important;
  border: 1px solid var(--we-line) !important;
  box-shadow: var(--we-card-shadow) !important;
}

.setup-hub-wrapper .hub-wizard-card {
  background: var(--we-surface-card) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink) !important;
  box-shadow: var(--we-card-shadow) !important;
}

.setup-hub-wrapper .stepper-counter-pill {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
}

.setup-hub-wrapper .stepper-track-line {
  background: var(--we-line) !important;
}

.setup-hub-wrapper .stepper-step-item {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink) !important;
}

.setup-hub-wrapper .stepper-step-item:hover {
  background: var(--we-surface-hover) !important;
  border-color: var(--we-line-focus) !important;
}

.setup-hub-wrapper .stepper-step-item.active {
  background: linear-gradient(135deg, var(--we-primary-light) 0%, var(--we-surface) 100%) !important;
  border-color: var(--we-primary) !important;
  box-shadow: 0 4px 16px var(--we-primary-glow) !important;
}

.setup-hub-wrapper .step-title {
  color: var(--we-ink) !important;
}

.setup-hub-wrapper .step-active-badge {
  background: var(--we-primary) !important;
  color: #ffffff !important;
}

.setup-hub-wrapper .step-selected-badge {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-primary-glow) !important;
  color: var(--we-primary) !important;
}

.setup-hub-wrapper .step-circle-inactive {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink-muted) !important;
}

.setup-hub-wrapper .hub-tag {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
}

.setup-hub-wrapper .telemetry-capsule {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
}

.setup-hub-wrapper .telemetry-mini-card {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink) !important;
}

.setup-hub-wrapper .step-tag-pill {
  background: var(--we-primary-light) !important;
  border: 1px solid var(--we-primary-glow) !important;
  color: var(--we-primary) !important;
}

.setup-hub-wrapper .hub-filter-pill {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink) !important;
}

.setup-hub-wrapper .badge-recommended {
  background: var(--we-primary-light) !important;
  border: 1px solid var(--we-primary-glow) !important;
  color: var(--we-primary) !important;
}

.setup-hub-wrapper .badge-category {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-primary) !important;
}

.setup-hub-wrapper .uv-code-tag {
  background: var(--we-primary-light) !important;
  color: var(--we-primary) !important;
}

.setup-hub-wrapper .goal-sub-tag {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
}

.setup-hub-wrapper .goal-sub-tag.active {
  background: var(--we-surface) !important;
  border-color: var(--we-primary-glow) !important;
  color: var(--we-primary) !important;
}

.setup-hub-wrapper .step2-preview-wrapper {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
}

.setup-hub-wrapper .drawer-item {
  background: var(--we-surface-hover) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink) !important;
}

/* Station 2-5 Harmonization */
.setup-hub-wrapper .preflight-layout,
.setup-hub-wrapper .preflight-controls-card,
.setup-hub-wrapper .preflight-verdict-card,
.setup-hub-wrapper .recipes-layout,
.setup-hub-wrapper .scripts-card,
.setup-hub-wrapper .redaction-card {
  background: var(--we-surface-card) !important;
  border: 1px solid var(--we-line) !important;
  box-shadow: var(--we-card-shadow) !important;
  color: var(--we-ink) !important;
}

.setup-hub-wrapper .preflight-select,
.setup-hub-wrapper .recipes-search-input,
.setup-hub-wrapper .log-textarea {
  background: var(--we-surface) !important;
  border: 1px solid var(--we-line) !important;
  color: var(--we-ink) !important;
}

.setup-hub-wrapper .tier-matrix-table th {
  background: var(--we-surface-hover) !important;
  color: var(--we-ink) !important;
  border-color: var(--we-line) !important;
}

.setup-hub-wrapper .tier-matrix-table td {
  border-color: var(--we-line) !important;
  color: var(--we-ink-secondary) !important;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--we-surface-hover);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--we-line-focus);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--we-primary);
}


/* ==========================================================================
   HOMEPAGE LANDING — fits one screen at every size.
   The stage is exactly one viewport tall (minus the header). The intro card,
   feature cards and scroll cue stack upward from the bottom in .hero-dock, so
   they never overlap each other; compact rules below shrink them on short or
   narrow screens instead of pushing anything off-screen.
   ========================================================================== */
.canvas-fullscreen-stage {
  height: calc(100vh - 60px);
  height: calc(100svh - 60px);
  min-height: 0;
}

.hero-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 0 18px;
  pointer-events: none;
}

.hero-dock > * {
  pointer-events: auto;
}

/* Cards row and scroll cue join the dock's flow instead of absolute offsets. */
.hero-dock .hero-marquee-wrapper {
  position: relative;
  bottom: auto;
  left: auto;
  width: 100%;
}

.hero-dock .hero-scroll-cue {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  animation: heroDockCueBob 2.4s ease-in-out infinite;
}

.hero-dock .hero-scroll-cue:hover {
  transform: translateY(-3px);
}

@keyframes heroDockCueBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hero-intro {
  position: relative;
  z-index: 17;
  width: min(900px, calc(100% - 32px));
  margin: 0;
  padding: 18px 28px 14px;
  text-align: center;
  background: color-mix(in srgb, var(--we-surface) 76%, transparent);
  border: 1px solid color-mix(in srgb, var(--we-line) 80%, transparent);
  border-radius: 24px;
  box-shadow: var(--we-card-shadow);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  user-select: text;
  -webkit-user-select: text;
}

.hero-intro-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--we-accent-ink);
}

.hero-intro-title {
  margin: 0;
  font-family: var(--we-font-heading);
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--we-ink);
  text-wrap: balance;
}

.hero-intro-lead {
  margin: 8px auto 0;
  text-wrap: balance;
  max-width: 780px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--we-ink-secondary);
}

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

.hero-intro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.hero-intro-btn-primary {
  background: var(--we-primary);
  color: var(--we-on-primary, #ffffff);
}

.hero-intro-btn-primary:hover {
  filter: brightness(1.1);
}

.hero-intro-btn-secondary {
  border: 1px solid var(--we-border);
  color: var(--we-ink);
  background: color-mix(in srgb, var(--we-surface) 60%, transparent);
}

.hero-intro-btn-secondary:hover {
  background: var(--we-surface-hover);
}

.hero-intro-btn-text {
  color: var(--we-ink-secondary);
}

.hero-intro-btn-text:hover {
  color: var(--we-ink);
}

.hero-intro-byline {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--we-ink-muted);
}

.hero-intro-byline a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-intro-byline a:hover {
  color: var(--we-ink);
}

/* One-line headline once the card is wide enough for it. */
@media (min-width: 1200px) {
  .hero-intro-break {
    display: none;
  }
}

/* ---- Compact steps: shorter screens shrink the dock, never scroll it ---- */
@media (max-height: 860px) {
  .hero-dock { gap: 10px; padding-bottom: 14px; }
  .hero-intro { padding: 14px 24px 12px; }
  .hero-intro-actions { margin-top: 10px; }
  .hero-intro-byline { margin-top: 8px; }
}

@media (max-height: 800px) {
  .hero-intro-lead { display: none; }
  .hero-nav-card { height: 70px; padding: 9px 14px; }
  .hero-card-icon-wrap { width: 40px; height: 40px; font-size: 18px; }
  .hero-card-desc { display: none; }
  .hero-dock .hero-marquee-wrapper { padding: 4px 0; }
}

@media (max-height: 640px) {
  .hero-intro-byline,
  .hero-intro-eyebrow { display: none; }
  .hero-dock .hero-scroll-cue { display: none; }
  .hero-intro-btn { min-height: 40px; }
}

/* Phones */
@media (max-width: 768px) {
  .hero-dock { gap: 10px; padding-bottom: 12px; }
  .hero-intro {
    width: calc(100% - 24px);
    padding: 14px 14px 12px;
    border-radius: 20px;
  }
  .hero-intro-title { font-size: 1.35rem; }
  .hero-intro-lead { font-size: 13px; }
  .hero-intro-actions { gap: 8px; }
  .hero-intro-btn { padding: 0 14px; font-size: 13px; min-height: 40px; }
  .hero-intro-btn-text { display: none; }
  .hero-intro-byline { display: none; }
  .hero-dock .hero-scroll-cue { padding: 6px 14px; font-size: 11.5px; }
}

@media (max-width: 768px) and (max-height: 800px) {
  .hero-intro-lead { display: none; }
}

/* ==========================================================================
   FEATURE CARDS ROW — on screens wide enough for all four cards, show them as
   a centred static row (no partial cards, no empty gap). Narrower screens keep
   the scrolling loop.
   ========================================================================== */
@media (min-width: 1360px) {
  .hero-marquee-wrapper {
    mask-image: none;
    -webkit-mask-image: none;
  }
  .hero-marquee-inner {
    width: 100%;
    justify-content: center;
  }
  .hero-marquee-group {
    animation: none;
    transform: none;
  }
  .hero-marquee-group[aria-hidden="true"] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-marquee-group {
    animation: none;
  }
}
