/* ═══════════════════════════════════════════════════════════
   Nabie — style.css (FIX-002)
   [hidden] is the sole visibility control — no body attr selectors
   ═══════════════════════════════════════════════════════════ */

/* ─── [hidden] wins over everything — MUST be first ─────── */
[hidden] { display: none !important; }

/* ─── Variables ──────────────────────────────────────────── */
:root {
  --white:       #ffffff;
  --bg:          #f8f8f7;
  --ink:         #1a1a1a;
  --ink-2:       #4a4a4a;
  --ink-3:       #8a8a8a;
  --gold:        #d9a55e;
  --gold-2:      #e8b87a;
  --gold-press:  #c8943a;
  --gold-light:  #f5dba8;
  --on-gold:     #3a2706;
  --navy:        #0f1b2e;
  --line-soft:   rgba(0, 0, 0, 0.08);
  --r-pill:      999px;
  --r-lg:        20px;
  --r-md:        12px;
  --r-sm:        8px;
  --sh-1:        0 2px 12px rgba(0, 0, 0, 0.06);
  --sh-2:        0 6px 28px rgba(0, 0, 0, 0.10);
  --sh-3:        0 20px 64px rgba(0, 0, 0, 0.18);
  --sh-gold:     0 4px 20px rgba(217, 165, 94, 0.36);
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --font-serif:  Georgia, 'Times New Roman', serif;
  --font-body:   system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Reset / Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
input  { font-family: inherit; }
a      { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold-press); outline-offset: 2px; }

/* ─── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  cursor: pointer;
}
.nav__right { display: flex; align-items: center; gap: 12px; }
.nb-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gold-press);
  font-weight: 500;
}
.nb-auth-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 8px rgba(217,165,94,0.65);
}
.nav__login {
  background: none;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-pill);
  padding: 6px 18px;
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color 0.15s, color 0.15s;
}
.nav__login:hover { border-color: var(--gold); color: var(--gold-press); }
.nb-login-btn--active { border-color: var(--gold-2); color: var(--gold-press); font-weight: 500; }

/* Global header menu button — page-level action next to 데모 로그인 상태 */
.nav-menu-btn {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, rgba(243,213,142,0.28), rgba(217,165,94,0.18));
  border: 1.5px solid rgba(200,161,90,0.50);
  border-radius: var(--r-pill);
  padding: 6px 14px 6px 10px;
  height: 34px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nav-menu-btn:hover { background: linear-gradient(180deg, rgba(243,213,142,0.44), rgba(217,165,94,0.30)); border-color: var(--gold); }
.nav-menu-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav-menu-lines { display: flex; flex-direction: column; gap: 3.5px; flex-shrink: 0; }
.nav-menu-lines span { display: block; width: 14px; height: 2px; background: var(--gold-press); border-radius: 1px; }
.nav-menu-label { font-size: 12px; font-weight: 700; color: var(--gold-press); }

/* ═══════════════════════════════════════════════════════════
   VIEW SYSTEM
   Each view has its OWN display rule.
   [hidden] attribute is the sole visibility toggle.
   Initial state: setup and chat have [hidden] in HTML.
   Hero has no [hidden], so its display: flex applies on load.
   ═══════════════════════════════════════════════════════════ */

/* ─── HERO VIEW ──────────────────────────────────────────── */
.nb-view--hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  min-height: calc(100dvh - 52px);
  padding: 0;
  overflow: hidden;
  /* V3-inspired world gradient background */
  background:
    radial-gradient(1100px 720px at 50% -8%, rgba(243,213,142,0.14), transparent 58%),
    radial-gradient(820px 680px at 12% 28%, rgba(142,123,230,0.06), transparent 60%),
    radial-gradient(820px 680px at 90% 32%, rgba(111,166,232,0.06), transparent 60%),
    var(--white);
}

/* ─── V3-inspired hero 2-column layout ─────────────────── */
.hero-v3 {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
  align-items: center;
  width: 100%; max-width: 1280px;
  margin: 0 auto;
  padding: 24px 48px 48px;
  min-height: calc(100dvh - 52px);
}
.hero-v3__copy {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.hero-v3__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  font-family: system-ui, sans-serif;
  color: var(--gold-press);
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(200,161,90,0.34);
  padding: 6px 14px; border-radius: var(--r-pill);
  margin-bottom: 20px;
  white-space: nowrap;
}
.hero-v3__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-2); box-shadow: 0 0 10px rgba(217,165,94,0.70);
  flex-shrink: 0;
}
.hero-v3__desc {
  font-size: 16px; line-height: 1.72;
  color: var(--ink-2); max-width: 380px;
  margin: 20px 0 32px;
}
/* Hero stage: phone container, perspective set here */
.hero-v3__stage {
  position: relative;
  height: min(760px, calc(100dvh - 120px));
  display: flex; align-items: center; justify-content: center;
  perspective: 1700px;
  pointer-events: none;
}
/* Breathing aura (V3 hero-aura) */
.hero-v3__aura {
  position: absolute;
  width: 500px; height: 560px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(243,213,142,0.30), transparent 72%),
    radial-gradient(closest-side, rgba(142,123,230,0.10), transparent 80%);
  filter: blur(8px); z-index: 0;
  animation: heroAuraBreath 7.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes heroAuraBreath {
  0%,100% { transform: scale(1); opacity: 0.85; }
  50%     { transform: scale(1.07); opacity: 1; }
}

/* ─── V3 Phone Device (360×760, border-radius 56px) ─────── */
.nb-phone-wrap {
  position: relative; z-index: 5;
  transform-style: preserve-3d;
  transform: rotateY(-19deg) rotateX(5deg) rotate(-1deg);
  pointer-events: none;
}
.nb-phone {
  position: relative;
  width: 360px; height: 760px;
  border-radius: 56px;
  padding: 13px;
  background: linear-gradient(150deg, #FBF7EF 0%, #ECE2CF 38%, #F4ECDC 62%, #E2D5BD 100%);
  box-shadow:
    -22px 30px 70px rgba(60,40,15,0.24),
    -2px 10px 30px rgba(60,40,15,0.12),
    0 0 0 1px rgba(255,255,255,0.55) inset,
    0 0 0 7px rgba(255,255,255,0.03);
}
/* Glassy edge highlight (V3 phone::before) */
.nb-phone::before {
  content: '';
  position: absolute; inset: 0; border-radius: 56px;
  background: linear-gradient(125deg, rgba(255,255,255,0.55) 0%, transparent 22%, transparent 78%, rgba(255,255,255,0.28) 100%);
  mix-blend-mode: screen;
  pointer-events: none; z-index: 30;
}
/* Side buttons (V3: .btn-vol, .btn-pwr) */
.nb-phone-vol {
  position: absolute; width: 3px; height: 56px; border-radius: 3px;
  background: linear-gradient(180deg, #D9CBB2, #C3B294);
  left: -3px; top: 168px; z-index: 1;
}
.nb-phone-vol--2 { top: 240px; }
.nb-phone-pwr {
  position: absolute; width: 3px; height: 78px; border-radius: 3px;
  background: linear-gradient(180deg, #D9CBB2, #C3B294);
  right: -3px; top: 200px; z-index: 1;
}
/* Screen */
.nb-phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 44px; overflow: hidden;
  background: #FFFFFF; display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px rgba(40,30,15,0.08) inset;
}
/* Dynamic island (V3: phone-dyn — 108×30 pill) */
.nb-phone-dyn {
  position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 30px;
  background: #14110C; border-radius: 999px;
  z-index: 60; pointer-events: none;
}
/* Status bar */
.nb-phone-status {
  position: absolute; top: 18px; left: 0; right: 0; height: 24px;
  z-index: 55; display: flex; align-items: center;
  justify-content: space-between; padding: 0 28px;
  font-size: 12px; font-weight: 700; color: #221E17;
  pointer-events: none;
}
/* Screen aura (V3: .scr-aura) */
.nb-scr-aura {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(280px 200px at 24% 6%, rgba(243,213,142,0.18), transparent 62%),
    radial-gradient(260px 220px at 92% 96%, rgba(142,123,230,0.07), transparent 64%);
}
/* Home indicator */
.nb-phone-home {
  position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%);
  width: 128px; height: 5px; border-radius: 999px;
  background: rgba(30,22,10,0.22); z-index: 60; pointer-events: none;
}

/* ─── V3 HeroChat inside phone ───────────────────────────── */
.nb-hero-chat {
  position: absolute; inset: 0; padding: 52px 0 0;
  display: flex; flex-direction: column; z-index: 4;
}
/* Chat header — frosted glass (V3: .chat-head) */
.nb-hero-chat-head {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 18px 12px;
  border-bottom: 1px solid rgba(40,34,20,0.055);
  background: rgba(255,255,255,0.72); backdrop-filter: blur(10px);
  position: relative; z-index: 3; flex-shrink: 0;
}
.nb-hero-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 36% 30%, #fffaef, #f3d58e 36%, #dcb877 64%, #b0853a 100%);
  box-shadow: 0 0 0 1.5px rgba(200,161,90,0.35), 0 0 12px rgba(243,213,142,0.40);
}
.nb-hero-ci { flex: 1; min-width: 0; }
.nb-hero-nm {
  font-family: Georgia, serif; font-weight: 600; font-size: 17px; color: #221E17;
}
.nb-hero-st {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: #A47C32; margin-top: 1px;
}
.nb-hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #DCB877; box-shadow: 0 0 8px rgba(243,213,142,0.80);
}
/* Chat body (V3: .chat-body) */
.nb-hero-body {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 8px; position: relative; z-index: 2;
}
.nb-hero-day {
  align-self: center;
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #A49B8B; margin: 0 0 2px; white-space: nowrap;
}
/* Message row (avatar + bubble) */
.nb-hero-row { display: flex; gap: 8px; align-items: flex-end; }
.nb-hero-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 36% 30%, #fffaef, #f3d58e 36%, #dcb877 64%, #b0853a 100%);
}
/* AI bubble (V3: .b) */
.nb-hero-b {
  max-width: 80%; padding: 9px 13px; font-size: 13.5px; line-height: 1.5;
  border-radius: 18px 18px 18px 5px;
  background: #FFFFFF; border: 1px solid rgba(40,34,20,0.055);
  color: #221E17; word-break: keep-all;
  box-shadow: 0 1px 2px rgba(50,38,15,0.05);
}
/* User bubble (V3: .b.me) */
.nb-hero-b--me {
  align-self: flex-end; margin-left: auto;
  border-radius: 18px 18px 5px 18px;
  background: linear-gradient(180deg, #EED39A, #DCB877);
  color: #3C2906; border: none;
  box-shadow: 0 4px 14px rgba(200,161,90,0.24);
}
/* Memory hint chip */
.nb-hero-mem {
  align-self: center;
  font-size: 10.5px; color: #A49B8B;
  background: rgba(40,34,20,0.04); border-radius: 999px;
  padding: 4px 12px; margin-top: 2px; white-space: nowrap;
}
/* Chat input bar (V3: .chat-input) */
.nb-hero-input {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px;
  border-top: 1px solid rgba(40,34,20,0.055);
  background: #FFFFFF; flex-shrink: 0; z-index: 3;
}
.nb-hero-field {
  flex: 1; height: 38px; border-radius: 999px;
  background: #FBF8F3; border: 1px solid rgba(40,34,20,0.10);
  display: flex; align-items: center; padding: 0 14px;
  font-size: 12.5px; color: #A49B8B;
}
.nb-hero-send {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(180deg, #EED39A, #C8A15A);
  color: #3C2906; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(200,161,90,0.30);
}

/* ─── Hero copy layout updates ───────────────────────────── */
/* .hero-title and .hero-sub already defined below — just ensure left alignment */
.hero-v3__copy .hero-title { text-align: left; margin-bottom: 6px; }
.hero-v3__copy .hero-sub   { text-align: left; margin-bottom: 0; }
.hero-v3__copy .btn-start  { position: relative; z-index: 1; }
.hero-v3__copy .hero-note  { text-align: left; margin-top: 16px; }

/* Butterfly / LED glow */
.butterfly-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;  /* entire wrap is non-interactive */
  overflow: hidden;
  z-index: 0;
}
.bfly-wing {
  position: absolute;
  border-radius: 60% 40% 50% 50% / 60% 50% 50% 40%;
  filter: blur(70px);
  pointer-events: none;  /* explicit on children too */
}
.bfly-wing--left {
  width: 300px; height: 380px;
  background: radial-gradient(ellipse at center, rgba(120,155,255,0.20), transparent 72%);
  top: 50%; left: calc(50% - 270px);
  transform: translateY(-50%) rotate(-15deg);
}
.bfly-wing--right {
  width: 300px; height: 380px;
  background: radial-gradient(ellipse at center, rgba(185,130,255,0.16), transparent 72%);
  top: 50%; right: calc(50% - 270px);
  transform: translateY(-50%) rotate(15deg);
}
.bfly-center {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,165,94,0.08), transparent 70%);
  filter: blur(28px);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Hero content */
.hero-center {
  position: relative;
  z-index: 1;          /* above butterfly-wrap (z-index: 0) */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(72px, 9vw, 120px);  /* V3 uses 132px; we scale for our layout */
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 0.95;
  margin-bottom: 10px;
  /* V3: gradient text for depth */
  background: linear-gradient(176deg, var(--ink) 0%, var(--ink) 54%, var(--gold-press) 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2.2vw, 26px);   /* V3: 30px */
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0.01em;
  margin-bottom: 0;
}

/* ─── Hero phone mock ────────────────────────────────────── */
/* Entire phone is decorative — pointer-events: none prevents
   the phone frame from intercepting clicks on the CTA below */
.hero-phone {
  position: relative;
  margin-bottom: 44px;
  pointer-events: none;
}
/* Premium LED aura around the phone */
.hero-phone::before {
  content: '';
  position: absolute;
  inset: -32px;
  background: radial-gradient(ellipse at 50% 38%,
    rgba(155,140,255,0.18) 0%,
    rgba(217,165,94,0.10) 40%,
    transparent 68%);
  filter: blur(28px);
  z-index: -1;
  pointer-events: none;
}
/* Large premium phone frame — realistic iPhone-like scale */
.hph-frame {
  width: clamp(340px, 31vw, 430px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(162deg, #f5eed8, #e2d0ac, #d4be98);
  border-radius: 46px;
  padding: 14px 10px 20px;
  /* Premium layered shadow: depth + metallic rim + glow */
  box-shadow:
    0 2px 0   rgba(255,255,255,0.92) inset,
    0 -1px 0  rgba(0,0,0,0.16)       inset,
    1.5px 0 0 rgba(255,255,255,0.60) inset,
    -1.5px 0 0 rgba(0,0,0,0.12)      inset,
    8px 20px 40px rgba(0,0,0,0.18),
    0 40px 100px rgba(0,0,0,0.24),
    0 0 0 1.5px  rgba(200,170,125,0.50);
  /* Realistic iPhone presentation — angled and dimensional */
  transform: perspective(1100px) rotateY(-12deg) rotateX(3deg) rotate(-1deg);
  transform-origin: center center;
}
/* Wide screen opening */
.hph-notch {
  width: 68px; height: 24px;
  background: #12100b;
  border-radius: var(--r-pill);
  margin: 0 auto 0;
  position: relative; z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 13px;
}
.hph-notch::after {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #28231c;
  box-shadow: 0 0 0 1px rgba(80,65,50,0.5);
}
.hph-screen {
  flex: 1;
  background: var(--white);
  background-image:
    radial-gradient(220px 160px at 22% 5%, rgba(245,198,110,0.13), transparent 58%);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}
.hph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 20px 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.hph-chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px 9px;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.hph-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 0 0 2.5px rgba(217,165,94,0.28), 0 3px 8px rgba(217,165,94,0.32);
  flex-shrink: 0;
}
.hph-head-info { display: flex; flex-direction: column; gap: 2px; }
.hph-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.hph-online {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--gold-press); font-weight: 500;
}
.hph-online-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 7px rgba(217,165,94,0.85);
}
.hph-bubbles {
  flex: 1;
  padding: 13px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}
.hph-bubble {
  max-width: 80%;
  padding: 9px 13px;
  font-size: 12.5px;
  line-height: 1.48;
}
.hph-bubble--ai {
  background: rgba(238,238,244,0.92);
  color: var(--ink-2);
  align-self: flex-start;
  border-radius: 4px 16px 16px 16px;
  border: 1px solid rgba(0,0,0,0.05);
}
.hph-bubble--user {
  background: linear-gradient(135deg, #ead99a, #d9a55e);
  color: var(--on-gold);
  align-self: flex-end;
  border-radius: 16px 4px 16px 16px;
  box-shadow: 0 2px 8px rgba(217,165,94,0.32);
}
.hph-mem-hint {
  font-size: 10px;
  color: var(--ink-3);
  background: rgba(0,0,0,0.04);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  align-self: center;
  margin-top: 2px;
}
.hph-input {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.hph-input-stub {
  flex: 1;
  font-size: 11px;
  color: var(--ink-3);
  background: rgba(0,0,0,0.04);
  border-radius: var(--r-pill);
  padding: 5px 12px;
}
.hph-send {
  font-size: 13px;
  color: var(--gold-press);
  font-weight: 700;
  background: rgba(217,165,94,0.14);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.hph-home {
  width: 64px; height: 4px;
  background: rgba(40,30,15,0.22);
  border-radius: var(--r-pill);
  margin: 7px auto 0;
  flex-shrink: 0;
}

/* ─── LED butterfly decorative motifs ────────────────────── */
/* All elements are inside aria-hidden container, pointer-events: none */
.hero-bfly-group {
  position: absolute;
  inset: -60px;          /* extend beyond phone bounds so butterflies orbit it */
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}

.hero-bfly {
  position: absolute;
  pointer-events: none;
  width: 24px;
  height: 16px;
}

/* Wing shapes via pseudo-elements */
.hero-bfly::before,
.hero-bfly::after {
  content: '';
  position: absolute;
  top: 0;
  width: 11px;
  height: 15px;
  animation: bfly-flutter 2.6s ease-in-out infinite alternate;
}

/* Left wing */
.hero-bfly::before {
  right: 50%;
  border-radius: 100% 0 60% 20%;
  transform-origin: 100% 70%;
}

/* Right wing */
.hero-bfly::after {
  left: 50%;
  border-radius: 0 100% 20% 60%;
  transform-origin: 0 70%;
  animation-direction: alternate-reverse;
}

@keyframes bfly-flutter {
  0%   { transform: rotateY(0deg) scaleY(1); }
  100% { transform: rotateY(55deg) scaleY(0.85); }
}

/* Butterfly 1 — upper-left, soft violet-blue LED glow */
.hero-bfly--1 {
  top: 8%;
  left: 6%;
  animation: bfly-drift-1 7s ease-in-out infinite alternate;
}
.hero-bfly--1::before,
.hero-bfly--1::after {
  background: radial-gradient(ellipse at 50% 30%, rgba(180,165,255,0.75), rgba(140,120,220,0.30));
  box-shadow: 0 0 8px rgba(155,140,255,0.55), 0 0 20px rgba(155,140,255,0.15);
}
@keyframes bfly-drift-1 {
  0%   { transform: translate(0, 0)   rotate(-8deg); opacity: 0.80; }
  50%  { transform: translate(-12px, -18px) rotate(6deg);  opacity: 0.95; }
  100% { transform: translate(8px, -8px)  rotate(-4deg); opacity: 0.65; }
}

/* Butterfly 2 — upper-right, soft champagne-gold LED glow */
.hero-bfly--2 {
  top: 12%;
  right: 5%;
  animation: bfly-drift-2 9s ease-in-out infinite alternate;
  animation-delay: -2s;
}
.hero-bfly--2::before,
.hero-bfly--2::after {
  background: radial-gradient(ellipse at 50% 30%, rgba(245,215,140,0.80), rgba(217,165,94,0.30));
  box-shadow: 0 0 8px rgba(217,165,94,0.55), 0 0 20px rgba(217,165,94,0.15);
}
@keyframes bfly-drift-2 {
  0%   { transform: translate(0, 0)   rotate(10deg); opacity: 0.70; }
  50%  { transform: translate(14px, -22px) rotate(-6deg); opacity: 0.90; }
  100% { transform: translate(-6px, -12px) rotate(8deg);  opacity: 0.60; }
}

/* Butterfly 3 — lower-left, white-blue LED glow */
.hero-bfly--3 {
  bottom: 22%;
  left: 3%;
  animation: bfly-drift-3 8s ease-in-out infinite alternate;
  animation-delay: -4s;
}
.hero-bfly--3::before,
.hero-bfly--3::after {
  background: radial-gradient(ellipse at 50% 30%, rgba(210,220,255,0.80), rgba(155,175,255,0.30));
  box-shadow: 0 0 7px rgba(170,185,255,0.50), 0 0 18px rgba(170,185,255,0.12);
}
@keyframes bfly-drift-3 {
  0%   { transform: translate(0, 0)    rotate(5deg);  opacity: 0.60; }
  50%  { transform: translate(-10px, 16px) rotate(-8deg); opacity: 0.85; }
  100% { transform: translate(7px, 8px) rotate(4deg); opacity: 0.50; }
}

/* Butterfly 4 — far right mid, very subtle gold */
.hero-bfly--4 {
  top: 45%;
  right: 2%;
  animation: bfly-drift-4 10s ease-in-out infinite alternate;
  animation-delay: -6s;
}
.hero-bfly--4::before,
.hero-bfly--4::after {
  background: radial-gradient(ellipse at 50% 30%, rgba(255,230,175,0.65), rgba(217,165,94,0.20));
  box-shadow: 0 0 6px rgba(217,165,94,0.40), 0 0 14px rgba(217,165,94,0.10);
  width: 9px; height: 12px;  /* slightly smaller */
}
@keyframes bfly-drift-4 {
  0%   { transform: translate(0, 0)    rotate(-12deg); opacity: 0.55; }
  50%  { transform: translate(10px, -14px) rotate(5deg);  opacity: 0.75; }
  100% { transform: translate(-5px, 6px)  rotate(-8deg); opacity: 0.45; }
}

/* Hero CTA */
.btn-start {
  position: relative;
  z-index: 1;            /* ensure button is above any stacking issues */
  background: linear-gradient(180deg, var(--gold-2), var(--gold-press));
  color: var(--on-gold);
  border: none;
  border-radius: var(--r-pill);
  padding: 14px 48px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: var(--sh-gold);
  cursor: pointer;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn-start:hover  { opacity: 0.88; transform: translateY(-1px); }
.btn-start:active { opacity: 1;    transform: translateY(0);    }
.hero-note {
  margin-top: 16px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  line-height: 1.75;
  text-align: center;
}

/* ─── SETUP (STEP FLOW) VIEW ─────────────────────────────── */
.nb-view--setup {
  display: flex;         /* visible when [hidden] removed by JS */
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100dvh - 52px);
  padding: 32px 16px 64px;
  background: var(--bg);
}

.step-frame {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 32px 28px 36px;
  border: 1px solid var(--line-soft);
}
.step-brand {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--gold-press);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.step-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.10);
  border: 1.5px solid rgba(0,0,0,0.12);
  display: inline-block;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.step-dot--active { background: var(--gold); border-color: var(--gold-press); transform: scale(1.28); }
.step-dot--done   { background: var(--gold-light); border-color: var(--gold); }

/* Step panels: block by default; [hidden] hides them */
.step-panel { display: block; }

.step-eyebrow {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-press); margin-bottom: 6px;
}
.step-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 8px;
}
.step-helper { font-size: 13px; color: var(--ink-3); line-height: 1.5; margin-bottom: 20px; }
.step-demo-note { font-size: 10.5px; color: var(--ink-3); margin-top: 12px; line-height: 1.4; opacity: 0.8; }

/* ─── Voice plan access notice ───────────────────────────── */
.voice-plan-notice {
  background: var(--bg); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.voice-plan-row { display: flex; align-items: center; gap: 9px; }
.voice-plan-tier {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--r-pill); flex-shrink: 0; line-height: 1.6;
}
.voice-plan-tier--free  { background: rgba(0,0,0,0.06); color: var(--ink-2); border: 1px solid rgba(0,0,0,0.10); }
.voice-plan-tier--plus  { background: rgba(217,165,94,0.20); color: var(--gold-press); border: 1px solid rgba(217,165,94,0.38); }
.voice-plan-text { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }

/* ─── Voice action buttons: 샘플듣기 / 재생성 ──────────────── */
.voice-action-btns {
  display: flex; gap: 8px; margin-top: 16px; margin-bottom: 4px;
}
.btn-voice-action {
  flex: 1; padding: 10px 14px;
  background: var(--bg); border: 1.5px solid var(--line-soft);
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-voice-action:hover { border-color: var(--gold-2); color: var(--gold-press); }
.btn-voice-action:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-voice-action--regen {
  background: rgba(217,165,94,0.10);
  border-color: rgba(217,165,94,0.38);
  color: var(--gold-press);
}
.btn-voice-action--regen:hover { background: rgba(217,165,94,0.20); border-color: var(--gold); }
.voice-action-status {
  font-size: 10px; color: var(--ink-3); text-align: center;
  margin-bottom: 8px; line-height: 1.4; opacity: 0.8;
  min-height: 14px;
}

/* ─── Voice adjustment sliders ─────────────────────────── */
.voice-slider-wrap { margin-bottom: 20px; }
.voice-slider-hdr {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 9px;
}
.voice-slider-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--warm);
}
.voice-slider-val {
  font-size: 12px; font-weight: 700; color: var(--gold);
  min-width: 54px; text-align: right;
}
.voice-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(217,165,94,0.15);
  outline: none;
  cursor: pointer;
  display: block;
}
.voice-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 2px 10px rgba(217,165,94,0.50);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}
.voice-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 3px 14px rgba(217,165,94,0.70);
  transform: scale(1.08);
}
.voice-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  box-shadow: 0 2px 10px rgba(217,165,94,0.50);
  cursor: pointer;
}
.voice-slider:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.voice-slider-ticks {
  display: flex; justify-content: space-between;
  margin-top: 7px;
}
.voice-slider-ticks span { font-size: 10.5px; color: var(--ink-3); line-height: 1; }

/* Step 1: name */
.step-field-wrap { margin-bottom: 8px; }
.step-name-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-md);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.step-name-input:focus { outline: none; border-color: var(--gold); background: var(--white); }
.step-name-input::placeholder { color: var(--ink-3); }
.step-field-note { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }

/* Step 2: vibe cards */
.vibe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.vibe-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 14px 12px;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.vibe-card:hover    { border-color: var(--gold-2); box-shadow: var(--sh-1); }
.vibe-card--sel     { border-color: var(--gold); background: rgba(217,165,94,0.06); box-shadow: 0 0 0 1px rgba(217,165,94,0.3); }
.vibe-icon  { font-size: 22px; line-height: 1; }
.vibe-name  { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.vibe-desc  { font-size: 11px; color: var(--ink-3); line-height: 1.3; }

/* Step 2: persona/dialogue matrix sections */
.step-section { margin-bottom: 18px; }
.step-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-section-opt {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
  opacity: 0.7;
}
/* Speech mode chips — 2-col equal width */
.step-chips--speech {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.step-chip--speech {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 10px;
  height: auto;
}
.step-chip--speech strong { font-size: 13px; font-weight: 600; color: var(--ink); display: block; }
.step-chip--speech span   { font-size: 10px; color: var(--ink-3); display: block; }
.step-chip--speech.step-chip--sel strong { color: var(--gold-press); }
/* Custom role textarea */
.step-custom-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  resize: none;
  font-family: var(--font-body);
  line-height: 1.5;
  transition: border-color 0.15s;
  display: block;
}
.step-custom-input:focus { outline: none; border-color: var(--gold); background: var(--white); }
.step-custom-input::placeholder { color: var(--ink-3); font-size: 12px; }

/* Step 3: chips */
.step-option-group { margin-bottom: 16px; }
.step-opt-label {
  font-size: 10.5px; font-weight: 700;
  color: var(--ink-3); letter-spacing: 0.07em;
  text-transform: uppercase; margin-bottom: 8px;
}
.step-badge {
  display: inline-block;
  margin-left: 5px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(217,165,94,0.18);
  color: var(--gold-press);
  vertical-align: middle;
  line-height: 1.5;
}
.step-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Segmented (joined) control variant — for voice adjustment controls */
.step-chips--seg {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--bg);
}
.step-chips--seg .step-chip {
  flex: 1;
  padding: 9px 10px;
  border: none !important;
  border-right: 1px solid var(--line-soft) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 12.5px;
  background: none;
  white-space: nowrap;
}
.step-chips--seg .step-chip:last-child { border-right: none !important; }
.step-chips--seg .step-chip.step-chip--sel {
  background: linear-gradient(180deg, rgba(243,213,142,0.28), rgba(217,165,94,0.16));
  color: var(--gold-press); font-weight: 700;
}
.step-chips--seg .step-chip:hover { background: rgba(217,165,94,0.07); }
.step-chip {
  padding: 6px 13px;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-pill);
  font-size: 12.5px; color: var(--ink-2);
  background: var(--white); cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.step-chip:hover  { border-color: var(--gold-2); color: var(--gold-press); }
.step-chip--sel   { border-color: var(--gold); color: var(--gold-press); background: rgba(217,165,94,0.08); font-weight: 600; }

/* Step 4: outfit — gendered sets, 10 cards each, Free/Plus/Private badges */
.outfit-gender-set { margin-bottom: 4px; }
.outfit-gender-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px;
}
.outfit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }

/* Legacy outfit-opt kept for reference; new cards use outfit-card */
.outfit-opt {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 8px 12px;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--white); cursor: pointer;
  font-size: 11.5px; color: var(--ink-2);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.outfit-opt:hover  { border-color: var(--gold-2); box-shadow: var(--sh-1); }
.outfit-opt--sel   { border-color: var(--gold); background: rgba(217,165,94,0.06); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px rgba(217,165,94,0.3); }

/* New outfit card system */
.outfit-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.outfit-card:hover { border-color: rgba(217,165,94,0.6); transform: translateY(-1px); box-shadow: var(--sh-1); }
.outfit-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.outfit-card--sel  { border-color: var(--gold); box-shadow: 0 4px 16px rgba(200,161,90,0.22); }

.outfit-card__swatch {
  position: relative;
  width: 100%; height: 76px;
}
/* 10 swatch colour gradients — warm to cool/dark palette */
.outfit-card__swatch--1  { background: linear-gradient(135deg, #f5eed8, #e8dcc4); }
.outfit-card__swatch--2  { background: linear-gradient(135deg, #eef2f8, #dde5f0); }
.outfit-card__swatch--3  { background: linear-gradient(135deg, #f2ebe0, #e5d9c8); }
.outfit-card__swatch--4  { background: linear-gradient(135deg, #f8f6f4, #eeebe8); }
.outfit-card__swatch--5  { background: linear-gradient(140deg, #f0e4d0, #dcc8a8); }
.outfit-card__swatch--6  { background: linear-gradient(135deg, #2e2c38, #1e1c28); }
.outfit-card__swatch--7  { background: linear-gradient(135deg, #282420, #1e1a18); }
.outfit-card__swatch--8  { background: linear-gradient(135deg, #4a484c, #3a3840); }
.outfit-card__swatch--9  { background: linear-gradient(155deg, #d8c8a0, #c0ae7a); }
.outfit-card__swatch--10 { background: linear-gradient(135deg, #8a7040, #6a5028); }

.outfit-card__tick {
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-press));
  color: var(--on-gold);
  display: none;
  align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  box-shadow: var(--sh-gold);
}
.outfit-card--sel .outfit-card__tick { display: flex; }

.outfit-card__meta { padding: 8px 10px 9px; }
.outfit-card__name {
  font-size: 12px; font-weight: 600; color: var(--ink);
  line-height: 1.3; margin-top: 5px;
}

/* Plan tier badges */
.outfit-badge {
  display: inline-block;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  line-height: 1.5;
}
.outfit-badge--free    { background: rgba(0,0,0,0.06);      color: var(--ink-2);  border: 1px solid rgba(0,0,0,0.10); }
.outfit-badge--plus    { background: rgba(217,165,94,0.20);  color: var(--gold-press); border: 1px solid rgba(217,165,94,0.38); }
.outfit-badge--private { background: rgba(100,85,190,0.11);  color: #5B4EA8;       border: 1px solid rgba(100,85,190,0.25); }

/* Step 3: base cards */
.step-base-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.step-base-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px; border: 1.5px solid var(--line-soft);
  border-radius: var(--r-md); background: var(--white); cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.step-base-card:hover { border-color: rgba(217,165,94,0.5); }
.step-base-card--sel { border-color: var(--gold); background: rgba(217,165,94,0.06); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px rgba(217,165,94,0.25); }
.step-base-orb { width: 52px; height: 52px; border-radius: 50%; }
.step-base-orb--f { background: radial-gradient(circle at 36% 28%, #fffaef, #f3d58e 40%, #dcb877 70%, #b0853a 100%); box-shadow: 0 2px 8px rgba(200,161,90,0.28); }
.step-base-orb--m { background: radial-gradient(circle at 36% 28%, #f0f0f5, #c5c8d0 40%, #9095a0 70%, rgba(96,112,128,0.54) 100%); box-shadow: 0 2px 8px rgba(80,90,110,0.22); }
.step-base-label { font-size: 12px; font-weight: 600; color: inherit; }

/* Step 3: regen button and preview */
.btn-regen { display: block; width: 100%; margin: 16px 0 8px; padding: 11px 20px; background: rgba(217,165,94,0.12); border: 1.5px solid rgba(217,165,94,0.40); border-radius: var(--r-pill); font-size: 13px; font-weight: 700; color: var(--gold-press); cursor: pointer; text-align: center; transition: background 0.15s, border-color 0.15s; }
.btn-regen:hover { background: rgba(217,165,94,0.22); border-color: var(--gold); }
.step-regen-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--r-md); margin-bottom: 16px; }
.step-regen-orb { width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 36% 28%, #fffaef, #f3d58e 40%, #dcb877 70%, #b0853a 100%); box-shadow: 0 0 0 1px rgba(200,161,90,0.35), 0 0 24px rgba(243,213,142,0.50); border: 1.5px solid rgba(255,255,255,0.65); }
/* Outfit regen orb — same orb with a visible outfit color band around it */
.step-regen-orb--outfit { background: radial-gradient(circle at 36% 28%, #fffaef, #f3d58e 30%, #dcb877 60%, #b0853a 88%); box-shadow: 0 0 0 4px rgba(245,238,216,0.85), 0 0 0 7px rgba(200,161,90,0.22), 0 0 28px rgba(243,213,142,0.55); }
.step-regen-label { font-size: 12px; font-weight: 600; color: var(--ink); text-align: center; }
.step-regen-note { font-size: 10px; color: var(--ink-3); text-align: center; }

/* Step 6 (was 5): review */
.step-review { border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; margin-bottom: 8px; }
.review-row  { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.review-row:last-child { border-bottom: none; }
.review-key  { color: var(--ink-3); }
.review-val  { font-weight: 500; color: var(--ink); text-align: right; }

/* Step action buttons */
.step-actions     { display: flex; gap: 10px; align-items: center; margin-top: 24px; }
.step-actions--end { justify-content: flex-end; }
.btn-back {
  background: none; border: 1.5px solid var(--line-soft);
  border-radius: var(--r-pill); padding: 9px 18px;
  font-size: 13px; color: var(--ink-3); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-back:hover { border-color: var(--ink-3); color: var(--ink-2); }
.btn-next {
  flex: 1; background: var(--ink); color: var(--white);
  border: none; border-radius: var(--r-pill); padding: 10px 22px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.btn-next:hover { opacity: 0.80; }
.btn-next--primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold-press));
  color: var(--on-gold); box-shadow: var(--sh-gold);
}
.btn-next--primary:hover { opacity: 0.88; }

/* ─── CHAT VIEW — horizontal split: large avatar (left) + chat card (right) ── */
.nb-view--chat {
  display: flex;
  flex-direction: row;    /* avatar panel left, chat card right */
  align-items: stretch;
  justify-content: flex-start;
  min-height: calc(100dvh - 52px);
  padding: 0;
  background: var(--bg);
}

/* ── Large Nabie avatar panel (left side) ────────────────── */
.chat-avatar-panel {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  background: linear-gradient(160deg, #fffef8 0%, rgba(243,213,142,0.14) 48%, rgba(245,238,216,0.22) 100%);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 36px;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.chat-avatar-bg-orb {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243,213,142,0.24) 0%, rgba(217,165,94,0.08) 50%, transparent 72%);
  filter: blur(44px);
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  pointer-events: none; z-index: 0;
}
.chat-avatar-orb {
  position: relative;
  width: 152px; height: 152px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #fffaef 0%, #f3d58e 30%, #dcb877 62%, #b0853a 88%, #7a5820 100%);
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.78),
    0 0 0 9px rgba(200,161,90,0.16),
    0 0 48px rgba(243,213,142,0.52),
    0 14px 44px rgba(0,0,0,0.14);
  border: 2px solid rgba(255,255,255,0.75);
  z-index: 1; flex-shrink: 0;
}
.chat-avatar-highlight {
  position: absolute; top: 11%; left: 17%;
  width: 36%; height: 28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.90) 0%, transparent 70%);
  filter: blur(2.5px); pointer-events: none;
}
.chat-avatar-name {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  z-index: 1;
}
.chat-avatar-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--gold-press); font-weight: 500;
  z-index: 1;
}
.chat-avatar-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 9px rgba(217,165,94,0.72);
}
.chat-avatar-demo {
  font-size: 9px; color: var(--ink-3); text-align: center;
  line-height: 1.5; z-index: 1;
  margin-top: 10px; max-width: 140px;
}

/* ── Chat card (right side) ──────────────────────────────── */
.chat-app {
  flex: 0 0 560px;
  min-width: 320px;
  display: flex; flex-direction: column;
  min-height: calc(100dvh - 52px);
  background: var(--white);
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-left: 1px solid var(--line-soft);
  overflow: hidden;
}
.chat-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--white); flex-shrink: 0;
}
.chat-topbar__nabie  { display: flex; align-items: center; gap: 10px; }
.chat-ta-avatar      { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-light), var(--gold)); flex-shrink: 0; }
.chat-ta-name        { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.chat-ta-sub         { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gold-press); }
.chat-online-dot     { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 7px rgba(217,165,94,0.65); }
.chat-topbar__right  { display: flex; align-items: center; gap: 10px; }
.chat-plan-badge     { font-size: 10.5px; font-weight: 700; padding: 2px 9px; background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--on-gold); border-radius: var(--r-pill); }
/* legacy settings btn — kept for backward compat; new button uses chat-menu-btn */
.chat-settings-btn   { background: rgba(217,165,94,0.10); border: 1.5px solid rgba(217,165,94,0.35); border-radius: var(--r-pill); padding: 5px 12px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--gold-press); cursor: pointer; transition: background 0.15s, border-color 0.15s; white-space: nowrap; }
.chat-settings-btn:hover { background: rgba(217,165,94,0.18); border-color: var(--gold); }
.chat-settings-tray  { border-bottom: 1px solid var(--line-soft); background: var(--bg); padding: 14px 16px 12px; flex-shrink: 0; }
.tray-item           { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.tray-item:last-of-type { border-bottom: none; }
.tray-item__label    { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.tray-item__val      { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.tray-demo-note      { font-size: 10px; color: var(--ink-3); margin-top: 8px; opacity: 0.8; }

/* ─── App-like hamburger menu button ─────────────────────── */
.chat-menu-btn {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(180deg, rgba(243,213,142,0.32), rgba(217,165,94,0.22));
  border: 1.5px solid rgba(200,161,90,0.55);
  border-radius: var(--r-pill);
  padding: 7px 16px 7px 12px;
  height: 38px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(200,161,90,0.18);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.chat-menu-btn:hover  { background: linear-gradient(180deg, rgba(243,213,142,0.50), rgba(217,165,94,0.36)); border-color: var(--gold); box-shadow: 0 2px 8px rgba(200,161,90,0.28); }
.chat-menu-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.chat-menu-lines { display: flex; flex-direction: column; gap: 3.5px; flex-shrink: 0; }
.chat-menu-lines span { display: block; width: 15px; height: 2px; background: var(--gold-press); border-radius: 1px; }
.chat-menu-label { font-size: 13px; font-weight: 700; color: var(--gold-press); letter-spacing: 0.01em; }

/* ─── Settings scrim overlay ─────────────────────────────── */
.nb-settings-scrim { position: fixed; inset: 0; background: rgba(15,10,5,0.28); backdrop-filter: blur(3px); z-index: 499; }

/* ─── Premium iOS-style chat menu tray — fixed right panel ── */
.chat-menu-tray {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 280px; max-width: 85vw;
  z-index: 500;
  background: var(--white);
  box-shadow: -4px 0 32px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.menu-tray-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}
.menu-tray-title { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.menu-tray-close {
  background: none; border: none;
  padding: 4px 6px; margin-right: -4px;
  font-size: 15px; color: var(--ink-3);
  cursor: pointer; border-radius: var(--r-sm);
  line-height: 1; transition: color 0.12s;
}
.menu-tray-close:hover { color: var(--ink); }
.menu-tray-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.menu-row {
  display: flex; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  gap: 10px; background: none; width: 100%; text-align: left;
}
.menu-row:last-of-type { border-bottom: none; }
.menu-row--action {
  border-left: none; border-right: none; border-top: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  cursor: pointer; transition: background 0.12s;
}
.menu-row--action:hover  { background: rgba(217,165,94,0.07); }
.menu-row--action:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.menu-row__body   { flex: 1; min-width: 0; }
.menu-row__label  { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.menu-row--action .menu-row__label { color: var(--gold-press); }
.menu-row__sub    { font-size: 11px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
.menu-row__chev   { font-size: 20px; color: var(--ink-3); flex-shrink: 0; line-height: 1; }
.menu-tray-demo   { padding: 8px 16px 12px; font-size: 10px; color: var(--ink-3); opacity: 0.65; text-align: center; }

/* ─── Menu back button ────────────────────────────────── */
.menu-tray-back {
  background: none; border: none; padding: 4px 0; margin-right: auto;
  font-size: 12px; font-weight: 600; color: var(--gold-press); cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  transition: opacity 0.15s;
}
.menu-tray-back:hover { opacity: 0.75; }
.menu-tray-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ─── Settings detail rows (clickable menu rows) ──────── */
.menu-row--detail {
  border: none;
  cursor: pointer; transition: background 0.12s;
}
.menu-row--detail:hover { background: rgba(217,165,94,0.05); }
.menu-row--detail:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* ─── Settings detail panels ──────────────────────────── */
.menu-detail-panel {
  padding: 8px 16px 4px;
  display: flex; flex-direction: column;
}
.menu-detail-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 9px 0; gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.menu-detail-item:last-of-type { border-bottom: none; }
.menu-detail-key {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3); flex-shrink: 0;
  padding-top: 1px;
}
.menu-detail-val {
  font-size: 12.5px; color: var(--ink-2); text-align: right; line-height: 1.4;
}
.menu-detail-note {
  font-size: 10.5px; color: var(--ink-3); line-height: 1.5;
  padding: 10px 0 4px; opacity: 0.8;
}
/* ─── Chat body layout ───────────────────────────────────── */
.chat-body-wrap { flex: 1; display: flex; overflow: hidden; }
.chat-portrait-rail {
  width: 80px; flex-shrink: 0;
  background: rgba(245,238,216,0.18);
  border-right: 1px solid var(--line-soft);
  padding: 20px 8px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.chat-portrait-orb {
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #fffaef, #f3d58e 36%, #dcb877 64%, #b0853a 100%);
  box-shadow: 0 0 0 1px rgba(200,161,90,0.35), 0 0 22px rgba(243,213,142,0.50);
  border: 1.5px solid rgba(255,255,255,0.65);
}
.chat-portrait-name { font-size: 11px; font-weight: 600; color: var(--ink); text-align: center; }
.chat-portrait-status { font-size: 9.5px; color: var(--gold-press); text-align: center; }
.chat-portrait-demo { font-size: 8px; color: var(--ink-3); text-align: center; line-height: 1.3; margin-top: auto; }
.chat-main-col { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.chat-messages       { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 6px; }
.chat-time-label     { text-align: center; font-size: 10.5px; color: var(--ink-3); margin-bottom: 4px; }
.chat-bubble         { max-width: 76%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.chat-bubble--ai     { background: rgba(240,240,245,0.9); border: 1px solid rgba(0,0,0,0.05); color: var(--ink); align-self: flex-start; border-radius: 4px 16px 16px 16px; }
.chat-bubble--user   { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--on-gold); align-self: flex-end; border-radius: 16px 4px 16px 16px; box-shadow: 0 2px 8px rgba(217,165,94,0.28); }
.chat-mem-hint       { align-self: center; font-size: 11px; color: var(--ink-3); background: rgba(0,0,0,0.04); border-radius: var(--r-pill); padding: 4px 12px; margin-top: 2px; }
.chat-usage-bar      { display: flex; justify-content: space-between; align-items: center; padding: 5px 16px; background: rgba(217,165,94,0.07); border-top: 1px solid rgba(217,165,94,0.15); font-size: 11px; color: var(--ink-2); flex-shrink: 0; }
.chat-usage-flag     { font-size: 10px; color: var(--ink-3); }
.chat-input-bar      { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-soft); background: var(--white); flex-shrink: 0; }
.chat-input-field    { flex: 1; padding: 9px 14px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--r-pill); font-size: 14px; color: var(--ink-3); cursor: default; }
.chat-send-btn       { background: rgba(0,0,0,0.06); border: none; border-radius: var(--r-pill); padding: 9px 18px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: not-allowed; }
.chat-footer-note    { text-align: center; font-size: 10px; color: var(--ink-3); padding: 7px 14px 10px; border-top: 1px solid var(--line-soft); line-height: 1.5; flex-shrink: 0; }

/* ─── AGE GATE MODAL ─────────────────────────────────────── */
.nb-gate-overlay {
  position: fixed; inset: 0;
  background: rgba(8,6,3,0.66);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
/* [hidden] rule at top hides .nb-gate-overlay[hidden] */

.nb-gate-sheet    { background: var(--white); border-radius: 24px; padding: 36px 32px 28px; max-width: 380px; width: 100%; box-shadow: 0 32px 80px rgba(0,0,0,0.30); text-align: center; }
.nb-gate-orb      { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff6e4, #f4ce8c 40%, #d9a55e 70%, #a56f32); box-shadow: 0 0 0 1px rgba(255,255,255,0.5) inset, 0 4px 16px rgba(217,165,94,0.42); margin: 0 auto 16px; }
.nb-gate-eyebrow  { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-press); margin-bottom: 8px; }
.nb-gate-title    { font-family: var(--font-serif); font-size: 22px; font-weight: 400; color: var(--ink); line-height: 1.35; margin-bottom: 8px; }
.nb-gate-sub      { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.nb-gate-disclaimer { background: var(--bg); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 20px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.nb-gate-disc-row   { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.nb-gate-disc-dot   { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: 4px; }
.nb-gate-actions    { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.btn-gate-confirm   { background: linear-gradient(180deg, var(--gold-2), var(--gold-press)); color: var(--on-gold); border: none; border-radius: var(--r-pill); padding: 12px 24px; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: var(--sh-gold); transition: opacity 0.15s; }
.btn-gate-confirm:hover { opacity: 0.88; }
.btn-gate-back      { background: none; border: 1.5px solid var(--line-soft); border-radius: var(--r-pill); padding: 10px 24px; font-size: 13px; color: var(--ink-3); cursor: pointer; transition: border-color 0.15s; }
.btn-gate-back:hover { border-color: var(--ink-3); }
.nb-gate-foot       { font-size: 10.5px; color: var(--ink-3); line-height: 1.4; }

/* ─── Utilities ──────────────────────────────────────────── */
body.nb-gate-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-start, .vibe-card, .step-chip, .outfit-opt { transition: none; }
}

/* ── Chat avatar panel: collapse on narrow viewports ──── */
@media (max-width: 900px) {
  /* Chat layout collapses to single column */
  .nb-view--chat {
    flex-direction: column;
    align-items: center;
    padding: 12px;
  }
  .chat-avatar-panel { display: none; }
  .chat-app {
    flex: 0 0 auto;
    width: 100%; max-width: 560px;
    min-height: calc(100dvh - 80px);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-2);
    border: 1px solid var(--line-soft);
  }

  /* Hero 2-column → single column on tablet/mobile */
  .hero-v3 {
    grid-template-columns: 1fr;
    padding: 32px 24px 40px;
    gap: 32px;
    min-height: auto;
  }
  .hero-v3__copy {
    align-items: center;
    text-align: center;
  }
  .hero-v3__copy .hero-title,
  .hero-v3__copy .hero-sub,
  .hero-v3__copy .hero-note { text-align: center; }
  .hero-v3__copy .hero-v3__eyebrow { align-self: center; }
  .hero-v3__copy .hero-v3__desc { text-align: center; max-width: 100%; }
  .hero-v3__stage {
    height: 400px;
    perspective: 1400px;
  }
  .nb-phone-wrap {
    transform: rotateY(-8deg) rotateX(3deg) rotate(-0.5deg) scale(0.52);
  }
  .hero-v3__aura { width: 300px; height: 340px; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 50px; }
  .step-frame { padding: 22px 16px 28px; border-radius: var(--r-md); }
  .vibe-grid  { gap: 8px; }
  .bfly-wing--left  { left: calc(50% - 210px); width: 220px; }
  .bfly-wing--right { right: calc(50% - 210px); width: 220px; }
  .hero-v3__stage { height: 320px; }
  .nb-phone-wrap { transform: rotateY(-5deg) rotateX(2deg) scale(0.42); }
}
@media (max-width: 400px) {
  .vibe-grid { grid-template-columns: 1fr; }
  .nb-gate-sheet { padding: 28px 18px 20px; }
}

/* Company information footer — Apple Developer organization verification (visible to reviewers). */
.nb-legal-footer {
  width: 100%;
  padding: 28px 24px 22px;
  text-align: center;
  color: rgba(26, 26, 26, 0.42);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

.nb-legal-footer span {
  display: inline-block;
  margin: 0 7px;
}

.nb-legal-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  .nb-legal-footer {
    padding: 22px 18px 18px;
    font-size: 10.5px;
  }

  .nb-legal-footer span {
    display: block;
    margin: 2px 0;
  }
}
