/* ═══════════════════════════════════════════════════════
   AstroKamya™ · Mobile Responsive System
   Industry-standard mobile-first overrides
   Tested: iPhone 14 Pro Max (393×852), Samsung S25 Ultra (412×915), iPhone SE (375×667)
   ═══════════════════════════════════════════════════════ */

/* ═══════ GLOBAL: Prevent horizontal overflow ═══════ */
html {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
body {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}

/* ═══════ HAMBURGER BUTTON ═══════ */
.mobile-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  position: relative;
  z-index: 201;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.mobile-hamburger:active {
  transform: scale(0.92);
  background: rgba(255,184,0,0.08);
}
.hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}
.hamburger-lines span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text-1);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}
/* Hamburger → X animation */
.mobile-hamburger.active .hamburger-lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-hamburger.active .hamburger-lines span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-hamburger.active .hamburger-lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ═══════ MOBILE NAV DRAWER (Slide-in from right) ═══════ */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 85vw;
  max-width: 360px;
  height: 100vh;
  height: 100dvh;
  z-index: 200;
  background: rgba(10,6,24,0.97);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border-left: 1px solid rgba(124,58,237,0.15);
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}
.mobile-nav-drawer.open {
  transform: translateX(0);
}

/* Drawer backdrop overlay */
.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-backdrop.visible {
  opacity: 1;
}

/* Drawer content structure */
.mobile-nav-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(124,58,237,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav-logo {
  font-family: var(--font-space);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-nav-logo .logo-astro { color: #fff; }
.mobile-nav-logo .logo-kamya { color: #F7C948; }

.mobile-nav-links {
  padding: 16px 0;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.25s ease;
  border-left: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-link:active,
.mobile-nav-link:hover {
  background: rgba(255,184,0,0.06);
  color: var(--text-1);
  border-left-color: var(--gold);
}
.mobile-nav-link .nav-icon {
  width: 20px;
  height: 20px;
  color: var(--text-3);
  flex-shrink: 0;
}
.mobile-nav-link:active .nav-icon {
  color: var(--gold);
}

.mobile-nav-divider {
  height: 1px;
  background: rgba(124,58,237,0.08);
  margin: 8px 24px;
}

.mobile-nav-cta {
  padding: 20px 24px;
}
.mobile-nav-cta .btn-glow {
  width: 100%;
  justify-content: center;
  padding: 16px 24px;
  font-size: 15px;
  min-height: 52px;
}
.mobile-nav-cta-sub {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 8px;
}

.mobile-nav-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(124,58,237,0.08);
  margin-top: auto;
}
.mobile-nav-footer .mobile-nav-link {
  padding: 12px 0;
  border-left: none;
  font-size: 13px;
  color: var(--text-3);
}

/* ═══════ TABLET BREAKPOINT (≤ 900px) ═══════ */
@media (max-width: 900px) {
  /* Show hamburger, hide desktop nav links */
  .mobile-hamburger {
    display: flex;
    order: 10;
  }
  .mobile-nav-drawer {
    display: flex;
    flex-direction: column;
  }
  .mobile-nav-backdrop {
    display: block;
    pointer-events: none;
  }
  .mobile-nav-backdrop.visible {
    pointer-events: auto;
  }

  /* Hide desktop nav items */
  .nav-link-icon,
  .nav-cta-wrap {
    display: none !important;
  }

  /* Keep profile button visible alongside hamburger */
  .nav-r {
    gap: 12px;
  }

  /* Reduce wrap padding */
  .wrap {
    padding: 0 20px;
  }

  /* Urgency banner compact */
  #urgency-banner .ub-inner {
    font-size: 11px;
    gap: 6px;
    padding: 0 16px;
  }
  .ub-cta {
    padding: 3px 10px;
    font-size: 11px;
  }

  /* Nav height optimized */
  #nav {
    padding: 12px 0;
    top: 36px;
  }
  #nav.scrolled {
    padding: 8px 0;
  }

  /* Section padding reduced */
  section {
    padding: 56px 0;
  }
  h2 {
    margin-bottom: 36px;
  }

  /* Hero — contain chart */
  .hero-chart-bg {
    width: 400px;
    height: 400px;
    right: -20%;
    opacity: 0.4;
  }

  /* Input split still 2-col on tablet */
  .input-split {
    gap: 24px;
  }

  /* Demo split stack */
  .demo-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .demo-chart-wrap {
    max-width: 380px;
    margin: 0 auto;
  }

  /* Features bento 2-col */
  .feat-bento,
  .test-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fb-big {
    grid-column: span 2;
  }

  /* Intent cards 2-col */
  .intent-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .intent-card {
    aspect-ratio: auto;
    padding: 28px 16px;
  }

  /* Pricing 2-col */
  .price-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .pc {
    padding: 24px;
  }
  .pc-pop {
    transform: none;
  }
  .pc-pop:hover {
    transform: translateY(-4px);
  }

  /* Steps row simplify */
  .steps-row {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 0;
  }
  .step-connector {
    width: 32px;
  }

  /* Lifetime plan */
  .lt-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 24px;
  }
  .lt-features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══════ MOBILE BREAKPOINT (≤ 640px) ═══════ */
@media (max-width: 640px) {
  /* Global */
  .wrap {
    padding: 0 16px;
  }
  section {
    padding: 44px 0;
  }
  h2 {
    font-size: 26px !important;
    margin-bottom: 28px;
  }
  .sec-label {
    font-size: 12px;
  }

  /* Urgency banner tighter */
  #urgency-banner {
    padding: 6px 0;
  }
  #urgency-banner .ub-inner {
    font-size: 10px;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .ub-timer {
    display: none;
  }

  /* Nav compact */
  #nav {
    top: 30px;
    padding: 10px 0;
  }
  .logo-mandala {
    width: 32px;
    height: 32px;
  }
  .logo-text {
    font-size: 16px;
  }

  /* Hero full-width text */
  #hero {
    padding: 110px 0 56px;
    min-height: auto;
  }
  .hero-chart-bg {
    width: 280px;
    height: 280px;
    right: -25%;
    top: 20%;
    opacity: 0.25;
  }
  #hero h1,
  #hero-title {
    font-size: 32px !important;
    min-height: 2.6em;
  }
  .ht-line {
    white-space: normal;
  }
  .hero-desc {
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 100%;
  }
  .hero-personal {
    padding: 8px 14px;
    border-radius: 24px;
    margin-bottom: 16px;
  }
  .hp-text {
    font-size: 12px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero-actions .btn-glow,
  .hero-actions .btn-outline {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    font-size: 15px;
  }
  .hero-trust {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
  }
  .ht-sep {
    display: none;
  }
  .ht-item {
    padding: 6px 12px;
    font-size: 11px;
  }
  .hero-pill {
    font-size: 11px;
    padding: 5px 12px;
    margin-bottom: 20px;
  }

  /* Press logos — horizontal scroll */
  .press-logos {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .press-logos::-webkit-scrollbar {
    display: none;
  }
  .press-logo {
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  /* Birth input — single column */
  .input-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .infographic-panel {
    padding: 20px 16px;
  }
  .ig-header h3 {
    font-size: 18px;
  }
  .ig-step {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }
  .ig-content h4 {
    font-size: 14px;
  }
  .ig-content p {
    font-size: 12px;
  }

  /* Form single column */
  .field-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .input-card {
    padding: 24px 18px;
  }
  .fld input {
    padding: 16px;
    font-size: 16px; /* Prevent iOS zoom */
    min-height: 52px;
  }
  .btn-glow.full {
    min-height: 52px;
    font-size: 15px;
  }
  .destiny-teaser {
    padding: 10px 14px;
  }
  .dt-text {
    font-size: 12px;
  }
  .form-trust {
    font-size: 11px;
    gap: 6px;
  }

  /* Discover preview */
  .discover-item {
    padding: 8px 12px;
  }
  .di-text {
    font-size: 12px;
  }

  /* Live activity */
  .la-feed {
    max-height: 70px;
  }

  /* Intent cards — 2 col, smaller */
  .intent-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .intent-card {
    padding: 20px 12px;
    gap: 10px;
  }
  .ic-svg {
    width: 48px;
    height: 48px;
  }
  .ic-label {
    font-size: 11px;
  }
  .ic-category {
    font-size: 9px;
    padding: 2px 8px;
  }
  .ic-hint {
    font-size: 9px;
  }
  .intent-subtitle {
    font-size: 13px;
    margin-bottom: 28px;
  }

  /* AI preview */
  .ai-preview-wrap {
    margin-left: -4px;
    margin-right: -4px;
  }
  .ai-preview {
    padding: 14px;
  }
  .aip-q {
    font-size: 13px;
    padding: 10px 14px;
  }
  .aip-body {
    padding: 12px 14px;
    font-size: 12px;
  }

  /* Demo section */
  .demo-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .demo-chart-wrap {
    max-width: 280px;
    margin: 0 auto;
  }
  .demo-sub {
    font-size: 13px;
    margin-top: -24px;
  }

  /* Chat demo */
  .chat-thread {
    max-height: 280px;
  }

  /* Steps row — vertical stack */
  .steps-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .step-connector {
    display: none;
  }
  .step-item {
    flex-direction: row;
    gap: 14px;
    text-align: left;
    padding: 18px 16px;
  }
  .step-item .si-content p {
    margin: 0;
    max-width: none;
  }
  .si-num {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* Features bento — 1 col */
  .feat-bento,
  .test-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .fb-big,
  .fb-wide {
    grid-column: span 1;
  }
  .fb-card {
    padding: 24px 20px;
  }

  /* Pricing — 1 col */
  .price-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pc {
    padding: 24px 20px;
  }
  .pc-pop {
    transform: none;
    order: -1;
  }
  .pc-pop:hover {
    transform: translateY(-4px);
  }
  .pc-price {
    font-size: 36px;
  }
  .price-header-row {
    flex-direction: column;
    gap: 16px;
  }

  /* Lifetime plan */
  .lt-content {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }
  .lt-features-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .lt-emotion-row {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .lt-comparison {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
  .lt-comp-divider {
    width: 60%;
    height: 1px;
  }
  .lt-amount {
    font-size: 42px;
  }
  .lt-title {
    font-size: 22px;
  }
  .lt-price-block {
    padding: 20px 16px;
  }

  /* Testimonials stack */
  .test-card {
    padding: 20px 18px;
  }

  /* Social proof strip */
  .proof-strip {
    flex-direction: column;
    gap: 12px;
  }
  .ps-sep {
    width: 60%;
    height: 1px;
  }

  /* Orbital container */
  .orbital-container {
    max-width: 100%;
  }
  .orbital-node {
    font-size: 9px;
    padding: 4px 10px;
  }
  .oc-pill {
    padding: 10px 18px;
    font-size: 11px;
  }

  /* Footer */
  .foot-grid {
    flex-direction: column;
    gap: 32px;
  }
  .foot-cols {
    flex-wrap: wrap;
    gap: 24px;
  }
  .foot-col {
    min-width: 140px;
  }
  .foot-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .foot-legal {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Upsell card */
  .ak-upsell-card {
    padding: 18px;
  }
  .ak-upsell-title {
    font-size: 15px;
  }

  /* Auth fixes */
  .profile-menu {
    right: -60px;
    min-width: 260px;
  }
}

/* ═══════ SMALL MOBILE (≤ 480px) ═══════ */
@media (max-width: 480px) {
  #hero h1,
  #hero-title {
    font-size: 28px !important;
    min-height: 2.4em;
  }
  h2 {
    font-size: 24px !important;
  }
  p {
    font-size: 14px;
  }

  /* Hero elements scale */
  .hero-chart-bg {
    width: 220px;
    height: 220px;
    opacity: 0.2;
  }

  /* Section padding tighter */
  section {
    padding: 36px 0;
  }

  /* Input card compact */
  .input-card {
    padding: 18px 14px;
  }

  /* Intent cards maintain 2-col */
  .intent-card {
    padding: 16px 10px;
    gap: 8px;
  }
  .ic-svg {
    width: 40px;
    height: 40px;
  }
  .ic-label {
    font-size: 10px;
  }

  /* Pricing cards */
  .pc h3 {
    font-size: 18px;
  }
  .pc-price {
    font-size: 32px;
  }
  .pc li {
    font-size: 12px;
  }

  /* Stats strip */
  .sec-stats {
    flex-direction: column;
    gap: 16px;
  }

  /* Feature bento cards */
  .fb-card h3 {
    font-size: 16px;
  }
  .fb-card p {
    font-size: 12px;
  }

  /* Demo chat */
  .fbd-user,
  .fbd-ai {
    max-width: 95%;
    font-size: 12px;
  }

  /* Orbital simplified */
  .orbital-wrap {
    margin-bottom: 40px;
  }
}

/* ═══════ EXTRA SMALL (≤ 380px) — iPhone SE ═══════ */
@media (max-width: 380px) {
  .wrap {
    padding: 0 12px;
  }

  #hero h1,
  #hero-title {
    font-size: 26px !important;
  }
  h2 {
    font-size: 22px !important;
  }

  .input-card {
    padding: 14px 12px;
  }

  /* Intent 1-col on very small */
  .intent-grid {
    grid-template-columns: 1fr;
  }

  .ig-step {
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }

  .otp-digit {
    width: 38px;
    height: 46px;
    font-size: 18px;
  }

  /* Tighter pricing */
  .pc {
    padding: 18px 14px;
  }
  .pc-price {
    font-size: 28px;
  }

  /* Nav */
  .logo-mandala {
    width: 28px;
    height: 28px;
  }
  .logo-text {
    font-size: 14px;
  }
}

/* ═══════ PERFORMANCE: Disable heavy animations on mobile ═══════ */
@media (max-width: 768px) {
  /* Mesh orb background — drastically reduce */
  .mesh-orb {
    filter: blur(60px);
  }
  .orb-1 {
    width: 300px;
    height: 300px;
    animation-duration: 40s;
  }
  .orb-2 {
    width: 250px;
    height: 250px;
    animation-duration: 50s;
  }
  .orb-3 {
    width: 200px;
    height: 200px;
    animation-duration: 35s;
  }
  .orb-4,
  .orb-5 {
    display: none;
  }

  /* Disable expensive CSS animations */
  .zodiac-rotate,
  .zodiac-rotate-demo,
  .yantra-spin,
  .yantra-spin-demo,
  .sacred-geo-spin,
  .hex-grid-spin,
  .hex-core-spin,
  .hex-core-spin-reverse,
  .orbit-spin-1,
  .orbit-spin-2,
  .orbit-spin-3,
  .orbit-ring-1,
  .orbit-ring-2,
  .orbit-ring-3 {
    animation: none !important;
  }

  /* Reduce scroll reveal transitions */
  .r {
    transition-duration: 0.4s;
  }

  /* Reduce floating animations */
  .anim-float,
  .anim-float-slow {
    animation: none;
  }

  /* Reduce node floating */
  .on-1, .on-2, .on-3, .on-4, .on-5, .on-6 {
    animation: none !important;
  }

  /* Reduce glow/shimmer intensity */
  .shimmer-btn,
  .cta-btn,
  .btn-glow {
    animation: none;
    background-size: 100% 100%;
  }
  .shimmer-btn::before,
  .cta-btn::before,
  .btn-glow::before {
    animation: none;
    display: none;
  }

  /* Reduce card hover effects on touch */
  .pc:hover {
    transform: none;
  }
  .fb-card:hover {
    transform: none;
  }
  .intent-card:hover {
    transform: none;
  }
  .step-item:hover {
    transform: none;
  }

  /* Reduce gradient border animation */
  .pc-pop::before {
    animation-duration: 8s;
  }
  .pc::after {
    animation-duration: 8s;
  }

  /* Reduce aurora/shimmer */
  .pc-pop::before {
    filter: blur(2px);
    opacity: 0.3;
  }

  /* Node ring animations simplified */
  .ig-node-ring,
  .ig-ring-rose,
  .ig-ring-violet {
    animation: none;
  }

  /* Connector pulse simplified */
  .ig-connector-pulse {
    animation: none;
    opacity: 0;
  }

  /* Demo particles canvas hidden on mobile */
  .demo-particles-canvas {
    display: none;
  }

  /* Stars canvas reduced opacity */
  #stars-canvas {
    opacity: 0.3;
  }

  /* Contain heavy paint areas */
  #demo,
  #birth-input,
  #intent,
  #pricing {
    contain: layout style;
  }
}

/* ═══════ TOUCH TARGETS: Ensure minimum 44px ═══════ */
@media (max-width: 900px) {
  /* All buttons minimum touch size */
  .cta-btn,
  .btn-glow,
  .btn-outline,
  .shimmer-btn,
  button,
  .nav-profile-btn,
  .mobile-hamburger {
    min-height: 44px;
    min-width: 44px;
  }

  /* Form inputs proper size */
  .fld input,
  .fld select {
    min-height: 48px;
    font-size: 16px; /* Prevents iOS auto-zoom */
  }

  /* Nav links in drawer — proper height */
  .mobile-nav-link {
    min-height: 48px;
  }

  /* Card buttons */
  .pc .btn-outline,
  .pc .btn-glow {
    min-height: 48px;
    font-size: 14px;
  }
}

/* ═══════ IOS SAFE AREA ═══════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-nav-drawer {
    padding-bottom: env(safe-area-inset-bottom);
  }

  footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ═══════ SPLASH SCREEN — Mobile optimization ═══════ */
@media (max-width: 768px) {
  .splash-screen {
    /* Faster on mobile */
    transition-duration: 0.4s !important;
  }
  .splash-constellation {
    width: 120px;
    height: 120px;
  }
  .splash-text {
    font-size: 28px;
  }
  .splash-tagline {
    font-size: 13px;
  }
  /* Reduce splash ring animations */
  .splash-ring-1,
  .splash-ring-2 {
    animation: none !important;
  }
}

/* ═══════ LANDSCAPE PHONE ═══════ */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: auto;
    padding: 80px 0 40px;
  }
  .hero-chart-bg {
    display: none;
  }
  section {
    padding: 32px 0;
  }
}

/* ═══════ GLOBAL: iOS Input Zoom Prevention ═══════ */
/* iOS Safari auto-zooms on inputs with font-size < 16px */
@media (max-width: 900px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ═══════ GLOBAL: Safe-area for all fixed/sticky elements ═══════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .cart-drawer,
  .ss-wizard-modal,
  .ssd-pwa-banner,
  .cart-footer-inline,
  .checkout-mobile-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ═══════ SOULSYNC PAGE — Mobile Fixes ═══════ */
@media (max-width: 768px) {
  /* Reduce nebula orbs — GPU-expensive on mobile */
  .ss-nebula-1 {
    width: 300px; height: 300px;
    filter: blur(60px);
  }
  .ss-nebula-2 {
    width: 250px; height: 250px;
    filter: blur(60px);
  }
  .ss-nebula-3 {
    width: 350px; height: 350px;
    filter: blur(60px);
  }
  /* Disable expensive infinite animations */
  .ss-planet-orbit,
  .ss-planet-orbit.r2,
  .ss-ring-shimmer,
  .ss-dna-strand.s1,
  .ss-dna-strand.s2,
  .ss-dna-strand.s3,
  .ss-spin-slow,
  .ss-spin-reverse,
  .ss-orbit-ring,
  .ss-orbit-r2 {
    animation: none !important;
  }
  /* Reduce shimmer/pulse animations */
  .ss-btn-shimmer,
  .ss-diamond-pulse,
  .ss-connector-dot {
    animation: none !important;
    display: none;
  }
  /* Background grid reduce opacity */
  .ss-bg-grid { opacity: 0.2; }
  /* Particles canvas lighter */
  #ss-particles { opacity: 0.25; }
  /* Card hovers disabled on touch */
  .ss-bento-card:hover,
  .ss-story:hover,
  .ss-plan-card:hover {
    transform: none;
  }
}

@media (max-width: 600px) {
  /* SoulSync nav — show hamburger via parent page's mobile nav */
  .ss-nav-link { display: none; }
  .ss-cta-btn { display: none; }

  /* Hero SVG contain */
  .ss-cosmic-ring-svg {
    width: 100%;
    max-width: 320px;
    transform: none;
  }
  .ss-hero-right {
    margin: 0 auto;
    max-width: 300px;
  }

  /* Pricing plan features grid single-col */
  .ss-plan-features-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Demo bottom single col */
  .ss-demo-bottom {
    grid-template-columns: 1fr;
  }
  
  /* Trust metrics wrap */
  .ss-trust-metrics {
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
  }
  .ss-trust-sep { display: none; }
  
  /* Demo bar names compact */
  .ss-bar-name { width: 70px; font-size: 11px; }
  
  /* Footer safe-area */
  #ss-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 375px) {
  .ss-plan-features-grid {
    grid-template-columns: 1fr;
  }
  .ss-plan-price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ═══════ SOULSYNC WIZARD — Mobile Fixes ═══════ */
@media (max-width: 640px) {
  .ss-wizard-modal {
    border-radius: 20px 20px 0 0;
    max-height: 95vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  /* Touch targets for chips */
  .ss-chip {
    min-height: 44px;
    padding: 10px 16px;
  }
  /* Photo grid touch-friendly */
  .ss-photo-slot {
    min-height: 100px;
  }
  .ss-photo-remove {
    width: 32px; height: 32px;
    font-size: 14px;
  }
  /* Nav buttons touch */
  .ss-wiz-btn-next,
  .ss-wiz-btn-back {
    min-height: 48px;
  }
  /* Close button touch */
  .ss-wizard-close {
    width: 44px; height: 44px;
  }
}

@media (max-width: 375px) {
  .ss-wizard-modal {
    max-width: 100vw;
    width: 100vw;
    border-radius: 16px 16px 0 0;
  }
  .ss-wiz-step { padding: 0 14px; }
  .ss-wiz-nav { padding: 12px 14px 20px; }
  .ss-wiz-header h2 { font-size: 16px; }
  .ss-wiz-photo-grid { grid-template-columns: repeat(2, 1fr); }
  .ss-wiz-astro-signs { grid-template-columns: repeat(2, 1fr); }
  .ss-wiz-success-stats { grid-template-columns: 1fr; }
}

/* ═══════ SOULSYNC FEATURES — Mobile Fixes ═══════ */
@media (max-width: 640px) {
  /* PWA banner safe-area */
  .ssd-pwa-banner {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
    gap: 10px;
  }
  .ssd-pwa-banner .pwa-install {
    width: 100%;
    min-height: 44px;
    text-align: center;
    justify-content: center;
  }
  /* Cosmic map responsive height */
  .ssd-cosmic-map-wrap {
    height: auto;
    aspect-ratio: 4/3;
    min-height: 260px;
  }
  /* Video self smaller on small phones */
  .ssd-video-self {
    width: 80px; height: 110px;
    top: 8px; right: 8px;
  }
  /* Video buttons touch-friendly */
  .ssd-video-btn {
    width: 48px; height: 48px;
    min-width: 48px;
  }
  .ssd-video-btn.end {
    width: 56px; height: 56px;
  }
  /* Voice record touch */
  .ssd-voice-record .vr-btn {
    width: 64px; height: 64px;
    min-width: 64px;
  }
  /* Verify modal full-width on mobile */
  .ssd-verify-modal .vm-card {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
  }
  /* Feature tabs horizontal scroll touch */
  .ssd-feature-tab {
    min-height: 40px;
    display: flex;
    align-items: center;
  }
  /* Quest constellation 2-col */
  .ssd-quest-constellation {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════ SOULSYNC INTELLIGENCE — Mobile Fixes ═══════ */
@media (max-width: 640px) {
  .ssi-panel { padding: 0 4px; }
  .ssi-hero { padding: 20px 16px; }
  .ssi-hero-title { font-size: 18px; }
  .ssi-trajectory-chart { gap: 3px; height: 120px; }
  .ssi-traj-bar { width: 18px; }
  .ssi-traj-event { font-size: 7px; max-width: 48px; }
  .ssi-breakup-label { min-width: 80px; font-size: 10px; }
  .ssi-health-label { min-width: 90px; font-size: 11px; }
}

/* ═══════ PAYMENT/CART — Mobile Fixes ═══════ */
@media (max-width: 768px) {
  /* Cart drawer full-screen on mobile */
  .cart-drawer {
    width: 100vw; max-width: 100vw;
    max-height: 100vh; max-height: 100dvh;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .cart-drawer-overlay {
    align-items: flex-end;
  }
  /* Stack columns */
  .cart-columns { flex-direction: column; }
  .cart-col-left, .cart-col-right {
    flex: none;
    overflow-y: visible;
  }
  .cart-col-right {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.04);
  }
  /* Touch targets */
  .cart-close {
    width: 44px; height: 44px;
    min-width: 44px;
  }
  .cart-coupon-apply {
    min-height: 44px;
    padding: 10px 16px;
  }
  .cart-step {
    min-height: 44px;
  }
  /* CTA button safe-area */
  .cart-footer-inline {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  /* Upsell button touch */
  .cart-upsell-btn {
    min-height: 44px;
    padding: 12px 16px;
  }
  /* Cross-sell touch */
  .cart-xs-add {
    min-height: 40px;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .cart-header { padding: 12px 14px 0; }
  .cart-col-left, .cart-col-right { padding: 12px 14px 14px; gap: 10px; }
  .cart-plan-features { grid-template-columns: 1fr; gap: 4px; }
  .cart-upsell-body { flex-direction: column; align-items: flex-start; }
  .cart-upsell-right { flex-direction: row; gap: 8px; }
}

/* ═══════ ACCOUNT PAGE — Mobile Fixes ═══════ */
@media (max-width: 900px) {
  /* Toggle touch target */
  .ac-toggle {
    width: 52px; height: 28px;
    min-width: 52px;
  }
  .ac-toggle-slider::before {
    width: 22px; height: 22px;
  }
  .ac-toggle input:checked + .ac-toggle-slider::before {
    transform: translateX(24px);
  }
  /* Nav items touch-friendly */
  .ac-nav-item {
    min-height: 48px;
  }
  /* Order actions full-width */
  .ac-order-actions {
    flex-direction: column;
    gap: 8px;
  }
  .ac-order-actions .ac-btn-primary,
  .ac-order-actions .ac-btn-secondary {
    width: 100%;
  }
  /* Card compact padding */
  .ac-card { padding: 18px 16px; }
  /* Address card actions touch */
  .ac-addr-action {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
}

/* ═══════ DECISION ENGINE — Mobile Fixes ═══════ */
@media (max-width: 480px) {
  .de-result-scores {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .de-score-ring {
    width: 75px;
  }
  .de-score-ring svg {
    width: 68px; height: 68px;
  }
  .de-score-value {
    font-size: 15px;
    top: 20px;
  }
  .de-result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ═══════ SPLASH — Mobile Performance ═══════ */
@media (max-width: 768px) {
  /* Already handled above — additional perf */
  .splash-const-path,
  .splash-star {
    animation-duration: 0.5s !important;
  }
  .splash-eye,
  .splash-pupil,
  .splash-center-star {
    animation-delay: 0.3s !important;
    animation-duration: 0.3s !important;
  }
  .splash-text {
    animation-delay: 0.5s !important;
  }
  .splash-tagline {
    animation-delay: 0.7s !important;
  }
}

/* ═══════ VIRAL SHARE — Mobile ═══════ */
@media (max-width: 640px) {
  .viral-share-btn {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
  }
}

/* ═══════ LEGAL PAGES — Mobile Fixes ═══════ */
@media (max-width: 640px) {
  .legal-nav .wrap {
    padding: 0 16px;
  }
  .legal-nav-links {
    display: none;
  }
  .legal-wrap {
    padding: 32px 16px 48px;
  }
  .legal-toc {
    padding: 16px 18px;
  }
  .legal-footer p {
    padding: 0 16px;
  }
}

/* ═══════ FORYOU INTELLIGENCE — Mobile Fixes ═══════ */
@media (max-width: 480px) {
  .fyi-badge-strip {
    padding: 8px 10px;
  }
  .fyi-match-ring {
    width: 32px; height: 32px;
  }
}

/* ═══════ PRINT STYLES — hide decorative elements ═══════ */
@media print {
  #mesh-bg,
  #stars-canvas,
  #urgency-banner,
  .splash-screen,
  .mobile-hamburger,
  .mobile-nav-drawer,
  .mobile-nav-backdrop,
  .demo-particles-canvas {
    display: none !important;
  }
}
