/* ===================================================
   RONGBERONG — Premium Liquid Glass UI
   Style: Liquid Glass · Glassmorphism · Spring Motion
   =================================================== */

:root {
  /* ── OCEAN BLUE BRAND ── */
  --primary:       #1D4ED8;
  --primary-deep:  #1E40AF;
  --primary-light: #3B82F6;
  --primary-glow:  rgba(29,78,216,0.18);
  --accent:        #0EA5E9;
  --accent-light:  #38BDF8;
  --accent-glow:   rgba(14,165,233,0.18);

  /* ── LIGHT SURFACES ── */
  --surface:         #FFFFFF;
  --surface-subtle:  #F8FAFC;
  --surface-elevated:#F1F5F9;
  --bg:              #F0F4FF;
  --bg-subtle:       #F8FAFC;

  /* ── LIGHT BORDERS ── */
  --border:        #DBEAFE;
  --border-strong: #BFDBFE;

  /* ── LIGHT TYPOGRAPHY ── */
  --text:  #0F172A;
  --muted: #4A5568;

  /* ── STATUS ── */
  --success: #059669;
  --danger:  #DC2626;

  /* ── LIGHT SHADOWS ── */
  --shadow-sm: 0 1px 2px rgba(30,64,175,0.06), 0 1px 3px rgba(30,64,175,0.04);
  --shadow-md: 0 4px 16px rgba(30,64,175,0.09), 0 2px 6px rgba(30,64,175,0.05);
  --shadow-lg: 0 8px 32px rgba(30,64,175,0.11), 0 4px 10px rgba(30,64,175,0.06);
  --shadow-xl: 0 16px 56px rgba(30,64,175,0.13), 0 6px 18px rgba(30,64,175,0.07);
  --shadow-glow: 0 0 0 3px rgba(29,78,216,0.15);

  /* ── RADIUS ── */
  --radius:    12px;
  --radius-sm:  9px;
  --radius-xs:  6px;

  /* Easing */
  --ease-out:    cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);

  /* ── LIGHT GLASS ── */
  --glass-bg:     rgba(255,255,255,0.88);
  --glass-blur:   blur(16px) saturate(150%);
  --glass-border: rgba(255,255,255,0.72);

  /* Rainbow */
  --rainbow: linear-gradient(135deg, #FF6B6B, #FFA94D, #FFD43B, #69DB7C, #4DABF7, #9775FA, #E6007E);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transition: opacity 0.5s var(--ease-expo);
  position: relative;
  overflow-x: hidden;
}
body.ready { opacity: 1; }

/* ===== AMBIENT BACKGROUND MESH ===== */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  will-change: transform;
}
body::before {
  width: 700px;
  height: 700px;
  top: -200px;
  right: -150px;
  background: radial-gradient(circle, rgba(29,78,216,0.08) 0%, rgba(29,78,216,0.02) 50%, transparent 70%);
  animation: orbDrift1 30s ease-in-out infinite;
}
body::after {
  width: 600px;
  height: 600px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(14,165,233,0.07) 0%, rgba(99,102,241,0.03) 50%, transparent 70%);
  animation: orbDrift2 25s ease-in-out infinite;
}
@keyframes orbDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-60px, 80px) scale(1.08); }
  66%       { transform: translate(40px, -40px) scale(0.94); }
}
@keyframes orbDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(70px, -60px) scale(1.06); }
  70%       { transform: translate(-30px, 50px) scale(0.96); }
}

/* ===== DOODLE BACKGROUND ===== */
.bg-doodles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  color: #94A3B8;
  opacity: 0.4;
}
.doodle {
  position: absolute;
  width: 200px;
  height: auto;
}
.d1  { top: 8%;  left: 5%;   animation: floatA 50s ease-in-out infinite; }
.d2  { top: 60%; right: 8%;  animation: floatB 45s ease-in-out infinite; }
.d3  { bottom: 15%; left: 12%; animation: floatA 55s ease-in-out infinite reverse; }
.d4  { top: 30%; right: 20%; animation: floatB 40s ease-in-out infinite reverse; }
.d5  { top: 75%; left: 40%;  animation: floatA 60s ease-in-out infinite; }
.d6  { top: 12%; right: 15%; width: 160px; animation: floatC 48s ease-in-out infinite; }
.d7  { top: 45%; left: 3%;   width: 140px; animation: floatB 52s ease-in-out infinite; }
.d8  { top: 82%; right: 25%; width: 170px; animation: floatA 44s ease-in-out infinite reverse; }
.d9  { top: 22%; left: 25%;  width: 130px; animation: floatC 56s ease-in-out infinite reverse; }
.d10 { top: 50%; right: 3%;  width: 150px; animation: floatA 50s ease-in-out infinite; }
@keyframes floatA {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  25%       { transform: translate(30px,-20px) rotate(3deg); }
  50%       { transform: translate(-15px,25px) rotate(-2deg); }
  75%       { transform: translate(20px,10px) rotate(4deg); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  25%       { transform: translate(-25px,15px) rotate(-3deg); }
  50%       { transform: translate(20px,-20px) rotate(2deg); }
  75%       { transform: translate(-10px,25px) rotate(-4deg); }
}
@keyframes floatC {
  0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); }
  33%       { transform: translate(15px,-25px) rotate(5deg) scale(1.05); }
  66%       { transform: translate(-20px,10px) rotate(-3deg) scale(0.95); }
}

/* ===== LAYOUT ===== */
.wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px clamp(16px, 3.5vw, 48px) 60px;
  position: relative;
  z-index: 1;
}

/* ===== HINT BUTTONS & TOOLTIP ===== */
.hint-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(29,78,216,0.08);
  color: var(--primary);
  cursor: pointer;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  padding: 0;
  transition: all 0.22s var(--ease-spring);
  flex: none;
  vertical-align: middle;
  margin-left: 4px;
}
.hint-btn svg { width: 14px; height: 14px; }
.hint-btn:hover { background: var(--primary); color: #fff; transform: scale(1.15); box-shadow: 0 3px 10px var(--primary-glow); }
.hint-btn:active { transform: scale(0.92); }
.hint-btn:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 2px; }
.hint-btn.hint-btn--inline { position: absolute; right: 0; top: 50%; transform: translateY(-50%); margin: 0; }
.hint-btn.hint-btn--inline:hover { transform: translateY(-50%) scale(1.15); }
.hint-btn.hint-btn--chips { width: 20px; height: 20px; margin: 0 0 0 auto; display: block; }
.hint-btn.hint-btn--chips svg { width: 12px; height: 12px; }
.hint-btn.hint-btn--label { width: 18px; height: 18px; margin-left: 5px; }
.hint-btn.hint-btn--label svg { width: 12px; height: 12px; }
.hint-btn.hint-btn--adv { width: 20px; height: 20px; }
.hint-btn.hint-btn--adv svg { width: 13px; height: 13px; }
.hint-btn-wrap { display: flex; align-items: center; gap: 8px; }

/* Floating tooltip */
.hint-tip {
  position: fixed;
  z-index: 1000;
  background: var(--primary-deep);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  max-width: min(360px, 85vw);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition: opacity 0.22s var(--ease-expo), transform 0.28s var(--ease-spring);
  box-shadow: 0 8px 32px rgba(10,75,74,0.25), 0 2px 8px rgba(10,75,74,0.15);
  backdrop-filter: blur(12px);
}
.hint-tip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.hint-tip::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--primary-deep);
}

/* ===== CINEMATIC HERO SECTION ===== */
.hero-section {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  min-height: clamp(300px, 38vw, 460px);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-strong);
  cursor: default;
}

/* Particle canvas background */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* Multi-layer overlay: dark teal + pink chromatic accent + bottom fade */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(8,20,40,0.55) 0%,
      rgba(8,20,40,0.28) 30%,
      rgba(8,20,40,0.45) 70%,
      rgba(8,20,40,0.78) 100%),
    linear-gradient(100deg,
      rgba(29,78,216,0.25) 0%,
      transparent 45%,
      rgba(14,165,233,0.15) 100%);
}
/* Animated iridescent shimmer on overlay */
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 20%,
    rgba(77,171,247,0.07) 35%,
    rgba(151,117,250,0.08) 50%,
    rgba(230,0,126,0.06) 65%,
    transparent 80%);
  background-size: 300% 100%;
  animation: iridescent 8s ease-in-out infinite alternate;
}
@keyframes iridescent {
  from { background-position: 0% 50%; opacity: 0.6; }
  to   { background-position: 100% 50%; opacity: 1; }
}

/* Floating light particles */
.hero-particles { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.hp {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  animation: hpFloat linear infinite;
  will-change: transform, opacity;
}
.hp1  { width:3px;  height:3px;  top:20%; left:15%; animation-duration:14s; animation-delay:0s;    opacity:0.7; }
.hp2  { width:2px;  height:2px;  top:65%; left:8%;  animation-duration:18s; animation-delay:2s;    opacity:0.5; }
.hp3  { width:4px;  height:4px;  top:30%; left:75%; animation-duration:12s; animation-delay:4s;    opacity:0.6; }
.hp4  { width:2px;  height:2px;  top:55%; left:88%; animation-duration:16s; animation-delay:1s;    opacity:0.4; }
.hp5  { width:3px;  height:3px;  top:75%; left:45%; animation-duration:20s; animation-delay:6s;    opacity:0.65; }
.hp6  { width:5px;  height:5px;  top:15%; left:55%; animation-duration:11s; animation-delay:3s;    opacity:0.35; background: rgba(77,171,247,0.7); }
.hp7  { width:3px;  height:3px;  top:45%; left:30%; animation-duration:15s; animation-delay:7s;    opacity:0.5; background: rgba(151,117,250,0.7); }
.hp8  { width:2px;  height:2px;  top:80%; left:65%; animation-duration:17s; animation-delay:5s;    opacity:0.6; background: rgba(230,0,126,0.7); }
@keyframes hpFloat {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: var(--op, 0.6); }
  25%  { transform: translateY(-28px) translateX(12px) scale(1.3); }
  50%  { transform: translateY(-14px) translateX(-8px) scale(0.8); }
  75%  { transform: translateY(-36px) translateX(6px) scale(1.1); }
  100% { transform: translateY(-54px) translateX(0) scale(0.6); opacity: 0; }
}

/* ===== HERO NAV (glassmorphic bar) ===== */
.hero-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: rgba(8,28,28,0.45);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(230,0,126,0.30);
  border: 1px solid rgba(230,0,126,0.45);
  padding: 4px 12px;
  border-radius: 30px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  margin-right: auto;
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.lang-switch {
  display: flex;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
}
.lang-link {
  text-decoration: none;
  color: rgba(255,255,255,0.72);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  transition: all 0.22s var(--ease-spring);
  min-height: 40px;
  display: flex;
  align-items: center;
  font-size: 13px;
}
.lang-link:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }
.lang-link:hover { color: #fff; background: rgba(255,255,255,0.14); transform: translateY(-1px); }
.lang-link.active {
  color: #fff;
  background: rgba(14,124,123,0.45);
  border: 1px solid rgba(14,200,198,0.4);
  padding: 5px 11px;
  box-shadow: 0 2px 10px rgba(14,124,123,0.35);
}

/* ===== HERO BODY (main content over image) ===== */
.hero-body {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 22px;
  padding: 24px 28px 24px;
  position: relative;
  z-index: 10;
}
.hero-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex: none;
  filter:
    drop-shadow(0 0 20px rgba(14,200,198,0.55))
    drop-shadow(0 6px 18px rgba(0,0,0,0.45));
  transition: transform 0.5s var(--ease-spring), filter 0.4s var(--ease-out);
  animation: logoBreath 5s ease-in-out infinite;
}
@keyframes logoBreath {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(14,200,198,0.50)) drop-shadow(0 6px 18px rgba(0,0,0,0.40)); }
  50%       { filter: drop-shadow(0 0 30px rgba(14,200,198,0.80)) drop-shadow(0 8px 22px rgba(0,0,0,0.50)); }
}
.hero-logo:hover { transform: scale(1.07) rotate(-3deg); animation-play-state: paused; filter: drop-shadow(0 0 36px rgba(77,171,247,0.70)) drop-shadow(0 8px 24px rgba(0,0,0,0.50)); }
.hero-text { flex: 1; text-align: left; min-width: 0; }
.hero-title {
  font-family: 'Syne', 'Fraunces', sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1.15;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.hero-title-ai {
  background: linear-gradient(135deg, #4DABF7, #9775FA, #E6007E);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: aiGradient 4s linear infinite;
}
@keyframes aiGradient {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.hero-tagline {
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.lede {
  font-family: 'Syne', 'Fraunces', sans-serif;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.2px;
  color: rgba(255,255,255,0.92);
  margin-top: 8px;
  text-wrap: balance;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}
.lede em {
  color: #4DABF7;
  font-style: normal;
  text-shadow: 0 0 16px rgba(77,171,247,0.45);
}
.sub {
  color: rgba(255,255,255,0.58);
  font-size: 13px;
  margin-top: 5px;
  line-height: 1.55;
  text-wrap: balance;
}

/* ===== HERO TICKER (auto-scroll feature strip) ===== */
.hero-ticker {
  position: relative;
  z-index: 10;
  overflow: hidden;
  padding: 10px 0;
  background: rgba(8,28,28,0.50);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.08);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}
.hero-ticker-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
  will-change: transform;
}
.hero-ticker-track span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.4px;
  padding: 0 14px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s;
}
.ticker-dot {
  color: rgba(14,165,233,0.7) !important;
  font-size: 14px !important;
  padding: 0 4px !important;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Settings gear */
.settings-gear {
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all 0.25s var(--ease-spring);
  position: relative;
}
.settings-gear:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }
.settings-gear:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  transform: rotate(30deg) scale(1.08);
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}
.settings-gear svg { width: 20px; height: 20px; }
.settings-gear .dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg);
  display: none;
  box-shadow: 0 0 8px rgba(229,72,77,0.5);
}
.settings-gear .dot.show { display: block; animation: dotPop 0.4s var(--ease-spring); }
@keyframes dotPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* Settings panel */
.settings-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-expo), opacity 0.35s var(--ease-out), padding 0.35s var(--ease-out);
  opacity: 0;
  padding: 0 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0 0 8px;
  box-shadow: var(--shadow-sm);
}
.settings-panel.open {
  max-height: 300px;
  opacity: 1;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.settings-panel > label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}
.settings-row { display: flex; gap: 10px; }
.settings-row .api-input { flex: 1; }
.settings-row .api-save {
  flex: none;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  white-space: nowrap;
  min-height: 48px;
  display: flex;
  align-items: center;
  box-shadow: 0 3px 12px var(--primary-glow);
}
.settings-row .api-save:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.settings-row .api-save:hover { background: #0c6b6a; box-shadow: 0 6px 20px var(--primary-glow); transform: translateY(-2px); }
.settings-row .api-save:active { transform: scale(0.96); }
.api-status { font-size: 13px; margin-top: 8px; font-weight: 600; }
.api-status.ok { color: var(--success); }
.api-status.err { color: var(--danger); }

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2.5vw, 36px);
  align-items: start;
}

/* ===== DOUBLE-BEZEL CARD SHELL ===== */
.card-shell {
  position: relative;
  border-radius: calc(var(--radius) + 1px);
  padding: 1px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.25s var(--ease-expo), transform 0.25s var(--ease-expo);
  isolation: isolate;
  background: linear-gradient(160deg, var(--border-strong) 0%, var(--border) 50%, rgba(29,78,216,0.20) 100%);
}
.card-shell:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ===== CARDS (Glass) ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: box-shadow 0.2s var(--ease-expo);
}
.card h2 {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card h2 .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
  box-shadow: 0 0 0 2px rgba(29,78,216,0.18);
}

/* ===== REVEAL ANIMATIONS ===== */
body.ready .reveal {
  animation: revealPremium 0.75s var(--ease-expo) backwards;
}
body.ready .reveal:nth-child(2)  { animation-delay: 0.07s; }
body.ready .reveal:nth-child(3)  { animation-delay: 0.14s; }
body.ready .reveal:nth-child(4)  { animation-delay: 0.21s; }
body.ready .reveal:nth-child(5)  { animation-delay: 0.28s; }
body.ready .reveal:nth-child(6)  { animation-delay: 0.35s; }
body.ready .reveal:nth-child(7)  { animation-delay: 0.42s; }
body.ready .reveal:nth-child(8)  { animation-delay: 0.49s; }
body.ready .reveal:nth-child(9)  { animation-delay: 0.56s; }
body.ready .reveal:nth-child(10) { animation-delay: 0.63s; }
body.ready .reveal:nth-child(11) { animation-delay: 0.70s; }
body.ready .reveal:nth-child(12) { animation-delay: 0.77s; }
@keyframes revealPremium {
  from { opacity: 0; transform: translateY(28px) scale(0.96); filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ===== VOICE BAR ===== */
.voicebar {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  transition: border-color 0.28s var(--ease-expo), box-shadow 0.28s var(--ease-expo), transform 0.28s var(--ease-spring);
}
.voicebar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29,78,216,0.12), 0 6px 24px var(--primary-glow);
  transform: translateY(-1px);
}
.mic {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  flex: none;
  background: linear-gradient(145deg, var(--primary-light), var(--primary));
  color: #fff;
  display: grid;
  place-items: center;
  transition: all 0.28s var(--ease-spring);
  box-shadow: 0 4px 16px var(--primary-glow), 0 2px 6px rgba(10,75,74,0.15);
  min-width: 44px;
  position: relative;
  overflow: hidden;
}
.mic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.mic:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.mic:hover { transform: scale(1.10); box-shadow: 0 8px 28px var(--primary-glow), 0 3px 10px rgba(10,75,74,0.20); }
.mic:active { transform: scale(0.94); }
.mic.live {
  background: linear-gradient(135deg, #FF6B6B, var(--danger));
  box-shadow: 0 4px 16px rgba(229,72,77,0.38);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(229,72,77,0.42); }
  70%  { box-shadow: 0 0 0 22px rgba(229,72,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); }
}
/* Gemini AI parsing state */
.mic.parsing {
  background: linear-gradient(135deg, #7c6af7, #a78bfa);
  box-shadow: 0 4px 16px rgba(124,106,247,0.4);
  animation: parsing-spin 1.4s linear infinite;
}
@keyframes parsing-spin {
  0%   { box-shadow: 0 0 0 0 rgba(124,106,247,0.5); transform: scale(1); }
  50%  { box-shadow: 0 0 0 18px rgba(124,106,247,0); transform: scale(1.06); }
  100% { box-shadow: 0 0 0 0 rgba(124,106,247,0); transform: scale(1); }
}
.mic svg { width: 24px; height: 24px; }
.vtext { flex: 1; min-width: 0; }
.vtext .label {
  font-size: 12px;
  letter-spacing: 0.5px;
  opacity: 0.7;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2px;
}
.vtext .transcript {
  font-size: 16px;
  min-height: 24px;
  margin-top: 2px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}
.vtext .transcript.placeholder { opacity: 0.55; font-weight: 400; font-style: italic; color: var(--muted); }

/* banner-strip removed — replaced by .hero-section */

/* ===== ERRORS & HINTS ===== */
.err {
  background: rgba(229,72,77,0.06);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 0 0 14px;
  display: none;
  font-weight: 500;
  line-height: 1.5;
  animation: errShake 0.4s var(--ease-spring);
}
@keyframes errShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-xs);
  border-left: 3px solid rgba(29,78,216,0.25);
  line-height: 1.55;
}
.hint b { color: var(--text); }

/* ===== CHIPS ===== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.chip {
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s var(--ease-spring), box-shadow 0.15s;
  color: var(--text);
  font-weight: 500;
  user-select: none;
  min-height: 38px;
  display: flex;
  align-items: center;
}
.chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.chip:hover {
  border-color: var(--primary);
  background: rgba(12,232,231,0.04);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.chip:active { transform: scale(0.97); }

/* ===== PRESET SAVE BUTTON ===== */
.preset-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  margin-top: 6px;
  min-height: 36px;
}
.preset-save:hover { border-color: var(--primary); color: var(--primary); background: rgba(29,78,216,0.05); transform: translateY(-1px); }
.preset-save:active { transform: scale(0.96); }
.preset-save:disabled { opacity: 0.4; cursor: not-allowed; }
.preset-save svg { width: 14px; height: 14px; flex: none; }
.preset-save span { white-space: nowrap; }

/* ===== PRESET CHIPS ===== */
.presets {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(230,0,126,0.06);
  border: 1px solid rgba(230,0,126,0.18);
  border-radius: 30px;
  padding: 6px 10px 6px 14px;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  user-select: none;
  min-height: 34px;
}
.preset-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.preset-chip:hover { background: rgba(230,0,126,0.11); border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 3px 10px var(--accent-glow); }
.preset-chip:active { transform: scale(0.96); }
.pc-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-del {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
  background: transparent;
  transition: all 0.18s var(--ease-spring);
  flex: none;
  opacity: 0.5;
}
.pc-del:hover { background: rgba(230,0,126,0.15); opacity: 1; transform: scale(1.12); }

/* ===== ACCESSIBILITY ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== FIELD GROUP DIVIDER ===== */
.field-group {
  margin: 14px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Fields now live inside fg-inner (JS wraps them) */
.fg-inner > .field { padding: 0 14px; }
.fg-inner > .field:first-child { padding-top: 10px; }
.fg-inner > .field:last-child  { padding-bottom: 14px; margin-bottom: 0; }

/* ── Collapse animation ── */
.fg-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .24s ease;
}
.fg-toggle[aria-expanded="false"] ~ .fg-body {
  grid-template-rows: 0fr;
}
.fg-inner { overflow: hidden; }

/* ── Group toggle button ── */
.field-group-label,
button.fg-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: filter .15s;
}
button.fg-toggle:hover { filter: brightness(1.1); }
.field-group-label .fg-icon,
button.fg-toggle .fg-icon {
  width: 14px; height: 14px; flex: none; opacity: .9;
}
button.fg-toggle > span:not(.fg-sel-count) { flex: 1; }
.field-group-label span { flex: 1; }
.field-group-label::after { display: none; }

/* Chevron */
.fg-chevron {
  width: 14px; height: 14px; flex: none;
  transition: transform .22s ease;
  opacity: .7;
}
.fg-toggle[aria-expanded="false"] .fg-chevron { transform: rotate(-90deg); }

/* Selection count badge on collapsed groups */
.fg-sel-count {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  flex: none;
}

/* ── Per-group accent colours ── */
/* Garment — warm amber */
.fg--garment { border-color: #f59e0b44; }
.fg--garment .fg-toggle, .fg--garment .field-group-label {
  background: linear-gradient(90deg, #f59e0b20 0%, #f59e0b06 100%);
  color: #d97706;
  border-bottom: 1px solid #f59e0b30;
}
/* Model — rose/pink */
.fg--model { border-color: #ec489944; }
.fg--model .fg-toggle, .fg--model .field-group-label {
  background: linear-gradient(90deg, #ec489920 0%, #ec489906 100%);
  color: #db2777;
  border-bottom: 1px solid #ec489930;
}
/* Shot — sky blue */
.fg--shot { border-color: #38bdf844; }
.fg--shot .fg-toggle, .fg--shot .field-group-label {
  background: linear-gradient(90deg, #38bdf820 0%, #38bdf806 100%);
  color: #0284c7;
  border-bottom: 1px solid #38bdf830;
}
/* Style & Mood — violet */
.fg--style { border-color: #a78bfa44; }
.fg--style .fg-toggle, .fg--style .field-group-label {
  background: linear-gradient(90deg, #a78bfa20 0%, #a78bfa06 100%);
  color: #7c3aed;
  border-bottom: 1px solid #a78bfa30;
}
/* Output Settings — emerald */
.fg--output { border-color: #34d39944; }
.fg--output .fg-toggle, .fg--output .field-group-label {
  background: linear-gradient(90deg, #34d39920 0%, #34d39906 100%);
  color: #059669;
  border-bottom: 1px solid #34d39930;
}
/* Collapsed: border-bottom only visible when open */
.fg-toggle[aria-expanded="false"] {
  border-bottom-color: transparent !important;
}

/* ===== FIELDS ===== */
.field { margin-bottom: 16px; }
.field > label {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* ===== OPTIONS CHIPS ===== */
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.opt {
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: border-color 0.15s var(--ease-smooth), background 0.15s var(--ease-smooth), color 0.15s var(--ease-smooth), box-shadow 0.15s var(--ease-smooth), transform 0.15s var(--ease-spring);
  font-weight: 500;
  color: var(--text);
  user-select: none;
  min-height: 34px;
  display: flex;
  align-items: center;
}
.opt:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.opt:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(12,232,231,0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.opt:active { transform: scale(0.97); transition-duration: 0.08s; }
.opt.sel {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.opt.sel.flash { animation: optFlash 0.4s var(--ease-out); }
@keyframes optFlash {
  0%   { background: var(--accent); border-color: var(--accent); }
  100% { background: var(--primary); border-color: var(--primary); }
}

/* ===== TOGGLE ===== */
.toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 6px;
  background: var(--surface);
}
.toggle button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: color 0.15s, background 0.15s;
  min-height: 46px;
}
.toggle button:hover { color: var(--text); }
.toggle button svg { width: 16px; height: 16px; flex: none; }
.toggle button.on {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.toggle .vtag {
  font-size: 9px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ===== UPLOAD ===== */
.upload {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.28s var(--ease-spring);
  background: var(--surface);
  min-height: 100px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.upload::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(14,124,123,0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  border-radius: var(--radius);
}
.upload:hover {
  border-color: var(--primary);
  background: rgba(14,124,123,0.05);
  transform: scale(1.012);
  box-shadow: 0 6px 24px var(--primary-glow);
}
.upload:hover::before { opacity: 1; }
.upload.has { padding: 0; border-style: solid; border-color: var(--primary); overflow: hidden; transform: none; box-shadow: 0 4px 16px var(--primary-glow); }
.upload.drag { border-color: var(--primary); background: rgba(29,78,216,0.06); transform: scale(1.015); box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-md); }
.upload.drag .ph svg { opacity: 0.9; transform: translateY(-4px); transition: transform 0.2s; }
.upload img { width: 100%; max-height: 200px; object-fit: contain; display: block; background: var(--surface); }
.upload .ph svg { width: 28px; height: 28px; color: var(--primary); opacity: 0.5; margin-bottom: 6px; }
.upload .ph div { font-size: 13px; color: var(--muted); line-height: 1.5; }
.upload .ph b { color: var(--text); }

/* ── URL input strip ── */
.upload-url-row { margin-top: 8px; }
.upload-or {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 8px;
}
.upload-or::before,.upload-or::after {
  content:''; flex:1; height:1px; background: var(--border);
}
.upload-url-wrap {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.upload-url-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.upload-url-icon {
  width: 15px; height: 15px; flex: none;
  margin-left: 10px; color: var(--muted); opacity: .6;
}
.upload-url-input {
  flex: 1; border: none; background: transparent;
  padding: 9px 8px; font-size: 12px; color: var(--text);
  outline: none; min-width: 0;
}
.upload-url-input::placeholder { color: var(--muted); opacity: .6; }
.upload-url-btn {
  flex: none; border: none; border-left: 1px solid var(--border);
  background: var(--surface2, rgba(255,255,255,.06));
  color: var(--primary); cursor: pointer;
  padding: 0 12px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.upload-url-btn:hover { background: var(--primary); color: #fff; }
.upload-url-btn:disabled { opacity: .5; cursor: not-allowed; }
.upload-url-btn svg { width: 16px; height: 16px; }
.upload-url-btn.loading svg { animation: url-spin .7s linear infinite; }
@keyframes url-spin { to { transform: rotate(360deg); } }
.upload-url-err {
  display: none; font-size: 11px; color: var(--danger);
  margin-top: 5px; padding: 0 2px;
}

/* ── Clear button ── */
.upload-clear {
  display: flex; align-items: center; gap: 5px;
  margin-top: 6px; padding: 5px 10px;
  background: none; border: 1px solid var(--border);
  border-radius: 6px; font-size: 11px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.upload-clear:hover { color: var(--danger); border-color: var(--danger); }
.upload-clear svg { width: 13px; height: 13px; flex: none; }

/* ===== TEXT INPUT ===== */
.text-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: all 0.25s var(--ease-expo);
  min-height: 48px;
}
.text-input::placeholder { color: var(--muted); opacity: 0.7; }
.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29,78,216,0.12), 0 4px 16px var(--primary-glow);
  background: var(--surface);
  transform: translateY(-1px);
}

/* ===== ADVANCED ACCORDION ===== */
.advanced-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  min-height: 48px;
  margin: 18px 0 0;
}
.advanced-toggle:hover {
  background: rgba(29,78,216,0.08);
  color: var(--primary);
  border-color: rgba(29,78,216,0.15);
  transform: translateX(2px);
}
.advanced-toggle .arrow {
  width: 18px; height: 18px;
  transition: transform 0.35s var(--ease-spring);
  flex: none;
}
.advanced-toggle.open .arrow { transform: rotate(180deg); }
.adv-hdr { display: flex; align-items: flex-start; gap: 6px; margin: 18px 0 0; }
.adv-hdr .advanced-toggle { flex: 1; margin: 0; }
.adv-hdr .hint-btn { margin-top: 13px; }
.advanced-fields {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-expo), opacity 0.38s var(--ease-out), margin 0.38s var(--ease-out);
  opacity: 0;
  margin: 0;
}
.advanced-fields.open {
  max-height: 2000px;
  opacity: 1;
  margin: 20px 0 0;
}
.advanced-fields .field:last-child { margin-bottom: 0; }
.advanced-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.section-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 12px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--primary);
  opacity: 0.7;
}
.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(29,78,216,0.15);
}

/* ===== REQUEST SUMMARY ===== */
.req {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.req .row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  gap: 12px;
}
.req .row:last-child { border-bottom: none; }
.req .k { color: var(--muted); font-weight: 500; flex: none; }
.req .v { font-weight: 600; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.req .v.empty { color: var(--danger); font-weight: 500; font-style: italic; }
/* ── req category collapsibles ── */
.req-cat { margin-bottom: 6px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.req-cat:last-child { margin-bottom: 0; }

.req-cat-hdr {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: none;
  cursor: pointer;
  padding: 7px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: filter .15s;
}
.req-cat-hdr:hover { filter: brightness(1.12); }

/* Required — warm coral */
.req-cat--required .req-cat-hdr {
  background: linear-gradient(90deg, #ff6b6b22 0%, #ff6b6b0a 100%);
  color: #e05555;
  border-bottom: 1px solid #ff6b6b30;
}
/* Additional — indigo/violet */
.req-cat--additional .req-cat-hdr {
  background: linear-gradient(90deg, #7c6af722 0%, #7c6af70a 100%);
  color: #7c6af7;
  border-bottom: 1px solid #7c6af730;
}
/* Optional — teal/muted */
.req-cat--optional .req-cat-hdr {
  background: linear-gradient(90deg, #3ecfb222 0%, #3ecfb20a 100%);
  color: #3ecfb2;
  border-bottom: 1px solid #3ecfb230;
}

.req-cat-icon { font-size: 10px; flex: none; }
.req-cat-name { flex: 1; text-align: left; }
.req-cat-count {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
  flex: none;
  min-width: 20px;
  text-align: center;
}
.req-cat-arrow {
  width: 14px; height: 14px; flex: none;
  transition: transform .2s;
  opacity: .7;
}
.req-cat-hdr[aria-expanded="false"] .req-cat-arrow { transform: rotate(-90deg); }

.req-cat-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .22s ease;
  background: var(--surface);
}
.req-cat-hdr[aria-expanded="false"] ~ .req-cat-body { grid-template-rows: 0fr; }
.req-cat-inner { overflow: hidden; padding: 0 10px 4px; }
.req-cat-inner .row:last-child { border-bottom: none; }

/* ── Gender cascade dim ── */
.opt.cascade-dim--male,
.opt.cascade-dim--female {
  opacity: .35;
  position: relative;
}
.opt.cascade-dim--male::after,
.opt.cascade-dim--female::after {
  content: attr(data-cascade-tip);
  display: none;
}
.opt.cascade-dim--male:hover,
.opt.cascade-dim--female:hover {
  opacity: .6;
}

.empty-req {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 12px 8px;
  font-style: italic;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.empty-req::before {
  content: '←';
  font-size: 18px;
  opacity: 0.3;
  font-style: normal;
}

/* ===== PROMPT PREVIEW & LIBRARY ===== */
.prompt-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: var(--surface-subtle);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.28s var(--ease-spring);
  min-height: 46px;
  margin-bottom: 12px;
  box-shadow: none;
  letter-spacing: 0.2px;
  text-align: left;
  position: relative;
  overflow: hidden;
  color: var(--primary) !important;
  border: 1px solid var(--border-strong);
}
.prompt-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%);
  border-radius: var(--radius-sm);
  pointer-events: none;
}
.prompt-toggle:hover { box-shadow: 0 8px 30px var(--primary-glow), var(--shadow-md); transform: translateY(-2px); color: #fff; }
.prompt-toggle:active { transform: translateY(0) scale(0.99); }
.prompt-toggle:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 2px; }
.prompt-pen { width: 18px; height: 18px; flex: none; opacity: 0.8; }
.prompt-arrow {
  width: 18px; height: 18px;
  margin-left: auto;
  transition: transform 0.35s var(--ease-spring);
  flex: none;
  opacity: 0.7;
}
.prompt-toggle.open .prompt-arrow { transform: rotate(180deg); }
.prompt-area {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-expo), opacity 0.38s var(--ease-out), margin 0.38s var(--ease-out);
  opacity: 0;
  margin: 0;
}
.prompt-area.open { max-height: 600px; opacity: 1; margin: 0 0 16px; }
.prompt-area-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.prompt-text {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  resize: vertical;
  outline: none;
  transition: border-color 0.22s var(--ease-out), box-shadow 0.25s var(--ease-expo);
  min-height: 110px;
}
.prompt-text:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,0.10), 0 4px 16px var(--primary-glow); background: var(--surface); }
.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.prompt-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
  min-height: 36px;
  white-space: nowrap;
}
.prompt-copy:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.prompt-copy:hover { border-color: var(--primary); color: var(--primary); background: rgba(29,78,216,0.05); transform: translateY(-1px); box-shadow: 0 3px 10px var(--primary-glow); }
.prompt-copy:active { transform: scale(0.96); }
.prompt-copy.copied { border-color: var(--success); color: var(--success); background: rgba(26,161,121,0.07); }
.pc-icon { width: 16px; height: 16px; flex: none; }
.prompt-lib-save {
  border: 1.5px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
  min-height: 36px;
  white-space: nowrap;
}
.prompt-lib-save:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.prompt-lib-save:hover { border-color: var(--primary); color: var(--primary); background: rgba(29,78,216,0.05); transform: translateY(-1px); }
.prompt-lib-save:active { transform: scale(0.96); }
.prompt-lib { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.prompt-lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(29,78,216,0.07);
  border: 1px solid rgba(29,78,216,0.20);
  border-radius: 30px;
  padding: 5px 8px 5px 12px;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  min-height: 30px;
}
.prompt-lib-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.prompt-lib-chip:hover { background: rgba(29,78,216,0.10); border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 2px 8px var(--primary-glow); }
.prompt-lib-chip:active { transform: scale(0.96); }
.plc-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plc-del {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  background: transparent;
  transition: all 0.15s var(--ease-spring);
  flex: none;
  opacity: 0.45;
}
.plc-del:hover { background: rgba(29,78,216,0.10); opacity: 1; transform: scale(1.12); }

/* ===== GENERATE BUTTON ===== */
.go {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-deep) 100%);
  background-size: 200% 200%;
  color: #fff;
  font-family: 'Syne', 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 14px 20px 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.40s var(--ease-spring);
  position: relative;
  overflow: hidden;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 24px var(--primary-glow), 0 2px 8px rgba(10,75,74,0.15);
  animation: goIdle 4s ease-in-out infinite;
}
@keyframes goIdle {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
.go::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 55%);
  pointer-events: none;
  border-radius: 999px;
}
.go::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  background: var(--rainbow);
  background-size: 300% 100%;
  animation: rainbowShift 3s linear infinite;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  border-radius: 999px;
}
@keyframes rainbowShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
.go:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.go:hover:not(:disabled) {
  box-shadow: 0 14px 44px var(--primary-glow), 0 4px 14px rgba(10,75,74,0.20);
  transform: translateY(-4px) scale(1.015);
  animation-play-state: paused;
}
.go:hover:not(:disabled)::after { opacity: 0.75; }
.go:active:not(:disabled) { transform: scale(0.96); transition-duration: 0.1s; }
.go:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; animation: none; }
.go .rainbow-glow {
  display: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--rainbow);
  background-size: 400% 400%;
  animation: heroDrift 3s var(--ease-out) infinite;
  flex: none;
}
.go.ready .rainbow-glow { display: block; }
.go-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.40s var(--ease-spring), background 0.35s var(--ease-out);
  box-shadow: inset 0 1px rgba(255,255,255,0.3);
}
.go-icon svg { width: 16px; height: 16px; }
.go:hover:not(:disabled) .go-icon { transform: translateX(4px) scale(1.08); background: rgba(255,255,255,0.26); }
.pressing { transform: scale(0.96) !important; transition: transform 0.08s !important; }

/* ===== STAGE ===== */
.stage {
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  background: var(--surface);
  display: grid;
  place-items: center;
  position: relative;
  transition: aspect-ratio 0.35s var(--ease-expo), opacity 0.4s var(--ease-expo), min-height 0.35s var(--ease-expo);
  box-shadow: var(--shadow-sm);
}
.stage.reel-format { aspect-ratio: 9 / 16; max-width: 340px; margin-left: auto; margin-right: auto; }
.stage .empty-s {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px;
  line-height: 1.6;
}
.stage .empty-s svg { width: 48px; height: 48px; opacity: 0.18; margin-bottom: 12px; color: var(--primary); }
.empty-s-hint { font-size: 11px; opacity: 0.6; margin-top: 4px; }
.spin {
  width: 44px; height: 44px;
  border: 3px solid rgba(29,78,216,0.12);
  border-top-color: var(--primary);
  border-right-color: rgba(14,124,123,0.4);
  border-radius: 50%;
  animation: rot 0.75s linear infinite;
  box-shadow: 0 0 16px var(--primary-glow);
}
@keyframes rot { to { transform: rotate(360deg); } }
.gentxt {
  position: absolute;
  bottom: 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  width: 100%;
  padding: 0 14px;
  animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* ===== RESULT STAGE ===== */
.result-stage {
  aspect-ratio: auto;
  min-height: 320px;
  padding: 0;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  overflow-y: auto;
}
.result-content {
  padding: 24px;
  text-align: left;
  animation: fadeIn 0.55s var(--ease-expo);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.dir-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 18px;
  line-height: 1.25;
  text-wrap: balance;
}
.dir-section {
  margin-bottom: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  animation: dirIn 0.55s var(--ease-expo) backwards;
  transition: transform 0.32s var(--ease-spring), box-shadow 0.32s var(--ease-expo);
  box-shadow: var(--shadow-sm);
}
.dir-section:hover { transform: translateX(5px) scale(1.006); box-shadow: var(--shadow-md), 0 0 0 1px var(--border-strong); }
.dir-section:nth-child(2) { animation-delay: 0.10s; }
.dir-section:nth-child(3) { animation-delay: 0.20s; }
.dir-section:nth-child(4) { animation-delay: 0.30s; }
.dir-section:nth-child(5) { animation-delay: 0.40s; }
.dir-section:nth-child(6) { animation-delay: 0.50s; }
.dir-section:nth-child(7) { animation-delay: 0.60s; }
.dir-section:nth-child(8) { animation-delay: 0.70s; }
@keyframes dirIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.dir-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.dir-text { font-size: 15px; color: var(--text); line-height: 1.65; }
.caption-text { font-style: italic; }
.caption-text::before { content: '\201C'; color: var(--primary); font-size: 1.3em; }
.caption-text::after { content: '\201D'; color: var(--primary); font-size: 1.3em; }

/* ===== APPROVE BAR ===== */
.approve-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(5,150,105,0.07), rgba(14,165,233,0.05));
  backdrop-filter: blur(12px);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
  animation: fadeIn 0.5s var(--ease-expo);
  box-shadow: 0 4px 16px rgba(26,161,121,0.15);
}
.approve-bar .step-indicator {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.approve-bar .step-indicator .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  box-shadow: 0 2px 8px rgba(26,161,121,0.3);
}
.approve-btn {
  background: linear-gradient(135deg, #1AA179, #158c65);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  padding: 10px 20px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  box-shadow: 0 4px 14px rgba(26,161,121,0.3);
}
.approve-btn:hover { box-shadow: 0 8px 24px rgba(26,161,121,0.40); transform: translateY(-2px) scale(1.03); }
.approve-btn:active { transform: scale(0.96); }

/* ===== SKELETON LOADER ===== */
.skel { display: flex; flex-direction: column; gap: 16px; padding: 24px; width: 100%; }
.skel-block {
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--border) 25%, rgba(200,214,230,0.5) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.6s infinite;
}
.skel-block:first-child { height: 28px; width: 65%; margin-bottom: 4px; }
.skel-block:nth-child(2) { height: 14px; width: 100%; }
.skel-block:nth-child(3) { height: 14px; width: 92%; }
.skel-block:nth-child(4) { height: 48px; width: 100%; border-radius: var(--radius-sm); }
.skel-block:nth-child(5) { height: 48px; width: 100%; border-radius: var(--radius-sm); }
.skel-block:nth-child(6) { height: 48px; width: 100%; border-radius: var(--radius-sm); }
@keyframes skelShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== NOTE / VEXPLAIN / COST ===== */
.note { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.6; }
.note b { color: var(--text); }
.vexplain {
  font-size: 13px; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  margin-bottom: 8px; line-height: 1.5;
}
.vexplain b { color: var(--text); }
.cost {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease-spring);
}
.cost:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.cost .lbl { font-size: 13px; color: var(--text); font-weight: 600; }
.cost .lbl small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 2px; }
.cost .amt { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; }
.animate-btn {
  width: 100%; border: none;
  background: linear-gradient(145deg, var(--primary-light), var(--primary));
  color: #fff;
  font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 800;
  padding: 14px; border-radius: var(--radius-sm); cursor: pointer;
  margin-top: 12px; display: none;
  transition: all 0.25s var(--ease-spring); min-height: 50px;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.animate-btn:hover { box-shadow: 0 8px 28px var(--primary-glow); transform: translateY(-2px); }

/* ===== RAINBOW SUCCESS FLOURISH ===== */
@keyframes flourish {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,107,0.5), 0 0 0 0 rgba(151,117,250,0.5); }
  50%  { box-shadow: 0 0 0 20px rgba(255,107,107,0), 0 0 0 20px rgba(151,117,250,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,107,0), 0 0 0 0 rgba(151,117,250,0); }
}
.go.success { animation: flourish 0.7s var(--ease-out); }

/* ===== GENERATION TIMER & TIMESTAMP ===== */
.gen-stage {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
}
.gen-timer {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeIn 0.4s var(--ease-expo);
}
/* Three-dot pulse spinner */
.gen-spinner {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gen-spinner span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: spinPulse 1.2s ease-in-out infinite;
}
.gen-spinner span:nth-child(2) { animation-delay: 0.2s; }
.gen-spinner span:nth-child(3) { animation-delay: 0.4s; }
@keyframes spinPulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1.1); opacity: 1; }
}
.gen-rows {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gen-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 5px 10px;
  background: var(--surface);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}
.gen-lbl { color: var(--muted); font-weight: 500; }
.gen-val { color: var(--text);  font-weight: 600; font-variant-numeric: tabular-nums; }
.gen-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.gen-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 99px;
  transition: width 0.5s var(--ease-smooth);
  min-width: 6px;
}

/* Timestamp bar shown after image */
.gen-meta {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.gen-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.gen-meta-total {
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 5px;
  margin-top: 2px;
}
.gen-meta-model {
  font-family: 'Syne', monospace;
  font-size: 10px;
  font-weight: 700;
  background: rgba(29,78,216,0.10);
  color: var(--primary);
  border: 1px solid var(--border-strong);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.gen-meta-row strong {
  color: var(--text);
  font-weight: 700;
}
.gen-caption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  border-top: 1px solid var(--border);
}
.gen-actions {
  padding: 10px 14px 14px;
}
.gen-dl-btn {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.gen-dl-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(12,232,231,0.04); }

/* ===== HOW TO USE GUIDE ===== */
.guide-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease-expo);
}
.guide-bar:focus-within { box-shadow: var(--shadow-md); }

/* ── Collapsed toggle bar ── */
.guide-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  min-height: 56px;
  position: relative;
}
.guide-toggle::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 3px 0 0 3px;
  transition: opacity 0.2s;
}
.guide-toggle:hover { background: rgba(29,78,216,0.03); }
.guide-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.guide-toggle-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(29,78,216,0.10);
  display: grid; place-items: center;
  flex: none;
  transition: background 0.2s, transform 0.3s var(--ease-spring);
}
.guide-toggle-icon svg { width: 18px; height: 18px; color: var(--primary); }
.guide-toggle:hover .guide-toggle-icon { background: rgba(29,78,216,0.16); transform: scale(1.06); }
.guide-toggle[aria-expanded="true"] .guide-toggle-icon { background: var(--primary); }
.guide-toggle[aria-expanded="true"] .guide-toggle-icon svg { color: #fff; }

.guide-toggle-text { flex: 1; min-width: 0; }
.guide-toggle-title {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.guide-toggle-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}
.guide-toggle-badge {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  background: rgba(29,78,216,0.10);
  border: 1px solid var(--border-strong);
  padding: 3px 10px;
  border-radius: 20px;
  flex: none;
  transition: background 0.15s;
}
.guide-toggle[aria-expanded="true"] .guide-toggle-badge {
  background: rgba(29,78,216,0.15);
}
.guide-arrow {
  width: 18px; height: 18px; flex: none;
  transition: transform 0.35s var(--ease-spring);
  color: var(--muted);
}
.guide-toggle[aria-expanded="true"] .guide-arrow { transform: rotate(180deg); color: var(--primary); }

/* ── Animated expand/collapse ── */
.guide-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-expo), opacity 0.35s var(--ease-out);
  opacity: 0;
  border-top: 1px solid transparent;
}
.guide-content.open {
  max-height: 1200px;
  opacity: 1;
  border-top-color: var(--border);
}

/* ── Bento Steps Grid ── */
.guide-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px 20px 16px;
}
.guide-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  position: relative;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s var(--ease-spring);
  overflow: hidden;
  cursor: default;
}
.guide-step::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(29,78,216,0.04) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.guide-step:hover { border-color: var(--primary); box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-2px); }
.guide-step:hover::after { opacity: 1; }

/* Wide steps span 2 columns */
.gs-wide { grid-column: span 2; flex-direction: row; align-items: flex-start; gap: 14px; }
.gs-wide .guide-step-body { flex: 1; }

/* Accent step (step 5) */
.gs-accent {
  background: linear-gradient(135deg, rgba(29,78,216,0.06) 0%, rgba(14,165,233,0.04) 100%);
  border-color: var(--border-strong);
}
.gs-accent .guide-step-num { background: linear-gradient(135deg, var(--primary), var(--accent)); }

.guide-step-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-xs);
  background: rgba(29,78,216,0.10);
  display: grid; place-items: center;
  flex: none;
  transition: background 0.2s, transform 0.2s var(--ease-spring);
}
.guide-step-icon svg { width: 16px; height: 16px; color: var(--primary); }
.guide-step:hover .guide-step-icon { background: rgba(29,78,216,0.18); transform: scale(1.08); }

.guide-step-num {
  position: absolute;
  top: 12px; right: 12px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px var(--primary-glow);
}
.gs-wide .guide-step-num { top: 14px; right: 14px; }

.guide-step-body strong {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.3;
  padding-right: 28px;
}
.gs-wide .guide-step-body strong { font-size: 13px; }
.guide-step-body p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.guide-step-body p em { color: var(--primary); font-style: normal; font-weight: 600; }

/* ── Pro Tips strip ── */
.guide-tips {
  margin: 0 20px 20px;
  background: linear-gradient(135deg, rgba(29,78,216,0.05) 0%, rgba(14,165,233,0.03) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.guide-tips::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), var(--primary));
}
.guide-tips-header {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding-left: 8px;
}
.guide-tips-header svg { width: 13px; height: 13px; }

.guide-tip-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 8px;
}
.guide-tip-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s var(--ease-spring);
  cursor: default;
}
.guide-tip-chip:hover { border-color: var(--primary); box-shadow: 0 2px 8px var(--primary-glow); transform: translateY(-1px); }
.gtc-label {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.gtc-value {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .guide-bento { grid-template-columns: 1fr 1fr; }
  .gs-wide { grid-column: span 2; }
}
@media (max-width: 600px) {
  .guide-bento { grid-template-columns: 1fr; padding: 14px 14px 10px; }
  .gs-wide { grid-column: span 1; flex-direction: column; }
  .guide-tips { margin: 0 14px 14px; }
  .guide-tip-chips { gap: 6px; }
  .guide-tip-chip { padding: 5px 10px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr; gap: 22px; }
  .wrap { padding: 16px clamp(12px, 2.5vw, 24px) 40px; }
}
@media (max-width: 880px) {
  .hero-logo { width: 72px; height: 72px; }
  .hero-body { gap: 16px; padding: 20px 22px 18px; }
  .wrap { padding: 16px 16px 40px; }
  .card { padding: 24px; }
  .card-shell { padding: 1.5px; }
  .result-content { padding: 18px; }
  .go { font-size: 18px; padding: 12px 16px 12px 24px; min-height: 56px; }
  .go-icon { width: 32px; height: 32px; }
  .go-icon svg { width: 14px; height: 14px; }
}
@media (max-width: 520px) {
  .hero-nav { padding: 10px 14px; flex-wrap: wrap; gap: 4px; }
  .opts { gap: 10px; }
  .chips { gap: 10px; }
  .badge { margin-right: 0; }
  .hero-body { flex-direction: column; text-align: center; gap: 12px; padding: 18px 16px 16px; }
  .hero-text { text-align: center; }
  .hero-logo { width: 68px; height: 68px; }
  .sub { font-size: 12px; }
  .voicebar { flex-wrap: wrap; }
  .toggle button { font-size: 13px; padding: 10px; }
  .go { font-size: 16px; padding: 10px 14px 10px 20px; min-height: 52px; }
  .go-icon { width: 28px; height: 28px; }
  .go-icon svg { width: 12px; height: 12px; }
  .card { padding: 18px; }
  .card-shell { padding: 1px; }
  .settings-panel.open { padding: 14px 16px; }
  .stage .empty-s { padding: 18px; }
  .result-content { padding: 14px; }
  .hero-ticker-track span { font-size: 11px; padding: 0 10px; }
}
