/* StoryNest by Creatorz — Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  --scai-primary:      #5b21b6;
  --scai-primary-light:#7c3aed;
  --scai-secondary:    #f97316;
  --scai-bg:           #faf7ff;
  --scai-cream:        #FFF8F0;
  --scai-card:         #ffffff;
  --scai-text:         #1a1028;
  --scai-text-light:   #6b7280;
  --scai-border:       #e5d8ff;
  --scai-radius:       16px;
  --scai-radius-sm:    10px;
  --scai-shadow:       0 4px 24px rgba(91,33,182,0.10);
  --scai-shadow-lg:    0 16px 48px rgba(91,33,182,0.18);
  --scai-gradient:     linear-gradient(135deg, #5b21b6 0%, #7c3aed 60%, #9333ea 100%);
  --scai-font:         'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --scai-serif:        'Georgia', 'Times New Roman', serif;
  --scai-transition:   all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base */
.scai-app {
  font-family: var(--scai-font);
  color: var(--scai-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.scai-app *, .scai-app *::before, .scai-app *::after { box-sizing: border-box; }
.scai-app input, .scai-app select, .scai-app textarea { font-family: var(--scai-font); }
.scai-optional { color: var(--scai-text-light); font-size: 12px; font-weight: 500; }

/* ── Mode Switcher — Animated Tabs v1.2.1 ─────────────────── */
.scai-mode-switcher {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  padding: 18px 18px 14px;
  background: #ea5e00;
  background: -webkit-linear-gradient(160deg, #f97316 0%, #c94a00 45%, #5b21b6 100%);
  background:         linear-gradient(160deg, #f97316 0%, #c94a00 45%, #5b21b6 100%);
  border-radius: var(--scai-radius);
}

.scai-switcher-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-align: center;
  margin-bottom: 4px;
  font-family: var(--scai-font);
}

.scai-mode-btn {
  flex: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.14);
  border: 1.5px solid rgba(255,255,255,0.28);
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--scai-font);
  font-weight: 600;
  text-align: left;
  /* KEY FIX: color must be white on all inactive buttons */
  color: #ffffff !important;
  position: relative;
  /* overflow hidden only clips content — box-shadow still shows outside */
  overflow: hidden;
  -webkit-transition: background 0.22s ease, -webkit-transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s ease, border-color 0.22s ease;
          transition: background 0.22s ease,         transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s ease, border-color 0.22s ease;
}

/* shimmer sweep — slides inside via ::before, works fine with overflow:hidden */
.scai-mode-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: -webkit-linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  background:         linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}
.scai-mode-btn:not(.active)[data-mode="story"]::before       { -webkit-animation: scaiShimmer 3.4s ease-in-out 0.0s infinite; animation: scaiShimmer 3.4s ease-in-out 0.0s infinite; }
.scai-mode-btn:not(.active)[data-mode="color"]::before       { -webkit-animation: scaiShimmer 3.4s ease-in-out 1.1s infinite; animation: scaiShimmer 3.4s ease-in-out 1.1s infinite; }
.scai-mode-btn:not(.active)[data-mode="handwriting"]::before { -webkit-animation: scaiShimmer 3.4s ease-in-out 2.2s infinite; animation: scaiShimmer 3.4s ease-in-out 2.2s infinite; }
.scai-mode-btn.active::before { display: none; }

/* pulse ring — uses box-shadow so it shows OUTSIDE the overflow:hidden box */
.scai-mode-btn:not(.active)[data-mode="story"] {
  -webkit-animation: scaiPulse 3s ease-out 0.0s infinite;
          animation: scaiPulse 3s ease-out 0.0s infinite;
}
.scai-mode-btn:not(.active)[data-mode="color"] {
  -webkit-animation: scaiPulse 3s ease-out 1.1s infinite;
          animation: scaiPulse 3s ease-out 1.1s infinite;
}
.scai-mode-btn:not(.active)[data-mode="handwriting"] {
  -webkit-animation: scaiPulse 3s ease-out 2.2s infinite;
          animation: scaiPulse 3s ease-out 2.2s infinite;
}

.scai-mode-btn:hover:not(.active) {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
  -webkit-transform: translateY(-1px);
          transform: translateY(-1px);
  -webkit-animation: none;
          animation: none;
}

.scai-mode-btn.active {
  background: rgba(255,255,255,0.97) !important;
  border-color: transparent !important;
  /* active = dark text on white */
  color: var(--scai-text) !important;
  box-shadow: 0 5px 24px rgba(0,0,0,0.25) !important;
  -webkit-transform: translateY(-1px);
          transform: translateY(-1px);
  -webkit-animation: none;
          animation: none;
}

/* icon wrapper */
.tab-icon {
  -webkit-flex-shrink: 0;
          flex-shrink: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,0.18);
  font-size: 17px;
  -webkit-transition: background 0.2s ease, -webkit-transform 0.3s cubic-bezier(.34,1.56,.64,1);
          transition: background 0.2s ease,         transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.scai-mode-btn.active .tab-icon {
  background: rgba(91,33,182,0.12);
  -webkit-animation: scaiIconPop 0.45s cubic-bezier(.34,1.56,.64,1);
          animation: scaiIconPop 0.45s cubic-bezier(.34,1.56,.64,1);
}

.tab-text {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
          flex-direction: column;
  gap: 3px;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
          flex: 1;
  min-width: 0;
}

.tab-title {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  color: inherit;
}

.tab-sub {
  font-size: 11px;
  font-weight: 500;
  color: inherit;
  opacity: 0.78;
  height: 14px;
  overflow: hidden;
}

.tab-sub-text {
  display: inline-block;
  -webkit-animation: scaiSubSlide 0.38s cubic-bezier(.22,1,.36,1);
          animation: scaiSubSlide 0.38s cubic-bezier(.22,1,.36,1);
}

/* chevron arrow */
.tab-arrow {
  -webkit-flex-shrink: 0;
          flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  -webkit-transition: -webkit-transform 0.3s ease, background 0.2s;
          transition:         transform 0.3s ease, background 0.2s;
  font-style: normal;
  line-height: 1;
}
.scai-mode-btn.active .tab-arrow {
  background: var(--scai-primary);
  color: #fff;
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
}

/* tap hint */
.scai-switcher-hint {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.5px;
  font-family: var(--scai-font);
  -webkit-animation: scaiHintPulse 2.8s ease-in-out infinite;
          animation: scaiHintPulse 2.8s ease-in-out infinite;
}
.scai-switcher-hint .hint-dots { display: -webkit-inline-box; display: -webkit-inline-flex; display: inline-flex; gap: 3px; }
.scai-switcher-hint .hint-dot  { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.55); display: inline-block; }
.scai-switcher-hint .hint-dot:nth-child(1) { -webkit-animation: scaiDotBounce 1.1s ease-in-out 0.00s infinite; animation: scaiDotBounce 1.1s ease-in-out 0.00s infinite; }
.scai-switcher-hint .hint-dot:nth-child(2) { -webkit-animation: scaiDotBounce 1.1s ease-in-out 0.18s infinite; animation: scaiDotBounce 1.1s ease-in-out 0.18s infinite; }
.scai-switcher-hint .hint-dot:nth-child(3) { -webkit-animation: scaiDotBounce 1.1s ease-in-out 0.36s infinite; animation: scaiDotBounce 1.1s ease-in-out 0.36s infinite; }

/* ── Keyframes ──────────────────────────────── */
@-webkit-keyframes scaiShimmer {
  0%        { left: -120%; }
  40%, 100% { left:  160%; }
}
@keyframes scaiShimmer {
  0%        { left: -120%; }
  40%, 100% { left:  160%; }
}

/* pulse ring via box-shadow — not clipped by overflow:hidden */
@-webkit-keyframes scaiPulse {
  0%   { box-shadow: 0 0 0 0px rgba(255,255,255,0.55); }
  60%  { box-shadow: 0 0 0 7px rgba(255,255,255,0.00); }
  100% { box-shadow: 0 0 0 0px rgba(255,255,255,0.00); }
}
@keyframes scaiPulse {
  0%   { box-shadow: 0 0 0 0px rgba(255,255,255,0.55); }
  60%  { box-shadow: 0 0 0 7px rgba(255,255,255,0.00); }
  100% { box-shadow: 0 0 0 0px rgba(255,255,255,0.00); }
}

@-webkit-keyframes scaiIconPop {
  0%   { -webkit-transform: scale(0.72) rotate(-10deg); transform: scale(0.72) rotate(-10deg); }
  60%  { -webkit-transform: scale(1.16) rotate( 3deg); transform: scale(1.16) rotate( 3deg); }
  100% { -webkit-transform: scale(1)    rotate( 0deg); transform: scale(1)    rotate( 0deg); }
}
@keyframes scaiIconPop {
  0%   { -webkit-transform: scale(0.72) rotate(-10deg); transform: scale(0.72) rotate(-10deg); }
  60%  { -webkit-transform: scale(1.16) rotate( 3deg); transform: scale(1.16) rotate( 3deg); }
  100% { -webkit-transform: scale(1)    rotate( 0deg); transform: scale(1)    rotate( 0deg); }
}

@-webkit-keyframes scaiSubSlide {
  from { opacity: 0; -webkit-transform: translateY(5px); transform: translateY(5px); }
  to   { opacity: 1; -webkit-transform: translateY(0);   transform: translateY(0); }
}
@keyframes scaiSubSlide {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

@-webkit-keyframes scaiHintPulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 0.90; }
}
@keyframes scaiHintPulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 0.90; }
}

@-webkit-keyframes scaiDotBounce {
  0%, 100% { -webkit-transform: translateY(0);   transform: translateY(0); }
  50%       { -webkit-transform: translateY(-3px); transform: translateY(-3px); }
}
@keyframes scaiDotBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

/* Hero */
.scai-hero {
  position: relative;
  background: var(--scai-gradient);
  border-radius: var(--scai-radius);
  padding: 56px 48px;
  margin-bottom: 32px;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.scai-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.scai-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.scai-hero-inner { position: relative; z-index: 2; max-width: 540px; }
.scai-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.scai-hero-title {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 16px;
}
.scai-hero-sub {
  font-size: 18px;
  opacity: 0.88;
  margin-bottom: 24px;
  max-width: 480px;
  font-weight: 500;
}
.scai-hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.scai-hero-features span {
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.scai-hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.scai-btn-hero {
  background: #fff;
  color: var(--scai-primary);
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  font-family: var(--scai-font);
  transition: var(--scai-transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.scai-btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.2); }
.scai-hero-trust { font-size: 12px; opacity: 0.75; font-weight: 500; }
.scai-hero-illustration {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 260px;
}
.scai-book-svg { width: 100%; height: auto; filter: drop-shadow(0 12px 28px rgba(0,0,0,0.22)); }

/* Sample Story Section */
/* ═══════════════════════════════════════════════════
   FLIPBOOK SHOWCASE SECTION
════════════════════════════════════════════════════ */

/* Section wrapper */
.scai-sw-section {
  position: relative;
  background: linear-gradient(160deg, #09041a 0%, #1a0842 35%, #0d1b3e 70%, #060b1a 100%);
  border-radius: 24px;
  margin-bottom: 32px;
  padding: 48px 20px 40px;
  overflow: hidden;
  isolation: isolate;
}

/* Aurora blobs */
.scai-sw-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.scai-sw-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.28;
  animation: swAuroraFloat 8s ease-in-out infinite;
}
.sw-a1 {
  width: 280px; height: 220px;
  background: radial-gradient(ellipse, #7c3aed 0%, transparent 70%);
  top: -60px; left: -40px;
  animation-duration: 9s;
}
.sw-a2 {
  width: 240px; height: 200px;
  background: radial-gradient(ellipse, #10b981 0%, transparent 70%);
  top: -40px; right: -60px;
  animation-duration: 11s; animation-delay: -4s;
}
.sw-a3 {
  width: 320px; height: 160px;
  background: radial-gradient(ellipse, #6d28d9 0%, transparent 70%);
  bottom: -40px; left: 20%;
  animation-duration: 13s; animation-delay: -7s;
}
@keyframes swAuroraFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(12px, -18px) scale(1.05); }
  66%       { transform: translate(-8px, 10px) scale(0.96); }
}

/* Stars */
.scai-sw-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 40%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 55% 12%, rgba(255,255,255,0.60) 0%, transparent 100%),
    radial-gradient(1px 1px at 72% 55%, rgba(255,255,255,0.40) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 22%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(1px 1px at 18% 75%, rgba(255,255,255,0.30) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 92% 80%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 44% 88%, rgba(255,255,255,0.35) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Section header */
.scai-sw-header {
  position: relative; z-index: 1;
  text-align: center;
  margin-bottom: 36px;
}
.scai-sw-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(196,181,253,0.8);
  margin-bottom: 12px;
}
.scai-sw-eyebrow-gem { font-size: 10px; color: #a78bfa; }
.scai-sw-title {
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 10px;
  line-height: 1.15;
  font-family: var(--scai-font);
  text-shadow: 0 2px 20px rgba(124,58,237,0.4);
}
.scai-sw-sub {
  font-size: 14px; color: rgba(196,181,253,0.7);
  margin: 0; line-height: 1.5;
}

/* Stage: both books side by side */
.scai-sw-stage {
  position: relative; z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

/* Divider between books */
.scai-sw-divider {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 0 10px;
  margin-top: 20px;
  flex-shrink: 0;
}
.scai-sw-div-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(167,139,250,0.3), transparent);
}
.scai-sw-div-gem {
  font-size: 12px; color: rgba(167,139,250,0.5);
}

/* ── Book unit ─────────────────────────── */
.scai-sw-book-unit {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: 1;
  max-width: 200px;
  position: relative;
}

/* spotlight glow behind each book */
.scai-sw-spotlight {
  position: absolute;
  width: 140px; height: 140px;
  border-radius: 50%;
  filter: blur(40px);
  top: 10px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  animation: swSpotPulse 3s ease-in-out infinite;
}
.sw-spotlight-purple { background: radial-gradient(circle, rgba(124,58,237,0.35) 0%, transparent 70%); }
.sw-spotlight-green  { background: radial-gradient(circle, rgba(16,185,129,0.30) 0%, transparent 70%); }
@keyframes swSpotPulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.15); }
}

/* ── Book wrap (perspective container) ──── */
.scai-sw-book-wrap {
  position: relative;
  z-index: 1;
  perspective: 1200px;
}

/* The book (contains stacked pages) */
.scai-sw-book {
  --sw-w: 130px;
  --sw-h: 182px;
  position: relative;
  width: var(--sw-w);
  height: var(--sw-h);
  transform-style: preserve-3d;
}

/* Spine strip on left */
.scai-sw-spine {
  position: absolute;
  left: -8px; top: 4px;
  width: 8px;
  height: calc(100% - 6px);
  border-radius: 2px 0 0 2px;
  z-index: 50;
}
.sw-spine-purple { background: linear-gradient(to bottom, #6d28d9, #4c1d95); box-shadow: -2px 0 8px rgba(109,40,217,0.5); }
.sw-spine-green  { background: linear-gradient(to bottom, #059669, #064e3b); box-shadow: -2px 0 8px rgba(5,150,105,0.5); }

/* Pages edge — stacked paper effect on right */
.scai-sw-pages-edge {
  position: absolute;
  right: -5px; top: 3px;
  width: 6px; height: calc(100% - 5px);
  background: repeating-linear-gradient(
    to bottom,
    #f0ece8 0px, #f0ece8 1px,
    #e8e4e0 1px, #e8e4e0 2px
  );
  border-radius: 0 2px 2px 0;
  box-shadow: 2px 0 6px rgba(0,0,0,0.25);
}
.sw-edge-green {
  background: repeating-linear-gradient(
    to bottom,
    #ecfdf5 0px, #ecfdf5 1px,
    #d1fae5 1px, #d1fae5 2px
  );
}

/* Book drop shadow */
.scai-sw-book-shadow {
  position: absolute;
  bottom: -14px; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 18px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.55) 0%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

/* ── Individual pages ──────────────────── */
.scai-sw-page {
  position: absolute;
  inset: 0;
  border-radius: 0 6px 6px 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 2px 2px 12px rgba(0,0,0,0.18);
  /* flip origin = left edge (spine) */
  transform-origin: left center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  transition: transform 0.85s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Flipped state — page rotated away, z-index drops behind base */
.scai-sw-page.sw-flipped {
  transform: rotateY(-180deg);
  z-index: 0 !important;
}

/* entrance animation for books when section enters viewport */
.scai-sw-book-wrap {
  opacity: 0;
  transform: translateY(24px) scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.scai-sw-section.sw-in-view .scai-sw-book-wrap {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#sw-unit-hw .scai-sw-book-wrap { transition-delay: 0.15s; }

/* ── Cover design ──────────────────────── */
.scai-sw-cover {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 12px 10px;
  position: relative;
  overflow: hidden;
}
.sw-cover-story {
  background: linear-gradient(160deg, #3b0764 0%, #6d28d9 50%, #a855f7 100%);
}
.sw-cover-hw {
  background: linear-gradient(160deg, #022c22 0%, #059669 50%, #34d399 100%);
}

/* shimmer on cover */
.scai-sw-cover-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%, rgba(255,255,255,0.06) 100%);
  pointer-events: none;
}

.scai-sw-cover-badge {
  font-size: 9px; font-weight: 700;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  padding: 3px 8px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  position: relative; z-index: 1;
}
.scai-sw-cover-emoji {
  font-size: 28px; line-height: 1;
  margin-bottom: 8px;
  position: relative; z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.scai-sw-cover-title {
  font-size: 13px; font-weight: 900;
  color: #ffffff;
  margin: 0 0 6px;
  line-height: 1.2;
  font-family: var(--scai-font);
  position: relative; z-index: 1;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.scai-sw-cover-sub {
  font-size: 9px; color: rgba(255,255,255,0.7);
  margin: 0 0 8px;
  position: relative; z-index: 1;
}
.scai-sw-cover-pill {
  font-size: 9px; font-weight: 700;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
  border-radius: 50px;
  padding: 3px 9px;
  position: relative; z-index: 1;
}

/* ── Story page content ────────────────── */
.scai-sw-page-inner {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: #fffdf8;
  padding: 10px 10px 8px;
  box-sizing: border-box;
}
.scai-sw-page-num {
  font-size: 8px; font-weight: 800;
  color: #7c3aed; text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 6px;
}

/* Scene illustration */
.scai-sw-scene {
  flex: 1;
  display: flex; flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
  min-height: 80px;
}
.scai-sw-scene-sky {
  flex: 1;
}
.sw-scene-day .scai-sw-scene-sky    { background: linear-gradient(to bottom, #bfdbfe 0%, #fde68a 100%); }
.sw-scene-sunset .scai-sw-scene-sky { background: linear-gradient(to bottom, #fbbf24 0%, #f97316 60%, #ef4444 100%); }
.sw-scene-night .scai-sw-scene-sky  { background: linear-gradient(to bottom, #1e1b4b 0%, #312e81 100%); }

.scai-sw-scene-char {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  font-size: 34px; line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  z-index: 2;
}
.scai-sw-scene-ground {
  height: 22px;
}
.sw-ground-grass   { background: linear-gradient(to bottom, #4ade80, #16a34a); }
.sw-ground-savanna { background: linear-gradient(to bottom, #fbbf24, #d97706); }

.scai-sw-story-text {
  font-size: 8px; color: #374151;
  line-height: 1.45; margin: 0;
  font-style: italic;
}

/* ── Back cover ────────────────────────── */
.scai-sw-back-cover {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 16px 12px;
  background: linear-gradient(160deg, #0f0530 0%, #2d1b69 100%);
  box-sizing: border-box;
}
.sw-back-green {
  background: linear-gradient(160deg, #022c22 0%, #065f46 100%);
}
.scai-sw-back-stars {
  font-size: 14px; margin-bottom: 10px;
  color: #c4b5fd;
}
.scai-sw-back-cover p {
  font-size: 9px; color: rgba(255,255,255,0.7);
  line-height: 1.5; margin: 0 0 10px;
}
.scai-sw-back-brand {
  font-size: 13px; font-weight: 900;
  color: #c4b5fd; letter-spacing: 1px;
  font-family: var(--scai-font);
}

/* ── Handwriting pages ─────────────────── */
.sw-hw-page { background: #ffffff; }
.scai-sw-hw-header {
  display: flex; justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #10b981;
  padding-bottom: 5px; margin-bottom: 6px;
  font-size: 7px; font-weight: 700;
  color: #6b7280; letter-spacing: 0.3px;
}
.scai-sw-hw-display {
  font-size: 52px; font-weight: 900;
  text-align: center; line-height: 1;
  margin: 4px 0 6px;
  font-family: Georgia, serif;
}
.scai-sw-hw-label {
  font-size: 7px; font-style: italic;
  color: #9ca3af; text-align: center;
  margin-bottom: 6px;
}
.scai-sw-hw-row {
  display: flex; justify-content: space-around;
  margin-bottom: 4px;
}
.scai-sw-hw-char {
  font-size: 18px; font-weight: 700;
  color: rgba(16,185,129,0.25);
  font-family: Georgia, serif;
  border-bottom: 1px dashed rgba(16,185,129,0.2);
  min-width: 24px; text-align: center;
}
.sw-hw-fade .scai-sw-hw-char     { color: rgba(16,185,129,0.15); }
.sw-hw-very-fade .scai-sw-hw-char { color: rgba(16,185,129,0.08); }
.scai-sw-hw-divider-line {
  height: 1px;
  background: rgba(16,185,129,0.15);
  margin: 4px 0;
}

/* ── Progress dots ─────────────────────── */
.scai-sw-dots {
  display: flex; gap: 6px;
  align-items: center; justify-content: center;
}
.scai-sw-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s ease, transform 0.3s ease;
}
.scai-sw-dot.sw-dot-active {
  background: #a78bfa;
  transform: scale(1.3);
}
#sw-dots-hw .scai-sw-dot.sw-dot-active { background: #34d399; }

/* ── Book label ────────────────────────── */
.scai-sw-book-label {
  font-size: 11px; font-weight: 700;
  color: rgba(196,181,253,0.8);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}

/* ── CTA row ───────────────────────────── */
.scai-sw-cta {
  position: relative; z-index: 1;
  text-align: center; margin-top: 36px;
}
.scai-sw-cta-txt {
  font-size: 13px; color: rgba(196,181,253,0.7);
  margin: 0 0 14px;
}
.scai-sw-cta-txt strong { color: #c4b5fd; }
.scai-sw-cta-btn { display: inline-flex; align-items: center; gap: 8px; }
.scai-sw-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.scai-sw-cta-btn:hover .scai-sw-arrow { transform: translateX(4px); }

/* ── Desktop responsive ────────────────── */
@media (min-width: 600px) {
  .scai-sw-section { padding: 60px 48px 52px; }
  .scai-sw-book-unit { max-width: 260px; }
  .scai-sw-book { --sw-w: 190px; --sw-h: 266px; }
  .scai-sw-cover-emoji { font-size: 40px; }
  .scai-sw-cover-title { font-size: 17px; }
  .scai-sw-cover-badge { font-size: 10px; }
  .scai-sw-cover-sub { font-size: 11px; }
  .scai-sw-cover-pill { font-size: 10px; }
  .scai-sw-story-text { font-size: 10px; }
  .scai-sw-page-num { font-size: 9px; }
  .scai-sw-scene-char { font-size: 44px; }
  .scai-sw-hw-display { font-size: 68px; }
  .scai-sw-hw-char { font-size: 22px; min-width: 28px; }
  .scai-sw-hw-header { font-size: 8px; }
  .scai-sw-hw-label { font-size: 8px; }
  .scai-sw-divider { padding: 0 20px; }
  .scai-sw-div-line { height: 70px; }
  .sw-a1 { width: 400px; height: 320px; }
  .sw-a2 { width: 360px; height: 300px; }
  .scai-sw-title { margin-bottom: 12px; }
  .scai-sw-sub { font-size: 15px; }
}

@media (min-width: 900px) {
  .scai-sw-section { padding: 72px 64px 60px; }
  .scai-sw-book-unit { max-width: 320px; }
  .scai-sw-book { --sw-w: 230px; --sw-h: 322px; }
  .scai-sw-cover-emoji { font-size: 52px; }
  .scai-sw-cover-title { font-size: 20px; }
  .scai-sw-story-text { font-size: 11px; }
  .scai-sw-scene-char { font-size: 56px; bottom: 28px; }
  .scai-sw-hw-display { font-size: 88px; }
  .scai-sw-hw-char { font-size: 28px; min-width: 36px; }
  .scai-sw-spotlight { width: 200px; height: 200px; }
  .scai-sw-div-line { height: 90px; }
  .scai-sw-divider { padding: 0 32px; }
}

/* Testimonials */
.scai-testimonials {
  background: var(--scai-cream);
  border-radius: var(--scai-radius);
  padding: 40px 32px;
  margin-bottom: 40px;
  border: 1.5px solid #ffd6a5;
}
.scai-testimonials-heading {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--scai-text);
  margin-bottom: 24px;
}
.scai-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.scai-testimonial {
  background: var(--scai-card);
  border-radius: var(--scai-radius-sm);
  padding: 20px;
  border: 1.5px solid var(--scai-border);
}
.scai-testimonial-stars { color: #f59e0b; font-size: 14px; margin-bottom: 10px; letter-spacing: 2px; }
.scai-testimonial p { font-size: 14px; color: var(--scai-text); line-height: 1.6; margin-bottom: 14px; font-style: italic; }
.scai-testimonial-author { display: flex; align-items: center; gap: 10px; }
.scai-testimonial-avatar {
  width: 36px; height: 36px;
  background: var(--scai-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.scai-testimonial-author strong { display: block; font-size: 13px; font-weight: 700; }
.scai-testimonial-author span { font-size: 12px; color: var(--scai-text-light); }

/* Wizard frame — rotating conic border */
.scai-wizard-frame {
  position: relative;
  border-radius: 22px;
  padding: 3px;
  margin-bottom: 32px;
  overflow: hidden;
  background: var(--scai-border);
}
.scai-wizard-frame::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: conic-gradient(
    from 0deg,
    #5b21b6 0%,
    #7c3aed 20%,
    #f97316 40%,
    #fb923c 50%,
    #f97316 60%,
    #7c3aed 80%,
    #5b21b6 100%
  );
  animation: wizardSpin 5s linear infinite;
  z-index: 0;
}
@keyframes wizardSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Wizard inner card */
.scai-wizard {
  position: relative;
  z-index: 1;
  background: var(--scai-card);
  border-radius: 19px;
  overflow: hidden;
}

/* Step nav */
.scai-steps-nav {
  display: flex;
  align-items: center;
  padding: 20px 32px;
  background: linear-gradient(135deg, #f5f0ff 0%, #fdf4ff 100%);
  border-bottom: 1.5px solid var(--scai-border);
}
.scai-step-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.dot-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--scai-border);
  color: var(--scai-text-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  transition: var(--scai-transition);
  position: relative;
}
.dot-label { font-size: 12px; font-weight: 700; color: var(--scai-text-light); white-space: nowrap; }
.scai-step-dot.active .dot-num {
  background: var(--scai-gradient);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(91,33,182,0.18), 0 0 16px rgba(91,33,182,0.3);
}
.scai-step-dot.active .dot-num::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(91,33,182,0.3);
  animation: dotPulse 2s ease infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.2); opacity: 0; }
}
.scai-step-dot.active .dot-label { color: var(--scai-primary); font-weight: 800; }
.scai-step-dot.completed .dot-num { background: #10b981; color: #fff; }
.scai-step-dot.completed .dot-label { color: #10b981; }
.scai-step-line { flex: 1; height: 2px; background: var(--scai-border); margin: 0 8px; transition: background 0.4s; }
.scai-step-line.done { background: var(--scai-primary); }

/* Panel */
.scai-panel { display: none; }
.scai-panel.active { display: block; animation: panelReveal 0.38s cubic-bezier(0.22,1,0.36,1); }
@keyframes panelReveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.scai-panel-header {
  padding: 28px 32px 20px;
  border-bottom: 1.5px solid var(--scai-border);
  background: linear-gradient(135deg, #f5f0ff 0%, #fefcff 100%);
  position: relative;
  overflow: hidden;
}
.scai-panel-header::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(91,33,182,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.scai-panel-header h2 {
  font-size: 22px; font-weight: 800; color: var(--scai-text); margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px;
}
.scai-panel-header h2::before {
  content: '';
  display: inline-block;
  width: 5px; height: 24px;
  background: var(--scai-gradient);
  border-radius: 3px;
  flex-shrink: 0;
}
.scai-panel-header p { font-size: 14px; color: var(--scai-text-light); margin: 4px 0 0 15px; }

/* Panel body — tinted form area */
.scai-panel-body {
  padding: 28px 32px 32px;
  background: linear-gradient(180deg, #f9f6ff 0%, #ffffff 60%);
  position: relative;
}
.scai-panel-body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,33,182,0.2), transparent);
}

/* Form grid */
.scai-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.scai-full { grid-column: 1 / -1; }

/* Field cards */
.scai-field {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1.5px solid var(--scai-border);
  border-left: 4px solid var(--scai-primary);
  box-shadow: 0 2px 12px rgba(91,33,182,0.06);
  transition: var(--scai-transition);
}
.scai-field:hover {
  border-color: rgba(91,33,182,0.35);
  border-left-color: var(--scai-primary);
  box-shadow: 0 6px 24px rgba(91,33,182,0.10);
  transform: translateY(-1px);
}
.scai-field:focus-within {
  border-color: var(--scai-primary);
  border-left-color: var(--scai-secondary);
  box-shadow: 0 6px 28px rgba(91,33,182,0.14);
  transform: translateY(-2px);
}
.scai-field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--scai-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.scai-field-icon {
  color: var(--scai-secondary);
  font-style: normal;
  display: inline-block;
  animation: iconSpin 3s ease infinite;
}
@keyframes iconSpin {
  0%, 90%, 100% { transform: rotate(0deg) scale(1); }
  95%            { transform: rotate(180deg) scale(1.3); }
}
.scai-field input, .scai-field select, .scai-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e9e0ff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--scai-text);
  background: #faf8ff;
  outline: none;
  transition: var(--scai-transition);
  font-family: var(--scai-font);
}
.scai-field input::placeholder, .scai-field textarea::placeholder { color: #c4b3f0; font-weight: 500; }
.scai-field input:focus, .scai-field select:focus, .scai-field textarea:focus {
  border-color: var(--scai-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91,33,182,0.1);
}
.scai-field-hint { font-size: 11px; color: var(--scai-text-light); margin-top: 6px; font-weight: 500; }
.scai-privacy-note { color: #059669 !important; font-weight: 700 !important; }
.req { color: var(--scai-secondary); }

/* Staggered field entry animation */
.scai-panel.active .scai-field { animation: fieldIn 0.4s cubic-bezier(0.22,1,0.36,1) both; }
.scai-panel.active .scai-field:nth-child(1) { animation-delay: 0.05s; }
.scai-panel.active .scai-field:nth-child(2) { animation-delay: 0.10s; }
.scai-panel.active .scai-field:nth-child(3) { animation-delay: 0.15s; }
.scai-panel.active .scai-field:nth-child(4) { animation-delay: 0.20s; }
.scai-panel.active .scai-field:nth-child(5) { animation-delay: 0.25s; }
.scai-panel.active .scai-field:nth-child(6) { animation-delay: 0.30s; }
@keyframes fieldIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Age picker */
.scai-age-picker { display: flex; align-items: center; gap: 8px; }
.scai-age-picker input { text-align: center; width: 60px; flex-shrink: 0; }
.age-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--scai-border);
  background: var(--scai-bg);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
  color: var(--scai-primary);
  transition: var(--scai-transition);
  display: flex; align-items: center; justify-content: center;
}
.age-btn:hover { background: var(--scai-primary); color: #fff; border-color: var(--scai-primary); }

/* Theme grid */
.scai-theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.scai-theme-opt {
  padding: 10px 12px;
  border: 2px solid var(--scai-border);
  border-radius: var(--scai-radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: var(--scai-transition);
  text-align: center;
  background: var(--scai-bg);
}
.scai-theme-opt:hover { border-color: var(--scai-primary); background: #f3f0ff; }
.scai-theme-opt.selected { background: var(--scai-primary); color: #fff; border-color: var(--scai-primary); }

/* Moral chips */
.scai-moral-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.scai-chip {
  padding: 7px 14px;
  border: 2px solid var(--scai-border);
  border-radius: 50px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: var(--scai-transition);
  background: var(--scai-bg);
}
.scai-chip:hover { border-color: var(--scai-primary); }
.scai-chip.selected { background: var(--scai-primary); color: #fff; border-color: var(--scai-primary); }

/* Style grid */
.scai-style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.scai-style-opt {
  border: 2px solid var(--scai-border);
  border-radius: var(--scai-radius-sm);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--scai-transition);
  background: var(--scai-bg);
}
.scai-style-opt:hover { border-color: var(--scai-primary); }
.scai-style-opt.selected { border-color: var(--scai-primary); background: #f3f0ff; box-shadow: 0 0 0 3px rgba(91,33,182,0.12); }
.scai-style-thumb { width: 48px; height: 48px; border-radius: 8px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.scai-style-opt span { font-size: 12px; font-weight: 700; color: var(--scai-text); }

/* Slider */
.scai-slider-wrap input[type=range] { width: 100%; height: 6px; border-radius: 3px; accent-color: var(--scai-primary); }
.scai-slider-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--scai-text-light); margin-top: 6px; font-weight: 600; }

/* Urgency bar */
.scai-urgency-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef3c7;
  border: 1.5px solid #fcd34d;
  border-radius: var(--scai-radius-sm);
  padding: 10px 20px;
  margin: 16px 32px 0;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
}
.scai-urgency-icon { font-size: 18px; }
#scai-countdown { font-size: 15px; color: #b45309; font-weight: 800; }

/* Extras grid */
.scai-extras-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.scai-extra-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--scai-border);
  border-radius: var(--scai-radius-sm);
  transition: var(--scai-transition);
  background: var(--scai-bg);
}
.scai-extra-card:hover { border-color: var(--scai-primary); }
.scai-extra-icon { font-size: 28px; flex-shrink: 0; }
.scai-extra-info { flex: 1; }
.scai-extra-info h4 { font-size: 14px; font-weight: 800; margin-bottom: 2px; }
.scai-extra-info p { font-size: 12px; color: var(--scai-text-light); margin: 0 0 4px; }
.scai-extra-price { font-size: 13px; font-weight: 700; color: var(--scai-primary); }

/* Toggle */
.scai-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.scai-toggle input { opacity: 0; width: 0; height: 0; }
.scai-toggle-slider {
  position: absolute; inset: 0;
  background: #d1d5db;
  border-radius: 24px;
  cursor: pointer;
  transition: var(--scai-transition);
}
.scai-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--scai-transition);
}
.scai-toggle input:checked + .scai-toggle-slider { background: var(--scai-primary); }
.scai-toggle input:checked + .scai-toggle-slider::before { transform: translateX(20px); }

/* Email block */
.scai-email-block { max-width: 520px; margin: 0 auto 20px; }

/* Gift toggle */
.scai-gift-toggle-row { margin: 10px 0; }
.scai-gift-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--scai-text);
  cursor: pointer;
}
.scai-gift-label input[type=checkbox] { display: none; }
.scai-gift-check {
  width: 18px; height: 18px;
  border: 2px solid var(--scai-border);
  border-radius: 5px;
  flex-shrink: 0;
  transition: var(--scai-transition);
  position: relative;
  background: #fff;
}
.scai-gift-label input:checked ~ .scai-gift-check { background: var(--scai-primary); border-color: var(--scai-primary); }
.scai-gift-label input:checked ~ .scai-gift-check::after { content: '✓'; position: absolute; top: -2px; left: 2px; color: #fff; font-size: 13px; font-weight: 800; }
.scai-gift-email-wrap { margin-top: 10px; animation: fadeSlide 0.3s ease; }

/* WhatsApp row */
.scai-whatsapp-row { margin-top: 12px; }
.scai-whatsapp-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--scai-text);
  margin-bottom: 6px;
}
.scai-whatsapp-row input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--scai-border);
  border-radius: var(--scai-radius-sm);
  font-size: 14px;
  font-family: var(--scai-font);
  outline: none;
  transition: var(--scai-transition);
}
.scai-whatsapp-row input:focus { border-color: #25D366; box-shadow: 0 0 0 3px rgba(37,211,102,0.12); }

/* Price summary */
.scai-price-summary {
  background: var(--scai-bg);
  border: 1.5px solid var(--scai-border);
  border-radius: var(--scai-radius-sm);
  padding: 20px;
  max-width: 520px;
  margin: 0 auto 20px;
}
.scai-price-summary h3 { font-size: 14px; font-weight: 800; margin-bottom: 12px; color: var(--scai-text); }
.scai-price-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.scai-price-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--scai-text-light); font-weight: 600; }
.scai-price-total {
  display: flex; justify-content: space-between;
  font-size: 16px; font-weight: 800;
  border-top: 1.5px solid var(--scai-border);
  padding-top: 12px;
  color: var(--scai-text);
}

/* Pay area */
.scai-pay-area { text-align: center; margin-bottom: 16px; }
.scai-btn-pay {
  background: var(--scai-gradient);
  color: #fff;
  border: none;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--scai-font);
  box-shadow: 0 8px 28px rgba(91,33,182,0.35);
  transition: var(--scai-transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.scai-btn-pay:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(91,33,182,0.45); }
.scai-pay-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #059669;
  font-weight: 600;
}
.scai-pay-trust svg { vertical-align: middle; }

/* Panel actions */
.scai-panel-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 16px; border-top: 1.5px solid var(--scai-border); margin-top: 24px; }

/* Buttons */
.scai-btn {
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: var(--scai-font);
  transition: var(--scai-transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.scai-btn-primary { background: var(--scai-gradient); color: #fff; box-shadow: 0 4px 16px rgba(91,33,182,0.25); }
.scai-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(91,33,182,0.35); }
.scai-btn-outline { background: transparent; border: 2px solid var(--scai-border); color: var(--scai-text-light); }
.scai-btn-outline:hover { border-color: var(--scai-primary); color: var(--scai-primary); }
.scai-btn-secondary { background: var(--scai-secondary); color: #fff; }
.scai-btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

/* Generating */
.scai-generating { text-align: center; padding: 60px 32px; }
.scai-gen-animation { margin-bottom: 24px; }
.scai-book-anim { font-size: 56px; animation: bounce 1.2s infinite; display: block; margin-bottom: 8px; }
.scai-sparkles { font-size: 20px; letter-spacing: 8px; animation: pulse 1.5s infinite; }
.scai-generating h3 { font-size: 20px; font-weight: 800; color: var(--scai-text); margin-bottom: 16px; }
.scai-progress-bar { background: var(--scai-border); border-radius: 10px; height: 10px; overflow: hidden; max-width: 400px; margin: 0 auto 10px; }
.scai-progress-fill { height: 100%; background: var(--scai-gradient); border-radius: 10px; transition: width 0.4s ease; }
.scai-gen-sub { font-size: 14px; color: var(--scai-text-light); font-weight: 600; }
.scai-gen-steps { font-size: 13px; color: var(--scai-text-light); margin-top: 16px; }

/* Story toolbar */
.scai-story-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1.5px solid var(--scai-border);
  flex-wrap: wrap;
  gap: 12px;
}
.scai-story-title-area h2 { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.scai-story-title-area p { font-size: 13px; color: var(--scai-text-light); margin: 0; font-weight: 600; }
.scai-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Flipbook */
.scai-flipbook-wrap { padding: 24px; background: #f8f5ff; }
.scai-flipbook-outer { max-width: 700px; margin: 0 auto; }
.scai-flipbook-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; font-size: 14px; color: var(--scai-text-light); font-weight: 600; }
.scai-flip-btn { background: var(--scai-card); border: 2px solid var(--scai-border); width: 38px; height: 38px; border-radius: 50%; font-size: 20px; cursor: pointer; transition: var(--scai-transition); color: var(--scai-primary); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.scai-flip-btn:hover { background: var(--scai-primary); color: #fff; border-color: var(--scai-primary); }
.scai-flipbook { background: var(--scai-card); border-radius: var(--scai-radius); box-shadow: var(--scai-shadow-lg); min-height: 300px; overflow: hidden; }

/* Retrieve section */
.scai-retrieve-section {
  background: var(--scai-bg);
  border: 1.5px solid var(--scai-border);
  border-radius: var(--scai-radius);
  margin-bottom: 32px;
}
.scai-retrieve-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  flex-wrap: wrap;
}
.scai-retrieve-icon { font-size: 22px; }
.scai-retrieve-inner div { flex: 1; font-size: 14px; }
.scai-retrieve-inner strong { display: block; font-weight: 800; color: var(--scai-text); }
.scai-retrieve-inner span { color: var(--scai-text-light); font-size: 13px; }

/* Error bar */
.scai-error-bar {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
  border-radius: var(--scai-radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Modal */
.scai-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.scai-modal {
  background: var(--scai-card);
  border-radius: var(--scai-radius);
  padding: 36px 32px;
  max-width: 420px; width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.scai-modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--scai-text-light); }
.scai-modal-icon { font-size: 44px; margin-bottom: 12px; }
.scai-modal h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.scai-modal p { font-size: 14px; color: var(--scai-text-light); margin-bottom: 16px; }
.scai-modal-price { font-size: 22px; font-weight: 900; color: var(--scai-primary); margin-bottom: 16px; }

/* PDF progress */
.scai-pdf-progress {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}
.scai-pdf-progress.active { display: flex; }
.scai-pdf-progress-inner {
  background: var(--scai-card);
  border-radius: var(--scai-radius);
  padding: 36px 40px;
  text-align: center;
  min-width: 280px;
}
.scai-pdf-spinner { width: 44px; height: 44px; border: 4px solid var(--scai-border); border-top-color: var(--scai-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
.scai-pdf-progress-bar { background: var(--scai-border); border-radius: 10px; height: 6px; overflow: hidden; margin-top: 16px; }
.scai-pdf-progress-fill { height: 100%; background: var(--scai-gradient); border-radius: 10px; animation: progressAnim 3s ease infinite; }

/* Keyframes */
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progressAnim { 0% { width:10%; } 70% { width:85%; } 100% { width:95%; } }
@keyframes fadeSlide { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* Coloring hero */
.scai-color-hero { background: var(--scai-gradient); border-radius: var(--scai-radius); padding: 40px 36px; color: #fff; margin-bottom: 28px; }
.scai-color-hero-badge { display: inline-block; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.28); border-radius: 50px; padding: 5px 16px; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.scai-color-hero h2 { font-size: clamp(22px,3.5vw,32px); font-weight: 800; margin-bottom: 10px; }
.scai-color-hero p { opacity: 0.88; font-size: 15px; margin-bottom: 18px; }
.scai-color-features { display: flex; flex-wrap: wrap; gap: 8px; }
.scai-color-features span { background: rgba(255,255,255,0.15); border-radius: 50px; padding: 5px 12px; font-size: 13px; font-weight: 600; }

/* Handwriting hero */
.scai-hw-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); border-radius: var(--scai-radius); padding: 40px 36px; color: #fff; margin-bottom: 28px; }
.scai-hw-hero-badge { display: inline-block; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 50px; padding: 5px 16px; font-size: 13px; font-weight: 700; margin-bottom: 16px; }

/* Responsive */
@media (max-width: 768px) {
  .scai-hero { flex-direction: column; padding: 36px 24px; }
  .scai-hero-illustration { width: 180px; margin: 0 auto; }
  .scai-mode-switcher { flex-direction: column; }
  
  .scai-testimonials-grid { grid-template-columns: 1fr; }
  .scai-extras-grid { grid-template-columns: 1fr; }
  .scai-form-grid { grid-template-columns: 1fr; }
  .scai-steps-nav { gap: 4px; padding: 16px; }
  .dot-label { display: none; }
  .scai-panel-body { padding: 0 16px 20px; }
  .scai-panel-header { padding: 20px 16px 14px; }
  .scai-wizard-frame { border-radius: 16px; }
  .scai-field { padding: 12px 14px; }
  .scai-steps-nav { padding: 14px; }
  .scai-urgency-bar { margin: 12px 16px 0; }
  .scai-story-toolbar { flex-direction: column; align-items: flex-start; }
}


/* ═══════════════════════════════════════════════════
   FORM MODAL — bottom sheet (mobile) / dialog (desktop)
════════════════════════════════════════════════════ */

/* Body scroll lock when modal open */
body.scai-modal-open { overflow: hidden !important; }

/* Overlay backdrop */
.scai-form-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 28, 0.68);
  z-index: 99998;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.3s ease, visibility 0.3s ease;
          transition: opacity 0.3s ease, visibility 0.3s ease;
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}

.scai-form-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Bottom sheet container */
@keyframes scai-beam-loop {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -2200; }
}

.scai-form-modal-sheet {
  background: var(--scai-bg, #faf7ff);
  width: 100%;
  max-width: 720px;
  max-height: 93vh;
  border-radius: 22px 22px 0 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
          flex-direction: column;
  overflow: hidden;
  -webkit-transform: translateY(100%);
          transform: translateY(100%);
  -webkit-transition: -webkit-transform 0.42s cubic-bezier(.22,1,.36,1);
          transition:         transform 0.42s cubic-bezier(.22,1,.36,1);
  will-change: transform;
  position: relative;
}

.scai-border-beam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  border-radius: 22px 22px 0 0;
  overflow: visible;
}

.scai-border-beam rect {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1100;
  animation: scai-beam-loop 2.5s linear infinite;
}

.scai-border-beam .scai-beam-gold {
  stroke: url(#scai-grad-gold);
  stroke-dashoffset: 0;
}

.scai-border-beam .scai-beam-purple {
  stroke: url(#scai-grad-purple);
  stroke-dashoffset: -1100;
}

.scai-form-modal-overlay.is-open .scai-form-modal-sheet {
  -webkit-transform: translateY(0);
          transform: translateY(0);
}

/* Drag handle pill */
.scai-form-modal-drag-handle {
  width: 38px;
  height: 4px;
  background: rgba(0,0,0,0.14);
  border-radius: 4px;
  margin: 10px auto 0;
  -webkit-flex-shrink: 0;
          flex-shrink: 0;
}

/* Modal header */
.scai-form-modal-header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 12px 18px 13px;
  border-bottom: 1.5px solid var(--scai-border, #e5d8ff);
  -webkit-flex-shrink: 0;
          flex-shrink: 0;
}

.scai-form-modal-heading {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 9px;
}

.scai-form-modal-mode-icon { font-size: 20px; line-height: 1; }

.scai-form-modal-mode-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--scai-text, #1a1028);
  font-family: var(--scai-font);
}

/* Close button */
.scai-form-modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--scai-border, #e5d8ff);
  background: var(--scai-card, #fff);
  font-size: 13px;
  cursor: pointer;
  color: var(--scai-text-light, #6b7280);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  line-height: 1;
  -webkit-transition: background 0.18s, color 0.18s, border-color 0.18s;
          transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.scai-form-modal-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Scrollable body */
.scai-form-modal-body {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
          flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Individual panels inside the modal */
.scai-modal-panel {
  display: none;
  padding: 16px 16px 40px;
}

.scai-modal-panel.is-active { display: block; }

/* Remove the wizard-frame outer border/bg since modal provides the container */
.scai-modal-panel .scai-wizard-frame {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* Remove coloring/hw hero gradient padding inside modal (already has modal header) */
.scai-modal-panel .scai-color-hero,
.scai-modal-panel .scai-hw-hero {
  margin: 0 -16px 20px;
  border-radius: 0;
}

/* ── Desktop / large screen ──────────────────── */
@media (min-width: 600px) {
  .scai-form-modal-overlay {
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 20px;
  }
  .scai-form-modal-sheet {
    border-radius: 20px;
    max-height: 88vh;
    -webkit-transform: translateY(16px) scale(0.97);
            transform: translateY(16px) scale(0.97);
    -webkit-transition: -webkit-transform 0.38s cubic-bezier(.22,1,.36,1), opacity 0.3s ease;
            transition:         transform 0.38s cubic-bezier(.22,1,.36,1), opacity 0.3s ease;
  }
  .scai-form-modal-overlay.is-open .scai-form-modal-sheet {
    -webkit-transform: translateY(0) scale(1);
            transform: translateY(0) scale(1);
  }
  .scai-modal-panel {
    padding: 20px 24px 48px;
  }
  .scai-modal-panel .scai-color-hero,
  .scai-modal-panel .scai-hw-hero {
    margin: 0 -24px 24px;
  }
}

/* ── Responsive improvements for mobile ──────── */
@media (max-width: 599px) {
  /* Hero more compact */
  .scai-hero { flex-direction: column; padding: 28px 20px 24px; gap: 16px; }
  .scai-hero-title { font-size: 32px; }
  .scai-hero-sub { font-size: 15px; }
  .scai-hero-illustration { width: 160px; margin: 0 auto; }
  .scai-hero-features { gap: 6px; }
  .scai-hero-features span { font-size: 12px; padding: 4px 10px; }

  /* Samples */
  
  .scai-testimonials-grid { grid-template-columns: 1fr; }

  /* Wizard inside modal */
  .scai-steps-nav { gap: 3px; padding: 12px; }
  .dot-label { display: none; }
  .scai-panel-header { padding: 16px 14px 12px; }
  .scai-panel-body { padding: 0 14px 16px; }
  .scai-form-grid { grid-template-columns: 1fr; }
  .scai-extras-grid { grid-template-columns: 1fr; }
  .scai-story-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .scai-urgency-bar { margin: 10px 14px 0; }
  .scai-wizard-frame { border-radius: 0; }
}

/* ============================================================
   MY ORDERS SECTION
   ============================================================ */
.scai-my-orders-section {
  max-width: 860px;
  margin: 32px auto 48px;
  padding: 0 16px;
  font-family: 'Nunito', sans-serif;
}

/* Guest lookup panel */
.scai-mo-guest-lookup {
  background: #fff;
  border: 1.5px solid #ede9fe;
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(91,33,182,.07);
}

.scai-mo-header { margin-bottom: 28px; }
.scai-mo-icon   { font-size: 48px; margin-bottom: 12px; line-height: 1; }
.scai-mo-title  { font-size: 1.6rem; font-weight: 800; color: #1e1b4b; margin: 0 0 8px; }
.scai-mo-subtitle { color: #6b7280; font-size: .95rem; margin: 0; }

.scai-mo-email-row {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 14px;
}

.scai-mo-email-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.scai-mo-email-input:focus { border-color: var(--scai-primary, #5b21b6); }

.scai-mo-error {
  color: #b91c1c;
  font-size: .88rem;
  margin-top: 4px;
}

.scai-mo-login-hint {
  font-size: .85rem;
  color: #9ca3af;
  margin: 10px 0 0;
}
.scai-mo-login-hint a { color: var(--scai-primary, #5b21b6); font-weight: 700; }

/* Results panel */
.scai-mo-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.scai-mo-welcome {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e1b4b;
  margin: 0;
}

/* Order cards grid */
.scai-mo-order-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.scai-mo-card {
  background: #fff;
  border: 1.5px solid #ede9fe;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(91,33,182,.06);
  transition: box-shadow .2s, border-color .2s;
}
.scai-mo-card:hover {
  box-shadow: 0 6px 24px rgba(91,33,182,.12);
  border-color: #c4b5fd;
}

.scai-mo-card-top   { margin-bottom: 14px; }
.scai-mo-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 6px;
}
.scai-mo-card-meta  { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.scai-mo-status             { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.scai-mo-status--complete   { background: #dcfce7; color: #15803d; }
.scai-mo-status--paid       { background: #dbeafe; color: #1d4ed8; }
.scai-mo-status--pending    { background: #fef9c3; color: #854d0e; }
.scai-mo-status--failed     { background: #fee2e2; color: #b91c1c; }

.scai-mo-pages       { font-size: .8rem; color: #6b7280; background: #f3f4f6; padding: 3px 9px; border-radius: 20px; }
.scai-mo-cover-badge { font-size: .8rem; color: #6d28d9; background: #ede9fe; padding: 3px 9px; border-radius: 20px; }

.scai-mo-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid #f3f4f6;
  padding-top: 14px;
}
.scai-mo-card-info  { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.scai-mo-amount     { font-weight: 800; color: #1e1b4b; font-size: .95rem; }
.scai-mo-date       { font-size: .82rem; color: #9ca3af; }
.scai-mo-ref        { font-size: .72rem; color: #9ca3af; background: #f9fafb; padding: 2px 6px; border-radius: 6px; }

.scai-mo-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.scai-mo-action-btn   { font-size: .82rem !important; padding: 7px 14px !important; }
.scai-mo-generating   { font-size: .85rem; color: #2563eb; font-style: italic; }

.scai-mo-empty {
  text-align: center;
  color: #9ca3af;
  font-size: .95rem;
  padding: 32px 16px;
}
.scai-mo-empty a { color: var(--scai-primary, #5b21b6); font-weight: 700; }

@media (min-width: 600px) {
  .scai-mo-order-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .scai-mo-guest-lookup { padding: 48px 56px; }
}

/* ============================================================
   FREE PREVIEW CTA (Step 1)
   ============================================================ */
.scai-step1-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
@media (min-width: 480px) {
  .scai-step1-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
}

.scai-free-preview-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.scai-free-preview-note {
  font-size: .8rem;
  color: #6b7280;
}

/* Preview result block */
.scai-preview-result {
  background: linear-gradient(135deg, #fdf4ff 0%, #ede9fe 100%);
  border: 2px solid #c4b5fd;
  border-radius: 20px;
  padding: 28px 28px 24px;
  margin: 16px 0;
  position: relative;
}
.scai-preview-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--scai-primary, #5b21b6), #7c3aed);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.scai-preview-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: #1e1b4b;
  margin: 0 0 12px;
}
.scai-preview-text {
  font-size: 1rem;
  color: #374151;
  line-height: 1.7;
  margin: 0 0 12px;
  font-style: italic;
}
.scai-preview-teaser {
  font-size: .9rem;
  color: #6d28d9;
  font-weight: 700;
  margin: 0 0 20px;
}
.scai-preview-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Order type badge ── */
.scai-mo-type-badge {
  font-size: .78rem;
  background: #f0fdf4;
  color: #166534;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 700;
}

/* ── Deep-link highlight ── */
.scai-mo-card--highlight {
  border-color: var(--scai-primary, #5b21b6) !important;
  box-shadow: 0 0 0 3px rgba(91,33,182,.18), 0 6px 24px rgba(91,33,182,.14) !important;
  animation: scai-mo-pulse 1.4s ease 2;
}
@keyframes scai-mo-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(91,33,182,.18); }
  50%       { box-shadow: 0 0 0 8px rgba(91,33,182,.08); }
}

/* ── My Orders inside modal ── */
.scai-mo-modal-wrap {
  padding: 8px 4px 24px;
}
.scai-mo-guest-lookup {
  text-align: center;
  padding: 24px 16px 16px;
}
.scai-mo-email-row {
  display: flex;
  gap: 8px;
  max-width: 100%;
  margin: 0 0 12px;
}
.scai-mo-email-input {
  flex: 1;
  min-width: 0;
}
.scai-mo-order-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 16px;
}
@media (min-width: 520px) {
  .scai-mo-order-grid { grid-template-columns: 1fr 1fr; }
}

/* ── My Orders inside modal ── */
.scai-my-orders-modal {
  padding: 8px 4px 24px;
}
.scai-my-orders-modal .scai-mo-guest-lookup {
  border: none;
  box-shadow: none;
  padding: 16px 8px 8px;
  background: transparent;
}
.scai-my-orders-modal .scai-mo-email-row {
  max-width: 100%;
}
.scai-mo-order-grid {
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}
