/* ============================================================
   B2C Flipbook Creator — app.css
   Design System: Warm Gold + Near-Black + Warm White
   Mobile-first, fluid typography, glassmorphism
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Brand — PicPick Flipbook */
  --color-brand:         #6366f1;
  --color-brand-light:   #818cf8;
  --color-brand-dark:    #4f46e5;
  --color-brand-muted:   rgba(99, 102, 241, 0.12);

  /* Color Palette */
  --color-primary:       #0f172a;
  --color-accent:        var(--color-brand);
  --color-accent-light:  var(--color-brand-light);
  --color-accent-dark:   var(--color-brand-dark);
  --color-bg:            #ffffff;
  --color-surface:       #ffffff;
  --color-border:        #e2e8f0;
  --color-text:          #0f172a;
  --color-muted:         #64748b;
  --color-page:          #f8fafc;
  --color-surface-elevated: #fafbfc;
  --color-tabs-bg:       #f1f5f9;
  --color-input-bg:      #fafbfc;
  --color-chrome:        rgba(255, 255, 255, 0.98);
  --skeleton-from:       #eeece8;
  --skeleton-mid:        #e4e2dd;
  --overlay-bg:          rgba(250, 250, 248, 0.85);
  --theme-color:         #ffffff;
  --color-error:         #DC2626;
  --color-success:       #16A34A;
  --color-warning:       #D97706;
  --color-info:          #2563EB;

  /* Gradients */
  --gradient-brand:      linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #4f46e5 100%);
  --gradient-gold:       var(--gradient-brand);
  --gradient-dark:       linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-hero:       radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.14) 0%, transparent 60%),
                         radial-gradient(ellipse at 80% 20%, rgba(99,102,241,0.08) 0%, transparent 50%),
                         radial-gradient(ellipse at 50% 100%, rgba(15,23,42,0.04) 0%, transparent 70%);
  --gradient-mesh:       radial-gradient(at 40% 20%, rgba(99,102,241,0.12) 0px, transparent 50%),
                         radial-gradient(at 80% 0%,  rgba(99,102,241,0.08) 0px, transparent 50%),
                         radial-gradient(at 0%  50%, rgba(99,102,241,0.06) 0px, transparent 50%),
                         radial-gradient(at 80% 50%, rgba(99,102,241,0.05) 0px, transparent 50%),
                         radial-gradient(at 0%  100%, rgba(99,102,241,0.10) 0px, transparent 50%);

  /* Typography */
  --font-body:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:   'Plus Jakarta Sans', 'Inter', sans-serif;

  /* Fluid Font Scale */
  --text-xs:    clamp(0.6875rem, 1.5vw, 0.75rem);
  --text-sm:    clamp(0.8125rem, 2vw,   0.875rem);
  --text-base:  clamp(0.9375rem, 2.5vw, 1rem);
  --text-lg:    clamp(1.0625rem, 3vw,   1.125rem);
  --text-xl:    clamp(1.125rem,  3.5vw, 1.25rem);
  --text-2xl:   clamp(1.25rem,   4vw,   1.5rem);
  --text-3xl:   clamp(1.5rem,    5vw,   1.875rem);
  --text-4xl:   clamp(1.875rem,  6vw,   2.25rem);
  --text-5xl:   clamp(2.25rem,   7vw,   3rem);
  --text-6xl:   clamp(2.75rem,   8vw,   3.75rem);
  --text-7xl:   clamp(3rem,      9vw,   4.5rem);

  /* Border Radius */
  --radius-sm:  0.5rem;
  --radius-md:  1rem;
  --radius-lg:  1.5rem;
  --radius-xl:  2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(10,10,10,0.06), 0 1px 2px rgba(10,10,10,0.04);
  --shadow-md:   0 4px 16px rgba(10,10,10,0.08), 0 2px 6px rgba(10,10,10,0.05);
  --shadow-lg:   0 10px 40px rgba(10,10,10,0.10), 0 4px 12px rgba(10,10,10,0.06);
  --shadow-xl:   0 20px 60px rgba(10,10,10,0.14), 0 8px 24px rgba(10,10,10,0.08);
  --shadow-2xl:  0 40px 80px rgba(10,10,10,0.18), 0 16px 40px rgba(10,10,10,0.10);
  --shadow-gold: 0 8px 32px rgba(99,102,241,0.28), 0 2px 8px rgba(99,102,241,0.12);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.18);

  /* Spacing */
  --spacing-xs:  0.25rem;
  --spacing-sm:  0.5rem;
  --spacing-md:  1rem;
  --spacing-lg:  1.5rem;
  --spacing-xl:  2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Transitions */
  --ease-out:    cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   400ms;
  --duration-xslow:  600ms;

  /* Glassmorphism */
  --glass-bg:      rgba(255, 255, 255, 0.72);
  --glass-border:  rgba(255, 255, 255, 0.50);
  --glass-blur:    16px;
  --glass-dark-bg: rgba(10, 10, 10, 0.70);

  /* Navbar */
  --navbar-height: 64px;
  --nav-offset: calc(var(--navbar-height) + env(safe-area-inset-top, 0px));

  /* Z-index Scale */
  --z-below:   -1;
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-navbar:   250;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;
}

[data-theme="dark"] {
  --color-bg:            #000000;
  --color-page:          #000000;
  --color-surface:       #0b0c10;
  --color-surface-elevated: #111827;
  --color-border:        #1e293b;
  --color-text:          #e2e8f0;
  --color-muted:         #94a3b8;
  --color-primary:       #f8fafc;
  --color-tabs-bg:       #0f172a;
  --color-input-bg:      #0c1222;
  --color-chrome:        rgba(12, 18, 34, 0.92);
  --color-brand-muted:   rgba(99, 102, 241, 0.22);
  --skeleton-from:       #111827;
  --skeleton-mid:        #1e293b;
  --overlay-bg:          rgba(3, 7, 18, 0.88);
  --theme-color:         #030712;
  --aurora-1:            rgba(99, 102, 241, 0.42);
  --aurora-2:            rgba(168, 85, 247, 0.28);
  --aurora-3:            rgba(20, 184, 166, 0.22);
  --aurora-4:            rgba(236, 72, 153, 0.16);
  --gradient-hero:       radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.22) 0%, transparent 60%),
                         radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.14) 0%, transparent 50%),
                         radial-gradient(ellipse at 50% 100%, rgba(20,184,166,0.10) 0%, transparent 70%);
  --gradient-mesh:       radial-gradient(at 40% 20%, rgba(99,102,241,0.18) 0px, transparent 50%),
                         radial-gradient(at 80% 0%,  rgba(168,85,247,0.12) 0px, transparent 50%),
                         radial-gradient(at 0%  50%, rgba(20,184,166,0.08) 0px, transparent 50%),
                         radial-gradient(at 80% 50%, rgba(236,72,153,0.06) 0px, transparent 50%),
                         radial-gradient(at 0%  100%, rgba(99,102,241,0.14) 0px, transparent 50%);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.32), 0 1px 2px rgba(0,0,0,0.22);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.36), 0 2px 6px rgba(0,0,0,0.24);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.40), 0 4px 12px rgba(0,0,0,0.26);
  --shadow-xl:   0 20px 60px rgba(0,0,0,0.44), 0 8px 24px rgba(0,0,0,0.28);
  --glass-bg:      rgba(12, 18, 34, 0.88);
  --glass-border:  rgba(148, 163, 184, 0.14);
  --glass-dark-bg: rgba(3, 7, 18, 0.82);
}

/* Canva-style aurora backdrop (pitch dark) */
html[data-theme="dark"] body {
  background-color: var(--color-bg);
}

html[data-theme="dark"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--color-bg);
  pointer-events: none;
}

html[data-theme="dark"] body::after {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 12% 8%, var(--aurora-1), transparent 58%),
    radial-gradient(ellipse 50% 42% at 88% 12%, var(--aurora-2), transparent 55%),
    radial-gradient(ellipse 48% 38% at 52% 92%, var(--aurora-3), transparent 52%),
    radial-gradient(ellipse 38% 32% at 6% 62%, var(--aurora-4), transparent 50%);
  filter: blur(48px);
  opacity: 0.9;
  animation: auroraDrift 24s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate(1.5%, -2%) scale(1.03) rotate(0.5deg); }
  100% { transform: translate(-1%, 1.5%) scale(0.98) rotate(-0.5deg); }
}

/* ============================================================
   2. BASE RESETS
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  /* Safe area support */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-primary);
  font-weight: 700;
}

p {
  line-height: 1.7;
  color: var(--color-muted);
}

/* ============================================================
   3. TYPOGRAPHY SCALE
   ============================================================ */
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }
.text-5xl  { font-size: var(--text-5xl); }
.text-6xl  { font-size: var(--text-6xl); }
.text-7xl  { font-size: var(--text-7xl); }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-black    { font-weight: 900; }

.text-primary  { color: var(--color-primary); }
.text-accent   { color: var(--color-accent); }
.text-muted    { color: var(--color-muted); }
.text-surface  { color: var(--color-surface); }

.leading-tight  { line-height: 1.2; }
.leading-snug   { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed{ line-height: 1.7; }

.tracking-tight    { letter-spacing: -0.025em; }
.tracking-normal   { letter-spacing: 0; }
.tracking-wide     { letter-spacing: 0.025em; }
.tracking-wider    { letter-spacing: 0.05em; }
.tracking-widest   { letter-spacing: 0.1em; }

/* ============================================================
   4. BUTTON COMPONENTS
   ============================================================ */

/* Base Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Primary Button */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #1A1A1A;
  border-color: #1A1A1A;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Secondary Button */
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-bg);
  border-color: #C8C4BC;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-surface);
  transform: translateY(-1px);
}

.btn-outline:active {
  transform: translateY(0);
}

/* Gold Accent Button */
.btn-gold {
  background: var(--gradient-gold);
  color: var(--color-surface);
  border-color: transparent;
  box-shadow: var(--shadow-gold);
  font-weight: 700;
}

.btn-gold:hover {
  box-shadow: 0 12px 40px rgba(99,102,241,0.40), 0 4px 12px rgba(99,102,241,0.20);
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-gold:active {
  transform: translateY(0);
  box-shadow: var(--shadow-gold);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--color-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(10,10,10,0.05);
  color: var(--color-text);
}

/* Size Variants */
.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: var(--text-xs);
  border-radius: 0.625rem;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn-xl {
  padding: 1.125rem 2.5rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn-icon {
  padding: 0.625rem;
  aspect-ratio: 1;
}

.btn-icon-sm {
  padding: 0.375rem;
  aspect-ratio: 1;
}

/* ============================================================
   5. CARD COMPONENTS
   ============================================================ */

/* Base Card */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-base) var(--ease-out);
}

/* Glass Card */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* Hover Card */
.card-hover {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-slow) var(--ease-out);
  cursor: pointer;
  will-change: transform, box-shadow;
}

.card-hover:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: rgba(99,102,241,0.3);
}

/* Large Feature Card */
.card-xl {
  border-radius: var(--radius-xl);
  padding: 2rem;
}

/* Dark Card */
.card-dark {
  background: var(--color-primary);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: var(--color-surface);
}

/* ============================================================
   6. FORM COMPONENTS
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.form-label svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.form-label.required::after {
  content: ' *';
  color: var(--color-error);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.form-error-msg {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Base Input Styles */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  transition: all var(--duration-base) var(--ease-out);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-muted);
  opacity: 0.7;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: #C8C4BC;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  background: var(--color-surface);
}

.form-input.error,
.form-textarea.error,
.form-select.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ============================================================
   7. TOGGLE SWITCH COMPONENT
   ============================================================ */

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 0.75rem;
  user-select: none;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--duration-base) var(--ease-out);
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--color-surface);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.20);
  transition: transform var(--duration-base) var(--ease-spring);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--color-brand);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(1.25rem);
}

/* Wizard feature toggles use .toggle-thumb — not ::after */
.feature-toggle-card .toggle-track::after {
  display: none;
  content: none;
}

.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.toggle-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

/* ============================================================
   8. FEATURE TOGGLE CARD (Dashboard card with toggle)
   ============================================================ */

.feature-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all var(--duration-base) var(--ease-out);
}

.feature-card:hover {
  border-color: rgba(99,102,241,0.3);
  box-shadow: var(--shadow-sm);
}

.feature-card.is-active {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.04);
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(99,102,241,0.10);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  color: var(--color-accent);
  transition: all var(--duration-base) var(--ease-out);
}

.feature-card.is-active .feature-card__icon {
  background: rgba(99,102,241,0.20);
}

.feature-card__body {
  flex: 1;
  min-width: 0;
}

.feature-card__title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.125rem;
}

.feature-card__desc {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.5;
}

.feature-card__control {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ============================================================
   9. STEP WIZARD
   ============================================================ */

.wizard {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Step Indicator Bar */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.step-indicator::-webkit-scrollbar {
  display: none;
}

.step-indicator__item {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.step-indicator__circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-muted);
  flex-shrink: 0;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
  z-index: 1;
}

.step-indicator__line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  transition: background var(--duration-slow) var(--ease-out);
}

.step-indicator__item.is-active .step-indicator__circle {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: white;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
}

.step-indicator__item.is-complete .step-indicator__circle {
  border-color: var(--color-success);
  background: var(--color-success);
  color: white;
}

.step-indicator__item.is-complete .step-indicator__line {
  background: var(--color-success);
}

.step-indicator__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  margin-top: 0.375rem;
  white-space: nowrap;
  transition: color var(--duration-base) var(--ease-out);
}

.step-indicator__item.is-active .step-indicator__label {
  color: var(--color-accent);
}

.step-indicator__item.is-complete .step-indicator__label {
  color: var(--color-success);
}

/* Step Content Panel */
.step-content {
  display: none;
  animation: fadeIn var(--duration-base) var(--ease-out);
}

.step-content.is-active {
  display: block;
}

/* Legacy step transitions (album wizard uses .wizard-step.active below) */
.wizard-step.step-exit {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

/* ============================================================
   10. COVER UPLOAD AREA (9:16 Portrait)
   ============================================================ */

.cover-upload-container {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.cover-upload-area {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-out);
  text-align: center;
  padding: 1.5rem;
}

.cover-upload-area:hover,
.cover-upload-area.drag-over {
  border-color: var(--color-accent);
  background: rgba(99,102,241,0.04);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.10);
}

.cover-upload-area.has-image {
  border-style: solid;
  border-color: rgba(99,102,241,0.4);
  padding: 0;
}

.cover-upload-area .upload-icon {
  width: 3rem;
  height: 3rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
  opacity: 0.5;
  transition: all var(--duration-base) var(--ease-out);
}

.cover-upload-area:hover .upload-icon {
  color: var(--color-accent);
  opacity: 1;
  transform: translateY(-3px);
}

.cover-upload-area .upload-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.cover-upload-area .upload-hint {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.cover-upload-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
}

.cover-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
  border-radius: calc(var(--radius-lg) - 2px);
  gap: 0.75rem;
}

.cover-upload-area.has-image:hover .cover-upload-overlay {
  opacity: 1;
}

/* 9:16 Ratio Badge */
.ratio-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent-dark);
  letter-spacing: 0.02em;
  margin-top: 0.75rem;
}

/* ============================================================
   11. LOADING SKELETON & SHIMMER
   ============================================================ */

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--skeleton-from) 25%,
    var(--skeleton-mid) 50%,
    var(--skeleton-from) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1em;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-title {
  height: 1.5em;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.skeleton-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-image {
  width: 100%;
  border-radius: var(--radius-md);
}

.skeleton-btn {
  height: 2.5rem;
  border-radius: var(--radius-md);
  width: 100%;
}

/* Card Skeleton */
.skeleton-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow: hidden;
}

/* ============================================================
   12. TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: 400px;
  width: calc(100vw - 3rem);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  pointer-events: all;
  cursor: pointer;
  animation: slideInFromRight var(--duration-slow) var(--ease-out) forwards;
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
  overflow: hidden;
  position: relative;
  will-change: transform, opacity;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.toast.success::before { background: var(--color-success); }
.toast.error::before   { background: var(--color-error); }
.toast.warning::before { background: var(--color-warning); }
.toast.info::before    { background: var(--color-info); }
.toast.gold::before    { background: var(--color-accent); }

.toast.removing {
  animation: slideOutRight var(--duration-base) var(--ease-in) forwards;
}

.toast__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.0625rem;
}

.toast.success .toast__icon { color: var(--color-success); }
.toast.error   .toast__icon { color: var(--color-error); }
.toast.warning .toast__icon { color: var(--color-warning); }
.toast.info    .toast__icon { color: var(--color-info); }
.toast.gold    .toast__icon { color: var(--color-accent); }

.toast__body {
  flex: 1;
  min-width: 0;
}

.toast__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 0.125rem;
  font-family: var(--font-body);
}

.toast__message {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.5;
}

.toast__close {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  opacity: 0.6;
  transition: opacity var(--duration-fast) var(--ease-out);
  margin-top: -0.125rem;
}

.toast__close:hover {
  opacity: 1;
}

/* ============================================================
   13. PROFILE POPOVER
   ============================================================ */

.popover-trigger {
  position: relative;
}

/* Allow popover to extend below the fixed-height navbar */
.navbar,
.navbar__inner,
.navbar__nav,
.popover-trigger {
  overflow: visible;
}

.profile-popover {
  /* Fixed + JS top/right — escapes navbar height clipping */
  position: fixed;
  width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-overlay);
  display: block;
  height: auto;
  max-height: calc(100vh - var(--navbar-height) - 2rem);
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-spring),
              visibility var(--duration-base) var(--ease-out);
  transform-origin: top right;
}

.profile-popover.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-popover__header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--color-border);
}

.profile-popover__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(99,102,241,0.30);
  flex-shrink: 0;
}

.profile-popover__avatar-placeholder {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  border: 2px solid rgba(99,102,241,0.30);
}

.profile-popover__name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.profile-popover__email {
  font-size: var(--text-xs);
  color: var(--color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.profile-popover__menu {
  padding: 0.5rem;
}

.profile-popover__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.profile-popover__item:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.profile-popover__item svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: var(--color-muted);
}

.profile-popover__item:hover svg {
  color: var(--color-accent);
}

.profile-popover__separator {
  height: 1px;
  background: var(--color-border);
  margin: 0.375rem 0;
}

.profile-popover__item.danger {
  color: var(--color-error);
}

.profile-popover__item.danger:hover {
  background: rgba(220,38,38,0.06);
  color: var(--color-error);
}

.profile-popover__item.danger svg {
  color: var(--color-error);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.theme-toggle-btn:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.15);
}

.theme-popover {
  width: 220px;
}

.theme-popover__item.is-active {
  color: var(--color-accent);
  background: var(--color-brand-muted);
}

.theme-popover__item.is-active svg {
  color: var(--color-accent);
}

/* ============================================================
   14. PAGE TRANSITIONS
   ============================================================ */

.page-enter {
  opacity: 0;
  transform: translateY(12px);
}

.page-enter.page-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.page-exit {
  opacity: 1;
  transform: translateY(0);
}

.page-exit.page-active {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--duration-base) var(--ease-in),
              transform var(--duration-base) var(--ease-in);
}

/* Slide variants for PAJAX navigation */
.slide-in-right {
  animation: slideInFromRight var(--duration-slow) var(--ease-out) forwards;
}

.slide-in-left {
  animation: slideInFromLeft var(--duration-slow) var(--ease-out) forwards;
}

.slide-out-left {
  animation: slideOutLeft var(--duration-base) var(--ease-in) forwards;
}

.slide-out-right {
  animation: slideOutRight var(--duration-base) var(--ease-in) forwards;
}

/* ============================================================
   15. SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay variants */
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }
.reveal-delay-6 { transition-delay: 600ms; }

/* Directional reveal variants */
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal-left.reveal-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal-right.reveal-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-spring);
}

.reveal-scale.reveal-visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================================
   16. SPINNER / LOADER
   ============================================================ */

.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(99,102,241,0.25);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: 1.5px;
}

.spinner-lg {
  width: 2rem;
  height: 2rem;
  border-width: 3px;
}

.spinner-dark {
  border-color: rgba(255,255,255,0.2);
  border-top-color: white;
}

.spinner-primary {
  border-color: rgba(10,10,10,0.15);
  border-top-color: var(--color-primary);
}

/* Page Loading Overlay */
.page-loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
  pointer-events: none;
}

.page-loading-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

.page-loading-logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

.page-loading-logo span {
  color: var(--color-accent);
}

/* Dot Loader */
.dot-loader {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

.dot-loader__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 1.4s ease-in-out infinite;
}

.dot-loader__dot:nth-child(2) { animation-delay: 0.2s; }
.dot-loader__dot:nth-child(3) { animation-delay: 0.4s; }

/* ============================================================
   17. NAVBAR (Sticky, Glass)
   ============================================================ */

.navbar,
#app-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  z-index: var(--z-navbar);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: var(--color-bg);
  isolation: isolate;
  transition: background var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              backdrop-filter var(--duration-base) var(--ease-out);
}

.navbar.is-scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.navbar.is-transparent {
  background: transparent;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.navbar__logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.navbar__logo span {
  color: var(--color-accent);
}

.navbar__logo:hover {
  color: var(--color-accent-dark);
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Profile Avatar Button */
.profile-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.625rem 0.375rem 0.375rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.profile-avatar-btn:hover {
  border-color: rgba(99,102,241,0.40);
  box-shadow: 0 2px 12px rgba(99,102,241,0.15);
}

.profile-avatar-btn__img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-btn__initials {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.profile-avatar-btn__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Safe area for notches */
.navbar {
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
  padding-top: env(safe-area-inset-top);
  height: calc(var(--navbar-height) + env(safe-area-inset-top));
}

/* App shell — single nav offset on page wrappers, not on #app-root */
#app-root {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-top: 0;
}

/* ============================================================
   18. HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg);
}

.hero__bg-mesh {
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
}

.hero__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(99,102,241,0.10);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-7xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.hero__title .accent {
  color: var(--color-accent);
  font-style: italic;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Floating hero visual */
.hero__visual {
  position: relative;
}

.hero__mockup-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}

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

/* ============================================================
   19. ALBUM CARD
   ============================================================ */

.album-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-out);
  cursor: pointer;
  position: relative;
  will-change: transform, box-shadow;
}

.album-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99,102,241,0.25);
}

.album-card__cover {
  position: relative;
  aspect-ratio: 9 / 14;
  background: var(--color-bg);
  overflow: hidden;
}

.album-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-xslow) var(--ease-out);
}

.album-card:hover .album-card__cover img {
  transform: scale(1.04);
}

.album-card__cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #F0EDE6 0%, #E8E4DC 100%);
  color: var(--color-muted);
}

.album-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.album-card:hover .album-card__overlay {
  opacity: 1;
}

.album-card__quick-actions {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.5rem;
  transform: translateY(8px);
  opacity: 0;
  transition: all var(--duration-base) var(--ease-out);
}

.album-card:hover .album-card__quick-actions {
  transform: translateY(0);
  opacity: 1;
}

.album-card__status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.album-card__status.published {
  background: rgba(22,163,74,0.90);
  color: white;
  backdrop-filter: blur(8px);
}

.album-card__status.draft {
  background: rgba(10,10,10,0.75);
  color: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
}

.album-card__body {
  padding: 1rem 1.125rem 1.25rem;
}

.album-card__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card__meta {
  font-size: var(--text-xs);
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ============================================================
   20. TRUST BADGES
   ============================================================ */

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-weight: 500;
}

.trust-badge__icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* Social Proof Count */
.social-proof {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.social-proof__avatars {
  display: flex;
  margin-right: 0.25rem;
}

.social-proof__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  object-fit: cover;
  margin-left: -0.5rem;
}

.social-proof__avatar:first-child {
  margin-left: 0;
}

.social-proof__text {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.social-proof__count {
  font-weight: 700;
  color: var(--color-text);
}

/* ============================================================
   21. PAYMENT / PRICING CARD
   ============================================================ */

.pricing-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  transition: all var(--duration-slow) var(--ease-out);
}

.pricing-card.is-featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-gold);
  background: linear-gradient(135deg, rgba(99,102,241,0.04) 0%, var(--color-surface) 100%);
}

.pricing-card__badge {
  position: absolute;
  top: -0.875rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-gold);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold);
  white-space: nowrap;
}

.pricing-card__plan {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.pricing-card__price {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-card__price sup {
  font-size: var(--text-xl);
  vertical-align: super;
  line-height: 1;
  font-weight: 600;
}

.pricing-card__period {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.pricing-card__features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.pricing-card__feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.pricing-card__feature-check {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: rgba(22,163,74,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-success);
}

/* ============================================================
   22. UPLOAD DROPZONE
   ============================================================ */

.dropzone {
  position: relative;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  background: var(--color-bg);
}

.dropzone:hover,
.dropzone.drag-active {
  border-color: var(--color-accent);
  background: rgba(99,102,241,0.04);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
}

.dropzone.drag-active {
  transform: scale(1.01);
}

.dropzone.uploading {
  pointer-events: none;
  opacity: 0.7;
}

.dropzone__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  color: var(--color-muted);
  opacity: 0.5;
  transition: all var(--duration-base) var(--ease-out);
}

.dropzone:hover .dropzone__icon,
.dropzone.drag-active .dropzone__icon {
  color: var(--color-accent);
  opacity: 1;
  transform: translateY(-4px);
}

.dropzone__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
  font-family: var(--font-body);
}

.dropzone__subtitle {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.dropzone__types {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-xs);
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* Upload Progress */
.upload-progress {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.upload-progress__bar-track {
  width: 100%;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.upload-progress__bar-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  transition: width var(--duration-base) var(--ease-out);
}

.upload-progress__label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: right;
}

/* ============================================================
   23. MODAL / OVERLAY
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  width: 100%;
  max-width: 540px;
  max-height: calc(100svh - 3rem);
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: all var(--duration-slow) var(--ease-out);
  position: relative;
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 1.25rem;
}

.modal__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
}

.modal__close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  transition: all var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}

.modal__close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.modal__body {
  padding: 0 1.5rem;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--color-border);
  margin-top: 1.25rem;
}

/* ============================================================
   24. CUSTOM SCROLLBAR
   ============================================================ */

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #C8C4BC;
}

/* Hide scrollbar entirely */
.scrollbar-hidden {
  scrollbar-width: none;
}

.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   25. DARK GRADIENT OVERLAYS
   ============================================================ */

.overlay-bottom {
  background: linear-gradient(to top, rgba(10,10,10,0.85) 0%, transparent 100%);
}

.overlay-top {
  background: linear-gradient(to bottom, rgba(10,10,10,0.85) 0%, transparent 100%);
}

.overlay-left {
  background: linear-gradient(to right, rgba(10,10,10,0.85) 0%, transparent 100%);
}

.overlay-right {
  background: linear-gradient(to left, rgba(10,10,10,0.85) 0%, transparent 100%);
}

.overlay-full {
  background: rgba(10,10,10,0.60);
}

.overlay-gold-subtle {
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, transparent 60%);
}

/* Section background separators */
.section-dark {
  background: var(--color-primary);
  color: var(--color-surface);
}

.section-gold {
  background: var(--gradient-gold);
  color: var(--color-surface);
}

.section-surface {
  background: var(--color-surface);
}

/* ============================================================
   26. KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-30px); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(30px); }
}

@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position: 800px 0; }
}

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

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

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { transform: scale(1.05); }
  70%  { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes goldShine {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes breathe {
  0%, 100% { box-shadow: var(--shadow-gold); }
  50%       { box-shadow: 0 0 50px rgba(99,102,241,0.35), 0 8px 32px rgba(99,102,241,0.25); }
}

/* Animation utility classes */
.animate-fadeIn          { animation: fadeIn          var(--duration-slow) var(--ease-out) both; }
.animate-slideUp         { animation: slideUp         var(--duration-slow) var(--ease-out) both; }
.animate-slideDown       { animation: slideDown       var(--duration-slow) var(--ease-out) both; }
.animate-slideInRight    { animation: slideInFromRight var(--duration-slow) var(--ease-out) both; }
.animate-slideInLeft     { animation: slideInFromLeft  var(--duration-slow) var(--ease-out) both; }
.animate-bounceIn        { animation: bounceIn        var(--duration-slow) var(--ease-spring) both; }
.animate-scaleIn         { animation: scaleIn         var(--duration-slow) var(--ease-spring) both; }
.animate-spin            { animation: spin 0.7s linear infinite; }
.animate-pulse           { animation: pulse 2s ease-in-out infinite; }
.animate-breathe         { animation: breathe 3s ease-in-out infinite; }

/* ============================================================
   27. SECTION & LAYOUT UTILITIES
   ============================================================ */

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-md {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Grid layouts */
.grid-albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 1.25rem;
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1rem;
}

/* Dividers */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 1.5rem 0;
}

.divider-gold {
  height: 2px;
  background: var(--gradient-gold);
  border-radius: 2px;
}

/* ============================================================
   28. AURA / GLOW DECORATORS
   ============================================================ */

.aura-gold {
  position: relative;
}

.aura-gold::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  right: -20%;
  bottom: -20%;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.accent-line {
  display: inline-block;
  width: 2.5rem;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 3px;
  margin-bottom: 1rem;
}

/* ============================================================
   29. MOBILE-SPECIFIC OVERRIDES
   ============================================================ */

@media (max-width: 768px) {
  .navbar__logo {
    font-size: var(--text-xl);
  }

  .profile-avatar-btn__name {
    display: none;
  }

  .hero__title {
    font-size: clamp(2rem, 10vw, 3rem);
    letter-spacing: -0.03em;
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .step-indicator__label {
    display: none;
  }

  .cover-upload-container {
    max-width: 220px;
  }

  .modal {
    max-height: calc(100svh - 1.5rem);
    margin: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .toast-container {
    bottom: calc(1rem + env(safe-area-inset-bottom));
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-width: 100%;
  }

  .card-glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .profile-popover {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 85vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform-origin: bottom center;
    transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .profile-popover.is-open {
    transform: translateY(0);
  }

  .album-card__quick-actions {
    opacity: 1;
    transform: translateY(0);
  }

  .grid-albums {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .trust-badges {
    gap: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding: clamp(2rem, 6vw, 4rem) 0;
  }

  .btn-xl {
    padding: 0.875rem 1.75rem;
  }
}

/* Extra small phones */
@media (max-width: 380px) {
  :root {
    --navbar-height: 56px;
  }

  .grid-albums {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .album-card__body {
    padding: 0.75rem;
  }

  .album-card__title {
    font-size: var(--text-xs);
  }
}

/* ============================================================
   30. SAFE AREA INSETS (Notched Phones)
   ============================================================ */

@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-safe {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .pb-safe {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

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

/* ============================================================
   31. UTILITY CLASSES
   ============================================================ */

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pointer-events-none { pointer-events: none; }
.pointer-events-all  { pointer-events: all; }

.select-none { user-select: none; }

.will-change-transform { will-change: transform; }

.gpu { transform: translateZ(0); }

.aspect-cover {
  aspect-ratio: 9 / 16;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

/* Glass Panel (used by various modal-like elements) */
.glass-panel:not([role="alertdialog"]) {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* Gold text shine */
.text-gold-shine {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Focus ring */
.focus-ring:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Visually hidden (for 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;
}

/* ===========================================================
   NAVBAR
   =========================================================== */
.navbar,
#app-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-navbar);
  background: var(--color-bg);
  isolation: isolate;
  transition: background var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.navbar.is-transparent { background: transparent; border-bottom-color: transparent; }
.navbar.is-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 12px rgba(10,10,10,0.06);
}
.navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.navbar__logo {
  font-family: var(--font-display); font-size: 1.375rem; font-weight: 700;
  color: var(--color-primary); letter-spacing: -0.02em; text-decoration: none;
  display: flex; align-items: baseline; gap: 1px; flex-shrink: 0;
}
.navbar__logo span { color: var(--color-accent); }
.navbar__logo:hover { opacity: 0.85; }
.navbar__nav { display: flex; align-items: center; gap: 0.75rem; }

/* Profile avatar button */
.profile-avatar-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  border-radius: var(--radius-full);
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  cursor: pointer; transition: all var(--duration-base) var(--ease-out);
}
.profile-avatar-btn:hover { border-color: var(--color-accent); box-shadow: var(--shadow-sm); }
.profile-avatar-btn__img { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; }
.profile-avatar-btn__initials {
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--gradient-gold);
  color: white; font-weight: 700; font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar-btn__name {
  font-size: var(--text-sm); font-weight: 600; color: var(--color-text);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Page loading overlay */
.page-loading-overlay {
  position: fixed; inset: 0; background: var(--color-bg); z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  opacity: 0; visibility: hidden; transition: opacity var(--duration-base) var(--ease-out);
}
.page-loading-overlay.is-visible { opacity: 1; visibility: visible; }
.page-loading-logo { font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; color: var(--color-primary); }
.page-loading-logo span { color: var(--color-accent); }
.dot-loader { display: flex; gap: 0.375rem; }
.dot-loader__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-accent); animation: dotBounce 1.4s ease-in-out infinite; }
.dot-loader__dot:nth-child(2) { animation-delay: 0.2s; }
.dot-loader__dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-8px); opacity: 1; } }

/* Page transitions */
.page-enter { opacity: 0; transform: translateY(12px); transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out); }
.page-active { opacity: 1; transform: translateY(0); }

/* ===========================================================
   TOAST
   =========================================================== */
.toast-container {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 0.625rem; pointer-events: none;
  max-width: 360px; width: calc(100vw - 2.5rem);
}
.toast {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.875rem 1rem; border-radius: var(--radius-md);
  background: var(--color-surface); border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl); pointer-events: all;
  animation: toastIn 0.3s var(--ease-spring); position: relative; overflow: hidden;
}
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.toast.success::before { background: var(--color-success); }
.toast.error::before   { background: var(--color-error); }
.toast.warning::before { background: var(--color-warning); }
.toast.info::before    { background: var(--color-info); }
.toast.gold::before    { background: var(--color-accent); }
.toast__icon { width: 1.125rem; height: 1.125rem; flex-shrink: 0; margin-top: 0.0625rem; }
.toast.success .toast__icon { color: var(--color-success); }
.toast.error   .toast__icon { color: var(--color-error); }
.toast.warning .toast__icon { color: var(--color-warning); }
.toast.info    .toast__icon { color: var(--color-info); }
.toast.gold    .toast__icon { color: var(--color-accent); }
.toast__body { flex: 1; min-width: 0; }
.toast__title { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); margin-bottom: 0.125rem; }
.toast__message { font-size: var(--text-xs); color: var(--color-muted); line-height: 1.5; }
.toast__close { flex-shrink: 0; padding: 0.125rem; color: var(--color-muted); transition: color var(--duration-fast) var(--ease-out); }
.toast__close:hover { color: var(--color-text); }
.toast.removing { animation: toastOut 0.3s var(--ease-in) forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); max-height: 200px; } to { opacity: 0; transform: translateX(100%); max-height: 0; padding: 0; margin: 0; } }

/* ===========================================================
   LANDING — HERO
   =========================================================== */
.landing-page { display: none; }
.hero-section {
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  padding: 1.75rem 1.25rem 3rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-gradient-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; animation: orbFloat 8s ease-in-out infinite; }
.orb-1 { width: min(50vw,500px); height: min(50vw,500px); background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%); top: -10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: min(40vw,400px); height: min(40vw,400px); background: radial-gradient(circle, rgba(99,102,241,0.14) 0%, transparent 70%); top: 20%; right: -5%; animation-delay: -3s; }
.orb-3 { width: min(30vw,300px); height: min(30vw,300px); background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%); bottom: 10%; left: 30%; animation-delay: -6s; }
@keyframes orbFloat { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(2%,3%) scale(1.04); } 66% { transform: translate(-2%,1%) scale(0.97); } }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.875rem; background: rgba(99,102,241,0.10);
  border: 1px solid rgba(99,102,241,0.30); border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; color: var(--color-accent-dark); letter-spacing: 0.03em;
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); animation: pulse 2s ease-in-out infinite; }
.hero-headline {
  font-family: var(--font-display); font-size: var(--text-7xl); font-weight: 700;
  color: var(--color-primary); line-height: 1.1; letter-spacing: -0.03em; margin: 0;
}
.hero-headline-em {
  font-style: italic; background: var(--gradient-gold);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subheadline { font-size: var(--text-lg); color: var(--color-muted); line-height: 1.7; max-width: 520px; margin: 0; }
.hero-cta-group { display: flex; flex-direction: column; align-items: flex-start; gap: 0.875rem; width: 100%; }
.btn-hero-primary {
  display: inline-flex; align-items: center; gap: 0.625rem;
  padding: 0.9375rem 2rem; background: var(--gradient-brand); color: white;
  border-radius: var(--radius-lg); font-size: var(--text-base); font-weight: 700;
  font-family: var(--font-body); letter-spacing: 0.01em;
  transition: all var(--duration-base) var(--ease-out); text-decoration: none;
  box-shadow: 0 4px 20px rgba(10,10,10,0.20);
}
.btn-hero-primary:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(99,102,241,0.35); }
.hero-price-note { display: flex; align-items: center; gap: 0.375rem; font-size: var(--text-xs); color: var(--color-muted); font-weight: 500; }

/* Flipbook mockup */
.hero-mockup { margin-top: 1rem; }
.flipbook-mockup { position: relative; width: 160px; height: 220px; margin: 0 auto; }
.flipbook-page { position: absolute; width: 140px; height: 200px; border-radius: 4px 12px 12px 4px; transition: transform 1.2s cubic-bezier(0.25,0.8,0.25,1); }
.page-back { background: #f0ece4; left: 16px; top: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 2px 0 8px rgba(0,0,0,0.08); }
.page-lines { display: flex; flex-direction: column; gap: 8px; padding: 20px 16px; width: 100%; }
.page-line { height: 8px; background: rgba(0,0,0,0.08); border-radius: 4px; }
.page-line.short { width: 60%; }
.page-front { background: var(--color-primary); left: 0; top: 0; overflow: hidden; transform-origin: left center; box-shadow: 8px 8px 30px rgba(0,0,0,0.20); }
.page-cover-art { position: absolute; inset: 0; background: linear-gradient(160deg,#1a1a1a 0%,#0a0a0a 100%); }
.page-cover-gradient { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(99,102,241,0.30) 0%, transparent 60%); }
.page-cover-text { position: absolute; bottom: 1.5rem; left: 1rem; right: 1rem; }
.page-cover-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: white; }
.page-cover-sub { font-size: 0.75rem; color: rgba(99,102,241,0.8); margin-top: 0.25rem; font-weight: 500; }
.flipbook-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: linear-gradient(to right, rgba(0,0,0,0.15), transparent); border-radius: 4px 0 0 4px; }
.flipbook-shadow { position: absolute; bottom: -16px; left: 10%; right: 10%; height: 20px; background: rgba(0,0,0,0.12); filter: blur(12px); border-radius: 50%; }

.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; opacity: 0.4; }
.scroll-indicator-track { width: 2px; height: 48px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.scroll-indicator-thumb { width: 100%; height: 40%; background: var(--color-accent); border-radius: var(--radius-full); animation: scrollThumb 1.8s ease-in-out infinite; }
@keyframes scrollThumb { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(150%); opacity: 0; } }

/* ===========================================================
   LANDING — STATS STRIP
   =========================================================== */
.stats-strip { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); padding: 2.5rem 1.25rem; }
.stats-inner { max-width: 800px; margin: 0 auto; display: grid; grid-template-columns: repeat(4,1fr); align-items: center; }
.stat-item { text-align: center; padding: 0 1rem; }
.stat-number { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 700; color: var(--color-primary); line-height: 1; letter-spacing: -0.03em; }
.stat-label { font-size: var(--text-xs); color: var(--color-muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-top: 0.375rem; }
.stat-divider { width: 1px; height: 48px; background: var(--color-border); }

/* ===========================================================
   LANDING — SHARED SECTION
   =========================================================== */
.section-inner { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag {
  display: inline-block; font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-dark);
  background: rgba(99,102,241,0.10); border: 1px solid rgba(99,102,241,0.25);
  padding: 0.25rem 0.75rem; border-radius: var(--radius-full); margin-bottom: 1rem;
}
.section-title { font-family: var(--font-display); font-size: var(--text-5xl); font-weight: 700; color: var(--color-primary); letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
.section-subtitle { font-size: var(--text-lg); color: var(--color-muted); max-width: 520px; margin: 1rem auto 0; line-height: 1.7; }

/* ===========================================================
   LANDING — HOW IT WORKS
   =========================================================== */
.section-how { padding: 6rem 0; background: var(--color-bg); }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.step-card {
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 2rem;
  transition: all var(--duration-slow) var(--ease-out); position: relative; overflow: hidden;
}
.step-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-gold); transform: scaleX(0); transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}
.step-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: rgba(99,102,241,0.30); }
.step-card:hover::before { transform: scaleX(1); }
.step-number { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: rgba(99,102,241,0.15); line-height: 1; margin-bottom: 1rem; letter-spacing: -0.04em; }
.step-icon-wrap { width: 3rem; height: 3rem; background: rgba(99,102,241,0.10); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--color-accent); margin-bottom: 1.25rem; }
.step-title { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; color: var(--color-primary); margin-bottom: 0.625rem; }
.step-desc { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.7; margin: 0; }
.step-arrow { margin-top: 1.25rem; color: var(--color-accent); opacity: 0.6; transition: all var(--duration-base) var(--ease-out); }
.step-card:hover .step-arrow { opacity: 1; transform: translateX(4px); }

/* ===========================================================
   LANDING — FEATURES
   =========================================================== */
.section-features { padding: 6rem 0; background: var(--color-primary); }
.section-features .section-tag { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.30); color: var(--color-accent-light); }
.section-features .section-title { color: white; }
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.landing-feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl); padding: 2rem; position: relative; overflow: hidden;
  transition: all var(--duration-slow) var(--ease-out);
}
.landing-feature-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(99,102,241,0.25); transform: translateY(-4px); }
.feature-card-large { grid-column: span 2; }
.feature-card-bg { position: absolute; top: 0; right: 0; width: 120px; height: 120px; border-radius: 50%; filter: blur(40px); opacity: 0.3; }
.bg-gold   { background: var(--color-brand); } .bg-dark { background: #6B6B6B; }
.bg-warm   { background: #D97706; } .bg-slate { background: #2563EB; }
.bg-accent { background: var(--color-brand); }
.feature-icon { width: 3.5rem; height: 3.5rem; background: rgba(99,102,241,0.15); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--color-accent-light); margin-bottom: 1.25rem; }
.feature-title { font-family: var(--font-body); font-size: var(--text-xl); font-weight: 700; color: white; margin-bottom: 0.625rem; }
.feature-desc { font-size: var(--text-sm); color: rgba(255,255,255,0.55); line-height: 1.7; margin: 0; }

/* ===========================================================
   LANDING — VIEWER MODES
   =========================================================== */
.section-viewer { padding: 6rem 0; background: var(--color-bg); }
.viewer-modes-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.viewer-mode-card {
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 1.75rem 1.5rem; text-align: center;
  transition: all var(--duration-slow) var(--ease-out);
}
.viewer-mode-card:hover { border-color: rgba(99,102,241,0.40); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.viewer-mode-icon { width: 3.5rem; height: 3.5rem; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; }
.viewer-mode-webgl { background: linear-gradient(135deg,#1a1a1a,#333); color: var(--color-accent); }
.viewer-mode-3d    { background: linear-gradient(135deg,#1e3a5f,#2563EB); color: white; }
.viewer-mode-2d    { background: linear-gradient(135deg,#1a3a28,#16a34a); color: white; }
.viewer-mode-swipe { background: linear-gradient(135deg,#3b1a5e,#7c3aed); color: white; }
.viewer-mode-label { font-weight: 700; font-size: var(--text-sm); color: var(--color-primary); margin-bottom: 0.5rem; }
.viewer-mode-desc  { font-size: var(--text-xs); color: var(--color-muted); line-height: 1.6; }
.viewer-mode-badge { display: inline-block; margin-top: 0.75rem; padding: 0.125rem 0.5rem; background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25); border-radius: var(--radius-full); font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-accent-dark); }

/* ===========================================================
   LANDING — PRICING
   =========================================================== */
.section-pricing { padding: 6rem 0; background: var(--color-surface); }
.pricing-card-wrap { max-width: 480px; margin: 0 auto; }
.pricing-card { background: var(--color-primary); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-2xl); }
.pricing-card-header { padding: 2.5rem 2.5rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.pricing-tag { display: inline-block; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 1rem; }
.pricing-amount { display: flex; align-items: baseline; gap: 0.25rem; margin-bottom: 0.75rem; }
.pricing-currency { font-size: var(--text-3xl); font-weight: 700; color: white; font-family: var(--font-display); }
.pricing-number { font-family: var(--font-display); font-size: var(--text-7xl); font-weight: 700; color: white; line-height: 1; letter-spacing: -0.04em; }
.pricing-desc { font-size: var(--text-sm); color: rgba(255,255,255,0.50); }
.pricing-features-list { padding: 2rem 2.5rem; display: flex; flex-direction: column; gap: 0.875rem; }
.pricing-feature { display: flex; align-items: center; gap: 0.75rem; font-size: var(--text-sm); color: rgba(255,255,255,0.80); }
.pricing-feature svg { flex-shrink: 0; color: var(--color-accent); }
.btn-pricing-cta {
  display: flex; align-items: center; justify-content: center; gap: 0.625rem;
  margin: 0 2.5rem 2.5rem; padding: 1rem 1.5rem; background: var(--gradient-gold);
  color: white; border-radius: var(--radius-lg); font-weight: 700; font-family: var(--font-body);
  font-size: var(--text-base); letter-spacing: 0.01em; text-decoration: none;
  box-shadow: var(--shadow-gold); transition: all var(--duration-base) var(--ease-out);
}
.btn-pricing-cta:hover { box-shadow: 0 12px 40px rgba(99,102,241,0.50); transform: translateY(-2px); filter: brightness(1.05); }

/* ===========================================================
   LANDING — SECURITY
   =========================================================== */
.section-security { padding: 6rem 0; background: var(--color-bg); }
.trust-badges-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; }
.security-trust-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-xl); padding: 1.75rem 1.5rem; transition: all var(--duration-slow) var(--ease-out);
}
.security-trust-card:hover { border-color: rgba(99,102,241,0.30); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.trust-badge-icon { width: 3.5rem; height: 3.5rem; background: rgba(99,102,241,0.10); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; color: var(--color-accent); margin: 0 auto 1rem; }
.trust-badge-title { font-weight: 700; font-size: var(--text-sm); color: var(--color-primary); margin-bottom: 0.5rem; }
.trust-badge-desc { font-size: var(--text-xs); color: var(--color-muted); line-height: 1.6; margin: 0; }

/* ===========================================================
   LANDING — FINAL CTA
   =========================================================== */
.section-final-cta { padding: 6rem 0; background: var(--color-primary); }
.final-cta-card { max-width: 640px; margin: 0 auto; text-align: center; position: relative; padding: 4rem 2rem; }
.final-cta-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 400px; height: 300px; background: radial-gradient(ellipse, rgba(99,102,241,0.20) 0%, transparent 70%); pointer-events: none; }
.final-cta-title { font-family: var(--font-display); font-size: var(--text-5xl); font-weight: 700; color: white; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 1rem; }
.final-cta-subtitle { font-size: var(--text-lg); color: rgba(255,255,255,0.55); margin-bottom: 2rem; line-height: 1.6; }
.btn-final-cta { display: inline-flex; align-items: center; gap: 0.625rem; padding: 1rem 2.5rem; background: var(--gradient-gold); color: white; border-radius: var(--radius-lg); font-weight: 700; font-family: var(--font-body); font-size: var(--text-lg); letter-spacing: 0.01em; text-decoration: none; box-shadow: var(--shadow-gold); transition: all var(--duration-base) var(--ease-out); }
.btn-final-cta:hover { box-shadow: 0 16px 48px rgba(99,102,241,0.50); transform: translateY(-3px); filter: brightness(1.05); }
.final-cta-note { margin-top: 1.25rem; font-size: var(--text-xs); color: rgba(255,255,255,0.35); font-weight: 500; }

/* ===========================================================
   LANDING — FOOTER
   =========================================================== */
.landing-footer { background: var(--color-primary); border-top: 1px solid rgba(255,255,255,0.06); padding: 3rem 0 2rem; }
.landing-footer-inner { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; display: grid; grid-template-columns: 1fr auto auto; gap: 2rem; align-items: center; }
.footer-brand { display: flex; flex-direction: column; gap: 0.375rem; }
.brand-logo-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: white; letter-spacing: -0.02em; }
.brand-logo-dot { color: var(--color-accent); }
.footer-logo { font-size: 1.25rem; }
.footer-tagline { font-size: var(--text-xs); color: rgba(255,255,255,0.35); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-link { font-size: var(--text-sm); color: rgba(255,255,255,0.45); text-decoration: none; font-weight: 500; transition: color var(--duration-fast) var(--ease-out); }
.footer-link:hover { color: rgba(255,255,255,0.85); }
.footer-copy { font-size: var(--text-xs); color: rgba(255,255,255,0.25); white-space: nowrap; }

/* ===========================================================
   AUTH VIEW v2 — creative split login
   =========================================================== */
.auth-v2 {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: #0f172a;
}
.auth-v2__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2.5rem 2rem;
  overflow: hidden;
  color: #fff;
}
.auth-v2__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 20% 10%, rgba(99, 102, 241, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(129, 140, 248, 0.35) 0%, transparent 50%),
    linear-gradient(160deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
}
.auth-v2__grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
}
.auth-v2__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.auth-v2__orb--1 { width: 280px; height: 280px; top: 8%; right: -5%; background: rgba(167, 139, 250, 0.45); }
.auth-v2__orb--2 { width: 220px; height: 220px; bottom: 15%; left: -8%; background: rgba(99, 102, 241, 0.4); }
.auth-v2__brand,
.auth-v2__showcase,
.auth-v2__chips { position: relative; z-index: 1; }
.auth-v2__logo {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.auth-v2__logo span { color: #c7d2fe; }
.auth-v2__tagline {
  margin: 0.5rem 0 0;
  max-width: 22rem;
  font-size: var(--text-base);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}
.auth-v2__showcase {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 240px;
  padding: 0.5rem 0;
}
.auth-v2__scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(300px, 100%);
  margin: 0 auto;
}
.auth-v2__book-wrap {
  position: relative;
  width: 188px;
  height: 252px;
  margin: 0 auto;
  perspective: 1000px;
  perspective-origin: 50% 50%;
  will-change: transform;
}
.auth-v2__book-wrap--css {
  animation: authBookCenter 5.8s ease-in-out infinite;
}
@keyframes authBookCenter {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(10px); }
  38%, 62% { transform: translateX(14px); }
  82% { transform: translateX(5px); }
}
.auth-v2__book-shadow {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 2px;
  height: 24px;
  background: rgba(0, 0, 0, 0.32);
  filter: blur(12px);
  border-radius: 50%;
  transform: scaleY(0.4);
  pointer-events: none;
}
.auth-v2__spine {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 11px;
  border-radius: 5px 0 0 5px;
  background: linear-gradient(90deg, #312e81 0%, #4f46e5 55%, #6366f1 100%);
  box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.2);
  z-index: 1;
  pointer-events: none;
}
.auth-v2__flipbook {
  position: absolute;
  top: 0;
  left: 11px;
  right: 0;
  bottom: 0;
  transform-style: preserve-3d;
  transform: rotateX(3deg);
}
.auth-v2__stack,
.auth-v2__leaf,
.auth-v2__cover {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  bottom: 8px;
  transform-style: preserve-3d;
  transform-origin: left center;
}
.auth-v2__stack { z-index: 1; }
.auth-v2__sheet {
  position: absolute;
  inset: 0;
  border-radius: 3px 12px 12px 3px;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  box-shadow: inset -1px 0 4px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.auth-v2__sheet--1 { transform: translateZ(0); }
.auth-v2__sheet--2 { transform: translateZ(-1px) translateX(1px); opacity: 0.96; }
.auth-v2__sheet--3 { transform: translateZ(-2px) translateX(2px); opacity: 0.92; }
.auth-v2__leaf {
  z-index: 5;
  will-change: transform;
  transform-style: preserve-3d;
}
.auth-v2__leaf-face,
.auth-v2__cover-face,
.auth-v2__cover-inside {
  position: absolute;
  inset: 0;
  border-radius: 3px 12px 12px 3px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.auth-v2__leaf-face {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(71, 85, 105, 0.2) 0 2px,
      rgba(71, 85, 105, 0) 2px 10px
    ),
    linear-gradient(160deg, rgba(99, 102, 241, 0.78) 0%, rgba(79, 70, 229, 0.96) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.98) 58%, rgba(226, 232, 240, 1) 100%),
    radial-gradient(circle at 74% 26%, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 42%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size:
    78% 28%,
    78% 38%,
    100% 100%,
    100% 100%;
  background-position:
    11% 78%,
    11% 10%,
    0 0,
    0 0;
  box-shadow: 2px 6px 16px rgba(15, 23, 42, 0.14);
}
.auth-v2__leaf-face--front {
  transform: rotateY(0deg) translateZ(0.5px);
}
.auth-v2__leaf-face--back {
  transform: rotateY(180deg) translateZ(0.5px);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(71, 85, 105, 0.18) 0 2px,
      rgba(71, 85, 105, 0) 2px 10px
    ),
    linear-gradient(160deg, rgba(129, 140, 248, 0.72) 0%, rgba(99, 102, 241, 0.92) 100%),
    linear-gradient(180deg, rgba(238, 242, 255, 0.98) 0%, rgba(224, 231, 255, 0.98) 100%),
    radial-gradient(circle at 26% 26%, rgba(79, 70, 229, 0.14) 0%, rgba(79, 70, 229, 0) 42%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size:
    78% 28%,
    78% 38%,
    100% 100%,
    100% 100%;
  background-position:
    11% 78%,
    11% 10%,
    0 0,
    0 0;
}
.auth-v2__leaf--2 { z-index: 6; }
.auth-v2__cover {
  z-index: 10;
  will-change: transform;
}
.auth-v2__cover-face {
  background: linear-gradient(145deg, #818cf8 0%, #6366f1 42%, #4338ca 100%);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: flex-end;
  padding: 0.875rem 1rem;
  transform: rotateY(0deg) translateZ(1px);
}
.auth-v2__cover-inside {
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  transform: rotateY(180deg) translateZ(1px);
}
.auth-v2__book-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.28) 0%, transparent 50%);
  pointer-events: none;
}
.auth-v2__book-label {
  position: relative;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.95);
}
/* Fallback when GSAP is unavailable */
.auth-v2__flipbook--css .auth-v2__cover {
  animation: authCoverPeek 4s ease-in-out infinite;
}
.auth-v2__flipbook--css .auth-v2__leaf--1 {
  animation: authLeafTurn 5s ease-in-out infinite 1.1s;
}
.auth-v2__flipbook--css .auth-v2__leaf--2 {
  animation: authLeafTurn 5s ease-in-out infinite 2.1s;
}
@keyframes authCoverPeek {
  0%, 100% { transform: rotateY(0deg); }
  20%, 80% { transform: rotateY(-128deg); }
}
@keyframes authLeafTurn {
  0%, 25%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(-175deg); }
}
.auth-v2__float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: var(--text-xs);
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  z-index: 20;
}
.auth-v2__float--music { top: 6%; right: -18%; }
.auth-v2__float--share { bottom: 12%; left: -14%; }
.auth-v2__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}
.auth-v2__chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.auth-v2__chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a5b4fc;
}
.auth-v2__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.25rem 1.5rem 2rem;
  background: var(--color-page);
  position: relative;
}
.auth-v2__back {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--duration-fast);
  z-index: 2;
}
.auth-v2__back:hover { color: var(--color-brand); }
.auth-v2__card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}
.auth-v2__card-glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.auth-v2__card-head { margin-bottom: 1.5rem; }
.auth-v2__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}
.auth-v2__subtitle {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.55;
}
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-md);
  color: var(--color-error);
  font-size: var(--text-sm);
  margin-bottom: 1rem;
}
.auth-error.hidden { display: none; }
.auth-v2__google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-primary);
  cursor: pointer;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.auth-v2__google:hover {
  border-color: rgba(66, 133, 244, 0.45);
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.14);
  transform: translateY(-1px);
}
.auth-v2__google-icon { display: flex; flex-shrink: 0; }
.auth-v2__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  background: var(--color-tabs-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.auth-v2__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-fast);
}
.auth-v2__tab.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.auth-v2__panel { display: none; }
.auth-v2__panel.is-active { display: block; }
.auth-v2__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-v2__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-v2__field {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-v2__field-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--color-muted);
  pointer-events: none;
}
.auth-v2__input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 2.5rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-primary);
  background: var(--color-input-bg);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.auth-v2__input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: var(--color-surface);
}
.auth-v2__toggle-pw {
  position: absolute;
  right: 0.5rem;
  padding: 0.35rem;
  border: none;
  background: none;
  color: var(--color-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.auth-v2__toggle-pw:hover { color: var(--color-brand); }
.auth-v2__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  color: #fff;
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}
.auth-v2__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4);
}
.auth-v2__hint {
  margin: 1rem 0 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.55;
}
.auth-v2__hint--center { text-align: center; }
.auth-v2__hint strong { color: var(--color-brand-dark); font-weight: 600; }
.auth-v2__terms {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.6;
}
.auth-v2__terms a {
  color: var(--color-brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-v2__mobile-tag {
  display: none;
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
}

/* ===========================================================
   DASHBOARD — My Flipbooks (premium)
   =========================================================== */
.dash-page,
.dashboard-page {
  width: 100%;
  min-height: 100dvh;
  padding-bottom: 5rem;
  background: var(--color-page);
  box-sizing: border-box;
}
.dash-hero {
  position: relative;
  padding: 1.5rem 1.25rem 1.75rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, var(--color-page) 55%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.dash-hero__mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(99, 102, 241, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(129, 140, 248, 0.1) 0%, transparent 50%);
}
.dash-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.dash-hero__copy { min-width: 0; }
.dash-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-brand);
  margin-bottom: 0.35rem;
}
.dash-title,
.dashboard-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.1;
}
.dash-subtitle,
.dashboard-subtitle {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 0.35rem 0 0;
  line-height: 1.5;
}
.dash-cta,
.btn-create-flipbook {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.dash-cta:hover,
.btn-create-flipbook:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}
.dash-body,
.dashboard-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
}
.dash-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.dash-toolbar__count {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
}
.dash-branding-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.125rem;
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.1) 0%, rgba(201, 169, 110, 0.04) 100%);
  border: 1px solid rgba(201, 169, 110, 0.28);
  border-radius: var(--radius-lg);
}
.dash-branding-banner__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: rgba(201, 169, 110, 0.15);
  color: var(--color-brand);
}
.dash-branding-banner__copy { flex: 1; min-width: 12rem; }
.dash-branding-banner__title {
  margin: 0 0 0.25rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
}
.dash-branding-banner__desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.5;
}
.dash-branding-banner__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-brand-dark);
  background: var(--color-surface);
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.dash-branding-banner__cta:hover {
  background: rgba(201, 169, 110, 0.08);
  border-color: rgba(201, 169, 110, 0.5);
}
.dash-branding-banner--setup {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.03) 100%);
  border-color: rgba(99, 102, 241, 0.22);
}
.dash-branding-banner--setup .dash-branding-banner__icon {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}
.dash-grid,
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.125rem;
}
.albums-grid--list {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .albums-grid--list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .albums-grid--list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
.dash-grid--empty {
  display: block;
}

/* Flipbook card */
.dash-card,
.album-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.dash-card:hover,
.album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.28);
}
.dash-card__cover,
.album-card-cover {
  position: relative;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
  overflow: hidden;
}
.dash-card__cover--list,
.album-card-cover.dash-card__cover--list {
  aspect-ratio: auto;
  height: 12rem;
}
.dash-card--list {
  border-radius: 1rem;
}
.dash-card--list .dash-card__body {
  gap: 0.75rem;
  padding: 1rem 1.125rem 1.125rem;
}
.dash-card__head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.dash-card__badges {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  right: 3.25rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  pointer-events: none;
}
.dash-card__badges .dash-card__badge {
  position: static;
}
.dash-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-muted);
}
.dash-card__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text);
}
.dash-card__stats--empty {
  justify-content: flex-start;
  gap: 0.45rem;
  color: var(--color-muted);
  font-size: 0.75rem;
}
.dash-card__stats--empty svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.dash-card__stats-left,
.dash-card__stats-right {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.dash-card__stats-left {
  font-weight: 600;
  color: var(--color-muted);
}
.dash-card__stats-left svg {
  width: 14px;
  height: 14px;
  opacity: 0.75;
  flex-shrink: 0;
}
.dash-card__stats-left--empty {
  visibility: hidden;
}
.dash-card__stats-right {
  margin-left: auto;
  text-align: right;
  font-size: 0.75rem;
  color: var(--color-muted);
  white-space: nowrap;
}
.dash-card__stats-right strong {
  font-weight: 700;
  color: var(--color-primary);
}
.dash-card__stats-right--muted {
  font-weight: 600;
  font-size: 0.6875rem;
}
.dash-card__filmstrip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  overflow: hidden;
  padding: 0.25rem 0;
  margin-top: 0.125rem;
}
.dash-card__filmstrip--empty {
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--color-tabs-bg);
  border: 1px dashed var(--color-border);
  color: var(--color-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  justify-content: center;
}
.dash-card__filmstrip--skeleton {
  gap: 0.375rem;
}
.dash-card__thumb {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-tabs-bg);
}
.dash-card__thumb--skeleton {
  background: linear-gradient(90deg, var(--color-border) 0%, rgba(148, 163, 184, 0.15) 50%, var(--color-border) 100%);
}
.dash-card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dash-card__thumb--more {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--color-muted);
  background: var(--color-surface-elevated);
}
.dash-card__dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: var(--color-muted);
  margin-top: 0.75rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--color-border);
}
.dash-card__date {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  white-space: nowrap;
}
.dash-card__date svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.65;
}
.dash-card__archive-alert {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-md);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.18);
  color: #b91c1c;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
}
.dash-card__archive-alert svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.dash-badge--draft,
.dash-badge--archived {
  background: rgba(51, 65, 85, 0.88);
  color: #f8fafc;
}
.dash-badge--archived {
  background: rgba(220, 38, 38, 0.92);
}
.dash-card__img,
.album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.dash-card:hover .dash-card__img,
.album-card:hover .album-cover-img {
  transform: scale(1.04);
}
.dash-card__placeholder,
.album-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
.dash-card__badge,
.album-card-status-badge {
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-md);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  z-index: 2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.dash-badge--active,
.status-active { background: rgba(22, 163, 74, 0.92); color: #fff; }
.dash-badge--pending,
.status-pending { background: rgba(217, 119, 6, 0.92); color: #fff; }
.dash-badge--failed,
.status-failed { background: rgba(220, 38, 38, 0.92); color: #fff; }
.dash-card__menu-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-full);
  background: var(--color-surface-elevated);
  color: var(--color-text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.dash-card__menu-btn:hover,
.dash-card__menu-btn[aria-expanded="true"] {
  background: var(--color-brand);
  color: #fff;
  transform: scale(1.05);
}
.dash-card__cover-action,
.dash-card__view-link {
  position: absolute;
  bottom: 0.625rem;
  right: 0.625rem;
  left: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: auto;
  max-width: min(100%, calc(100% - 1.25rem));
  padding: 0.4375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.dash-card__cover-action--preview,
.dash-card__view-link {
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-primary);
}
.dash-card__cover-action--upload {
  background: rgba(99, 102, 241, 0.95);
  color: #fff;
}
.dash-card__cover-action--pay {
  background: rgba(217, 119, 6, 0.95);
  color: #fff;
}
.dash-card:hover .dash-card__cover-action,
.dash-card:hover .dash-card__view-link { opacity: 1; transform: translateY(0); }
@media (max-width: 768px) {
  .dash-card--list .dash-card__cover-action,
  .dash-card--list .dash-card__view-link {
    opacity: 1;
    transform: translateY(0);
  }
}
.dash-card__body,
.album-card-body {
  padding: 0.875rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}
.dash-card__title,
.album-card-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-card__desc,
.album-card-desc {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-card__chips,
.album-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.dash-chip,
.album-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-muted);
  padding: 0.2rem 0.5rem;
  background: var(--color-tabs-bg);
  border-radius: var(--radius-full);
}
.dash-chip svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Album card actions popover */
.album-menu-popover {
  position: fixed;
  z-index: var(--z-overlay);
  min-width: 200px;
  max-width: min(280px, calc(100vw - 24px));
  max-height: min(70vh, calc(100dvh - 24px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.375rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-spring),
              visibility var(--duration-base) var(--ease-out);
  transform-origin: top right;
}
.album-menu-popover.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.album-menu-popover[data-placement="top"] {
  transform: translateY(-8px) scale(0.98);
}
.album-menu-popover[data-placement="top"].is-open {
  transform: translateY(0) scale(1);
}
.album-menu-popover__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  background: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.album-menu-popover__item:hover {
  background: var(--color-brand-muted);
  color: var(--color-brand-dark);
}
.album-menu-popover__item--primary {
  color: var(--color-brand-dark);
}
.album-menu-popover__item--danger {
  color: var(--color-error);
}
.album-menu-popover__item--danger:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}
.album-menu-popover__item svg { flex-shrink: 0; color: currentColor; }
.album-menu-popover__sep {
  height: 1px;
  background: var(--color-border);
  margin: 0.25rem 0.375rem;
}

/* Dashboard empty */
.dash-empty,
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  max-width: 400px;
  margin: 0 auto;
}
.dash-empty__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.25rem;
  background: var(--color-brand-muted);
  color: var(--color-brand);
}
.dash-empty__title,
.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}
.dash-empty__desc,
.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.dash-empty__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: var(--shadow-gold);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.dash-empty__note,
.empty-state-price {
  margin-top: 1rem;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.dash-error { grid-column: 1 / -1; }
.dash-error.error-state svg {
  color: var(--color-muted);
  opacity: 0.85;
}
.dash-error.error-state p {
  max-width: 22rem;
  line-height: 1.5;
}
.dash-error__retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.75rem 1.375rem;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: var(--shadow-gold);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.dash-error__retry:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
}
.dash-error__retry:active {
  transform: translateY(0);
}

/* ===========================================================
   FLIPICK PLAY STORE BUTTON (custom CTA)
   =========================================================== */
.flipick-play-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem 0.75rem 0.875rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
  box-sizing: border-box;
}

.flipick-play-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 36px rgba(99, 102, 241, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.flipick-play-btn__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.flipick-play-btn__icon svg {
  display: block;
}

.flipick-play-btn__copy {
  flex: 1;
  min-width: 0;
  text-align: left;
  line-height: 1.2;
}

.flipick-play-btn__label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
}

.flipick-play-btn__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.flipick-play-btn__arrow {
  flex-shrink: 0;
  opacity: 0.55;
  margin-right: 0.125rem;
}

.flipick-play-btn--footer {
  width: auto;
  min-width: min(100%, 17.5rem);
}

/* ===========================================================
   INSTALL APP PROMPT (mobile web — once per session)
   =========================================================== */
body.install-app-prompt-open {
  overflow: hidden;
}

.install-app-prompt {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-overlay) + 20);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s var(--ease-out);
}

.install-app-prompt.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.install-app-prompt__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}

.install-app-prompt__panel {
  position: relative;
  width: min(100%, 23.5rem);
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.32);
  transform: translateY(1rem) scale(0.98);
  transition: transform 0.32s var(--ease-spring);
}

.install-app-prompt.is-visible .install-app-prompt__panel {
  transform: translateY(0) scale(1);
}

.install-app-prompt__glow {
  position: absolute;
  top: -4rem;
  left: 50%;
  width: 14rem;
  height: 14rem;
  margin-left: -7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.install-app-prompt__close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.install-app-prompt__body {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.25rem 1.125rem;
  text-align: center;
}

.install-app-prompt__logo-wrap {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.75rem;
  padding: 0.5rem;
  border-radius: 1rem;
  background: var(--color-brand-muted);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.install-app-prompt__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.install-app-prompt__logo--white {
  display: none;
}

html[data-theme='dark'] .install-app-prompt__logo-wrap,
html.dark .install-app-prompt__logo-wrap {
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
}

html[data-theme='dark'] .install-app-prompt__logo--purple,
html.dark .install-app-prompt__logo--purple {
  display: none;
}

html[data-theme='dark'] .install-app-prompt__logo--white,
html.dark .install-app-prompt__logo--white {
  display: block;
}

.install-app-prompt__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brand);
}

.install-app-prompt__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.install-app-prompt__lead {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin: 0 auto 1rem;
  max-width: 18rem;
}

.install-app-prompt__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem;
  margin-bottom: 1.125rem;
}

.install-app-prompt__chip {
  padding: 0.3125rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-brand-dark);
  background: var(--color-brand-muted);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.install-app-prompt__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.install-app-prompt__dismiss {
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}

.install-app-prompt__dismiss:hover {
  color: var(--color-text);
}

@media (min-width: 640px) {
  .install-app-prompt {
    align-items: center;
    padding: 1.25rem;
  }
}

html.flipick-native-app .install-app-prompt,
html.flipick-native-app .app-footer__app {
  display: none !important;
}

/* Site footer */
.app-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  margin-top: auto;
}
.app-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  text-align: center;
}

.app-footer__app {
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.875rem;
  text-align: center;
}

.app-footer__app-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.app-footer__app-copy {
  text-align: center;
  max-width: 22rem;
}

.app-footer__app-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

.app-footer__app-desc {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.45;
  margin: 0;
  max-width: 28rem;
}

.app-footer__links-wrap {
  padding-top: 0.25rem;
}
.app-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  padding-top: 0.25rem;
}
.app-footer__links a {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.app-footer__links a:hover { color: var(--color-brand); }
.app-footer__sep { color: var(--color-border); font-size: var(--text-xs); user-select: none; }
.app-footer__copy {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--color-muted);
  letter-spacing: 0.01em;
}

/* Skeletons */
.skeleton-card { pointer-events: none; }
.skeleton-cover,.skeleton-line,.skeleton-btn,.skeleton-shimmer { background: linear-gradient(90deg,var(--skeleton-from) 25%,var(--skeleton-mid) 50%,var(--skeleton-from) 75%); background-size: 200% 100%; animation: shimmer 1.8s infinite; border-radius: var(--radius-sm); }
.skeleton-title   { height: 12px; width: 70%; margin-bottom: 0.5rem; }
.skeleton-subtitle { height: 12px; width: 45%; }
.skeleton-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.skeleton-btn { height: 32px; width: 72px; }

/* Empty state */
.empty-state {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.25rem 3rem;
  gap: 1rem;
  min-height: auto;
  justify-content: flex-start;
}
.empty-state-illustration { margin-bottom: 0.5rem; }
.empty-book { width: 80px; height: 100px; position: relative; margin: 0 auto; }
.empty-book-cover { width: 72px; height: 96px; background: var(--color-border); border-radius: 4px 12px 12px 4px; position: absolute; left: 0; top: 0; }
.empty-book-pages { position: absolute; right: 0; top: 4px; display: flex; flex-direction: column; gap: 3px; }
.empty-book-page { width: 68px; height: 28px; background: var(--skeleton-mid); border-radius: 0 8px 8px 0; }
.empty-book-plus { position: absolute; bottom: -10px; right: -10px; width: 32px; height: 32px; background: var(--color-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; box-shadow: var(--shadow-md); }
.empty-state-title { font-size: var(--text-2xl); font-weight: 700; color: var(--color-primary); }
.empty-state-desc { font-size: var(--text-base); color: var(--color-muted); max-width: 360px; }
.btn-empty-create { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8125rem 1.75rem; background: var(--gradient-brand); color: white; border-radius: var(--radius-lg); font-size: var(--text-sm); font-weight: 700; font-family: var(--font-body); text-decoration: none; transition: all var(--duration-base) var(--ease-out); box-shadow: var(--shadow-gold); }
.btn-empty-create:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(99,102,241,0.35); }
.empty-state-price { font-size: var(--text-xs); color: var(--color-muted); font-weight: 500; }
.fab-create {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--gradient-brand);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold), var(--shadow-lg);
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-spring);
}
.fab-create:hover { transform: scale(1.08); box-shadow: 0 12px 40px rgba(99,102,241,0.45); }

/* ===========================================================
   ALBUM CREATE — WIZARD
   =========================================================== */
/* Create wizard: no duplicate navbar spacer gap */
.create-page {
  width: 100%;
  max-width: 100vw;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  box-sizing: border-box;
  padding: 0;
}
.create-header {
  position: sticky;
  top: var(--nav-offset);
  z-index: var(--z-raised);
  flex-shrink: 0;
  background: var(--color-chrome);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--color-border);
  padding: 0.625rem 0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.create-main {
  flex: 1;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}
#create-album-form {
  width: 100%;
  min-width: 0;
}
.create-header-inner {
  max-width: min(760px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.25rem);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-sizing: border-box;
}
.create-back-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-muted);
  background: var(--color-surface);
  cursor: pointer;
  transition: width var(--duration-base) var(--ease-out), opacity var(--duration-base) var(--ease-out), margin var(--duration-base) var(--ease-out);
  flex-shrink: 0;
  overflow: hidden;
}
.create-back-btn:hover { color: var(--color-brand); border-color: var(--color-brand-light); }
.create-back-btn.is-collapsed {
  width: 0;
  min-width: 0;
  height: 2.25rem;
  padding: 0;
  margin: 0;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
}
.create-progress-wrap { flex: 1; min-width: 0; }
.create-progress-steps {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 0.125rem;
  -webkit-overflow-scrolling: touch;
}
.create-progress-steps::-webkit-scrollbar { display: none; }
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1 0 3.25rem;
  min-width: 3.25rem;
  max-width: 4.5rem;
}
.progress-connector {
  flex: 1 1 12px;
  height: 2px;
  background: var(--color-border);
  margin-top: 0.875rem;
  margin-bottom: 0;
  transition: background var(--duration-slow) var(--ease-out);
  min-width: 8px;
}
.progress-step.complete + .progress-connector,
.progress-connector:has(+ .progress-step.complete) {
  background: var(--color-success);
}
.progress-step-dot {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}
.progress-step-num { font-size: 0.6875rem; font-weight: 700; color: var(--color-muted); line-height: 1; }
.progress-step-check {
  display: none;
  color: white;
  width: 12px;
  height: 12px;
}
.progress-step.active .progress-step-dot {
  border-color: var(--color-brand);
  background: var(--gradient-brand);
  box-shadow: var(--shadow-gold);
}
.progress-step.active .progress-step-num { color: white; }
.progress-step.complete .progress-step-dot {
  border-color: var(--color-success);
  background: var(--color-success);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}
.progress-step.complete .progress-step-num { display: none; }
.progress-step.complete .progress-step-check { display: block; }
.progress-step-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-muted);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress-step.active .progress-step-label { color: var(--color-accent-dark); }
.progress-step.complete .progress-step-label { color: var(--color-success); }
.create-progress-bar { height: 3px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.create-progress-fill { height: 100%; background: var(--gradient-gold); border-radius: var(--radius-full); transition: width 0.5s var(--ease-out); }
.create-step-counter {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  display: none;
}
@media (min-width: 640px) {
  .create-step-counter { display: block; }
}

/* Steps */
.wizard-step {
  display: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.wizard-step.active {
  display: block;
  animation: wizardStepIn 0.4s var(--ease-out);
}
.wizard-step.hidden { display: none !important; }
@keyframes wizardStepIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.step-container {
  max-width: min(760px, 100%);
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 4vw, 1.25rem) 0;
  box-sizing: border-box;
}
.step-container-narrow { max-width: 540px; }
.step-hero { margin-bottom: 2rem; }
.step-hero .step-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, var(--text-3xl));
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}
.step-hero .step-desc { font-size: var(--text-base); color: var(--color-muted); margin: 0; }
.step-body { display: flex; flex-direction: column; gap: 1.5rem; }
.step-body-cover { align-items: center; }

/* Settings sections */
.settings-section {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.settings-section-header { display: flex; align-items: flex-start; gap: 0.875rem; }
.settings-section-icon { width: 2.25rem; height: 2.25rem; background: rgba(99,102,241,0.10); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--color-accent); flex-shrink: 0; }
.settings-section-title { font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; color: var(--color-primary); margin-bottom: 0.25rem; }
.settings-section-desc { font-size: var(--text-xs); color: var(--color-muted); margin: 0; line-height: 1.5; }

/* View mode selector */
.view-mode-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.75rem; }
.view-mode-card { border: 2px solid var(--color-border); border-radius: var(--radius-lg); padding: 1rem; cursor: pointer; transition: all var(--duration-base) var(--ease-out); background: var(--color-bg); }
.view-mode-card:hover,.view-mode-card.active { border-color: var(--color-accent); background: rgba(99,102,241,0.04); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.view-mode-icon-wrap { width: 2.5rem; height: 2.5rem; background: rgba(99,102,241,0.10); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--color-accent); margin-bottom: 0.75rem; }
.view-mode-label { font-size: var(--text-sm); font-weight: 700; color: var(--color-primary); margin-bottom: 0.25rem; }
.view-mode-desc { font-size: var(--text-xs); color: var(--color-muted); line-height: 1.5; }
.view-mode-badge-best { display: inline-block; margin-top: 0.5rem; padding: 0.125rem 0.5rem; background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25); border-radius: var(--radius-full); font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-accent-dark); }
.view-mode-badge-mobile { display: inline-block; margin-top: 0.5rem; padding: 0.125rem 0.5rem; background: rgba(124,58,237,0.08); border: 1px solid rgba(124,58,237,0.20); border-radius: var(--radius-full); font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #7c3aed; }
.viewer-dropdowns-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-select-wrap { position: relative; }
.form-select-wrap .select-arrow { position: absolute; right: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--color-muted); pointer-events: none; }

/* Feature toggles */
.feature-cards-grid { display: flex; flex-direction: column; gap: 0.625rem; }
.feature-toggle-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.125rem; background: var(--color-bg); border: 1.5px solid var(--color-border); border-radius: var(--radius-lg); cursor: pointer; transition: all var(--duration-base) var(--ease-out); }
.feature-toggle-card:hover { border-color: rgba(99,102,241,0.30); }
.feature-toggle-card.active { border-color: rgba(99,102,241,0.40); background: rgba(99,102,241,0.03); }
.feature-toggle-left { display: flex; align-items: center; gap: 0.875rem; flex: 1; min-width: 0; }
.feature-toggle-icon { width: 2rem; height: 2rem; background: rgba(99,102,241,0.10); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--color-accent); flex-shrink: 0; }
.feature-toggle-title { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: 0.1875rem; }
.feature-toggle-desc { font-size: var(--text-xs); color: var(--color-muted); line-height: 1.4; }
.toggle-track {
  width: 2.75rem;
  height: 1.5rem;
  background: #D4D0C8;
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid rgba(10, 10, 10, 0.06);
}
.feature-toggle-card.active .toggle-track,
.toggle-track.active-track {
  background: var(--color-brand);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.toggle-thumb {
  position: absolute;
  top: 50%;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: -0.5625rem;
  background: var(--color-surface);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: transform var(--duration-base) var(--ease-spring);
}
.feature-toggle-card.active .toggle-thumb,
.toggle-track.active-track .toggle-thumb {
  transform: translateX(1.25rem);
}

/* Cover upload */
.cover-upload-section { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; max-width: 320px; margin: 0 auto; }
.cover-ratio-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 700; color: var(--color-accent-dark); letter-spacing: 0.03em; }
.cover-container { position: relative; width: 100%; aspect-ratio: 9/16; border: 2px dashed var(--color-border); border-radius: var(--radius-xl); overflow: hidden; cursor: pointer; background: var(--color-bg); transition: all var(--duration-base) var(--ease-out); }
.cover-container:hover { border-color: var(--color-accent); background: rgba(99,102,241,0.03); }
.cover-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  pointer-events: none;
}
.cover-placeholder-icon { width: 3.5rem; height: 3.5rem; background: rgba(99,102,241,0.10); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--color-accent); }
.cover-placeholder-title { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); text-align: center; }
.cover-placeholder-sub { font-size: var(--text-xs); color: var(--color-muted); text-align: center; }
.cover-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.cover-preview.hidden,.cover-overlay.hidden { display: none; }
.cover-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: var(--text-sm); font-weight: 600; color: white; z-index: 3; cursor: pointer; }
.cover-tips { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.btn-random-cover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.06);
  color: var(--color-accent-dark, #4338ca);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-random-cover:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.55);
}
.btn-random-cover:active { transform: scale(0.98); }
.btn-random-cover:disabled,
.btn-random-cover.is-loading {
  opacity: 0.65;
  cursor: wait;
}
.dark .btn-random-cover {
  color: #c7d2fe;
  border-color: rgba(165, 180, 252, 0.35);
  background: rgba(99, 102, 241, 0.12);
}
.cover-tip { display: flex; align-items: flex-start; gap: 0.5rem; font-size: var(--text-xs); color: var(--color-muted); line-height: 1.5; }
.cover-tip svg { flex-shrink: 0; margin-top: 1px; color: var(--color-accent); }

/* PIN input */
.pin-input-section { display: flex; flex-direction: column; gap: 0.75rem; }
.pin-input-wrap { display: flex; flex-direction: column; gap: 0.5rem; }
.pin-input-group { display: flex; align-items: center; gap: 0.625rem; background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-lg); padding: 0.75rem 1rem; transition: border-color var(--duration-base) var(--ease-out); }
.pin-input-group:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.pin-input-group svg { color: var(--color-muted); flex-shrink: 0; }
.pin-input { flex: 1; border: none; outline: none; background: none; font-size: var(--text-xl); font-weight: 700; color: var(--color-primary); letter-spacing: 0.5em; font-family: 'Courier New',monospace; }
.pin-input::placeholder { letter-spacing: 0.3em; color: var(--color-border); }
.btn-gen-pass { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: var(--radius-sm); background: var(--color-bg); border: 1.5px solid var(--color-border); color: var(--color-muted); cursor: pointer; transition: all var(--duration-fast) var(--ease-out); flex-shrink: 0; }
.btn-gen-pass:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pin-clear-wrap { margin-top: 0.25rem; }
.pin-clear-wrap.hidden { display: none; }
.btn-clear-pin { display: inline-flex; align-items: center; gap: 0.375rem; font-size: var(--text-xs); color: var(--color-error); font-weight: 600; cursor: pointer; background: none; border: none; padding: 0; }
.pin-help { display: flex; align-items: flex-start; gap: 0.375rem; font-size: var(--text-xs); color: var(--color-muted); line-height: 1.5; }
.pin-help svg { flex-shrink: 0; margin-top: 1px; }
.info-card { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem; background: rgba(37,99,235,0.04); border: 1px solid rgba(37,99,235,0.15); border-radius: var(--radius-lg); color: var(--color-info); }
.info-card-title { font-weight: 700; font-size: var(--text-sm); margin-bottom: 0.125rem; }
.info-card-desc { font-size: var(--text-xs); color: var(--color-muted); }
.success-card { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem; background: rgba(22,163,74,0.04); border: 1px solid rgba(22,163,74,0.20); border-radius: var(--radius-lg); color: var(--color-success); }
.success-card.hidden { display: none; }
.success-card-title { font-weight: 700; font-size: var(--text-sm); margin-bottom: 0.125rem; }
.success-card-desc { font-size: var(--text-xs); color: var(--color-muted); }

/* Payment step */
.payment-summary-card { background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-xl); overflow: hidden; }
.payment-summary-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border); background: var(--color-bg); }
.payment-summary-header h3 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; color: var(--color-primary); }
.payment-summary-cover-wrap { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border); }
.payment-summary-cover { width: 60px; height: 80px; border-radius: var(--radius-md); background: var(--color-bg); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); }
.payment-cover-placeholder { color: var(--color-border); display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.payment-summary-name { font-weight: 700; font-size: var(--text-base); color: var(--color-primary); margin-bottom: 0.25rem; }
.payment-summary-meta { font-size: var(--text-xs); color: var(--color-muted); }
.payment-summary-items { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.625rem; }
.payment-summary-row { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-sm); color: var(--color-muted); }
.payment-summary-divider { height: 1px; background: var(--color-border); margin: 0.25rem 0; }
.payment-total-row { font-weight: 700; color: var(--color-primary); font-size: var(--text-base); }
.payment-total-wrap { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.payment-total-amount { font-size: var(--text-xl); font-weight: 800; color: var(--color-primary); font-family: var(--font-display); }
.payment-compare-price {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
#payment-line-price .payment-compare-price {
  margin-right: 0.35rem;
  font-size: var(--text-xs);
}
.payment-offer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.22);
}
.payment-offer-banner__badge {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border-radius: 999px;
}
.payment-offer-banner__text {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #c2410c;
}
.free-tag { font-size: var(--text-xs); font-weight: 700; color: var(--color-success); background: rgba(22,163,74,0.08); padding: 0.125rem 0.375rem; border-radius: var(--radius-full); }
.razorpay-trust { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.25rem 0; flex-wrap: wrap; }
.razorpay-trust-badge { display: flex; align-items: center; gap: 0.375rem; font-size: var(--text-xs); color: var(--color-muted); font-weight: 600; }
.payment-actions { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; }
.btn-save-draft { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.875rem 1.25rem; background: var(--color-surface); color: var(--color-primary); border-radius: var(--radius-lg); font-size: var(--text-sm); font-weight: 700; font-family: var(--font-body); border: 1.5px solid var(--color-border); cursor: pointer; transition: all var(--duration-base) var(--ease-out); }
.btn-save-draft:hover { border-color: var(--color-accent); background: rgba(99,102,241,0.06); transform: translateY(-1px); }
.btn-save-draft:disabled,.btn-pay:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-pay { display: flex; align-items: center; justify-content: center; gap: 0.625rem; width: 100%; padding: 1.0625rem 1.5rem; background: var(--gradient-gold); color: white; border-radius: var(--radius-lg); font-size: var(--text-lg); font-weight: 700; font-family: var(--font-body); border: none; cursor: pointer; box-shadow: var(--shadow-gold); transition: all var(--duration-base) var(--ease-out); }
.btn-pay:hover { box-shadow: 0 12px 40px rgba(99,102,241,0.50); transform: translateY(-2px); filter: brightness(1.05); }
.pay-note { text-align: center; font-size: var(--text-xs); color: var(--color-muted); margin-top: 0.875rem; line-height: 1.6; }

/* Upload step */
.upload-type-selector { display: flex; gap: 0.625rem; padding: 0.375rem; background: var(--color-bg); border: 1.5px solid var(--color-border); border-radius: var(--radius-lg); }
.upload-type-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6875rem 1rem; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; font-family: var(--font-body); color: var(--color-muted); background: none; border: none; cursor: pointer; transition: all var(--duration-base) var(--ease-out); }
.upload-type-btn.active { background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-sm); }
.upload-dropzone { border: 2px dashed var(--color-border); border-radius: var(--radius-xl); padding: 3.5rem 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.875rem; cursor: pointer; background: var(--color-surface); transition: all var(--duration-base) var(--ease-out); }
.upload-dropzone:hover,.upload-dropzone.drag-over { border-color: var(--color-accent); background: rgba(99,102,241,0.03); box-shadow: 0 0 0 4px rgba(99,102,241,0.08); }
.upload-dropzone-icon { color: var(--color-muted); opacity: 0.5; }
.upload-dropzone-title { font-size: var(--text-lg); font-weight: 700; color: var(--color-primary); }
.upload-dropzone-sub { font-size: var(--text-sm); color: var(--color-muted); }
.btn-browse-files { padding: 0.5625rem 1.25rem; background: var(--color-primary); color: white; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; font-family: var(--font-body); border: none; cursor: pointer; transition: all var(--duration-base) var(--ease-out); }
.btn-browse-files:hover { background: #1a1a1a; }
.upload-progress-section { background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-xl); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.upload-progress-section.hidden { display: none; }
.upload-progress-file { display: flex; align-items: center; gap: 0.875rem; }
.upload-progress-file-icon { width: 2.5rem; height: 2.5rem; background: rgba(99,102,241,0.10); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--color-accent); flex-shrink: 0; }
.upload-progress-file-name { font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); }
.upload-progress-file-size { font-size: var(--text-xs); color: var(--color-muted); }
.upload-bar-wrap { display: flex; align-items: center; gap: 0.875rem; }
.upload-bar { flex: 1; height: 6px; background: var(--color-bg); border-radius: var(--radius-full); overflow: hidden; }
.upload-bar-fill { height: 100%; background: var(--gradient-gold); border-radius: var(--radius-full); transition: width 0.3s var(--ease-out); }
.upload-percent { font-size: var(--text-xs); font-weight: 700; color: var(--color-accent-dark); min-width: 2.5rem; text-align: right; }
.upload-status { font-size: var(--text-xs); color: var(--color-muted); font-weight: 500; }
.upload-tips { display: flex; flex-direction: column; gap: 0.625rem; }
.upload-tip { display: flex; align-items: flex-start; gap: 0.5rem; font-size: var(--text-xs); color: var(--color-muted); line-height: 1.5; }
.upload-tip svg { flex-shrink: 0; margin-top: 1px; color: var(--color-accent); }
.upload-tip__text { flex: 1; min-width: 0; }
.upload-tip__text strong { font-weight: 700; color: var(--color-primary); }

/* Dashboard-parity image sort (AlbumPDFBuilder) */
.ghost-card { opacity: 0.4; filter: grayscale(1); }
.drag-active { border-color: var(--color-accent) !important; opacity: 0.85; }

/* Create wizard: disable selection & context menu except form fields */
.create-page {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.create-page input,
.create-page textarea,
.create-page select,
.create-page [contenteditable="true"],
.create-page .form-input,
.create-page .form-textarea,
.create-page .pin-input {
  -webkit-user-select: text;
  user-select: text;
}
body.ipb-is-sorting,
body.ipb-is-sorting * {
  cursor: grabbing !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
#create-page #ipb-grid {
  -webkit-user-select: none;
  user-select: none;
}
#create-page #ipb-grid .ipb-card {
  touch-action: none;
}
#create-page #ipb-grid .ipb-drag-surface {
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
#create-page #ipb-grid .ipb-card-meta,
#create-page #ipb-grid .ipb-card-meta *,
#create-page #ipb-grid .ipb-drag-hint {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
#create-page #ipb-grid .ipb-delete {
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}
#create-page #ipb-grid .ipb-sort-chosen {
  z-index: 20;
}
#create-page #ipb-grid .ipb-sort-chosen .ipb-drag-surface {
  box-shadow: 0 8px 28px rgba(10, 10, 10, 0.18);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
#create-page #ipb-grid .ipb-sort-drag {
  opacity: 0.92;
}

/* B2C upload studio (step 6) */
.b2c-upload-studio__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .b2c-upload-studio__grid { grid-template-columns: minmax(220px, 280px) 1fr; gap: 2rem; }
}
.b2c-upload-studio__heading { font-size: var(--text-base); font-weight: 700; color: var(--color-primary); margin-bottom: 0.25rem; }
.b2c-upload-studio__hint { font-size: var(--text-xs); color: var(--color-muted); line-height: 1.5; margin-bottom: 1.25rem; }
.b2c-upload-field { margin-bottom: 1.25rem; }
.b2c-upload-field__label { display: block; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-muted); margin-bottom: 0.5rem; }
.b2c-orientation-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.b2c-option-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 0.875rem 0.5rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-lg);
  cursor: pointer; transition: border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.b2c-option-card input { position: absolute; opacity: 0; pointer-events: none; }
.b2c-option-card.active { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.b2c-option-card__icon { border: 2px solid var(--color-muted); border-radius: 2px; opacity: 0.5; }
.b2c-option-card__icon--portrait { width: 1.75rem; height: 2.25rem; }
.b2c-option-card__icon--landscape { width: 2.25rem; height: 1.75rem; }
.b2c-option-card.active .b2c-option-card__icon { opacity: 1; border-color: var(--color-primary); }
.b2c-option-card__text { font-size: var(--text-xs); font-weight: 600; color: var(--color-primary); }
.b2c-quality-options { display: flex; flex-direction: column; gap: 0.375rem; }
.b2c-quality-row {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 0.625rem; row-gap: 0.125rem; align-items: center;
  padding: 0.625rem 0.75rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer;
}
.b2c-quality-row input { grid-row: 1 / span 2; }
.b2c-quality-row.active { border-color: var(--color-accent); background: rgba(99,102,241,0.04); }
.b2c-quality-row__title { font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); }
.b2c-quality-row__desc { font-size: var(--text-xs); color: var(--color-muted); grid-column: 2; }
.b2c-upload-studio__assets-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.b2c-upload-studio__assets-title { font-size: var(--text-base); font-weight: 700; color: var(--color-primary); }
.b2c-upload-count-badge {
  font-size: 0.65rem; font-weight: 700; padding: 0.125rem 0.5rem; border-radius: var(--radius-full);
  background: var(--color-bg); color: var(--color-muted); border: 1px solid var(--color-border);
}
.b2c-upload-panel.hidden { display: none; }
.b2c-pdf-dropzone {
  border: 2px dashed var(--color-border); border-radius: var(--radius-xl); min-height: 200px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--color-surface); transition: border-color var(--duration-base) var(--ease-out);
}
.b2c-pdf-dropzone:hover, .b2c-pdf-dropzone.drag-active { border-color: var(--color-accent); }
.b2c-pdf-dropzone__inner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem; text-align: center; color: var(--color-muted); }
.b2c-pdf-dropzone__title { font-weight: 700; color: var(--color-primary); font-size: var(--text-sm); }
.b2c-pdf-dropzone__sub { font-size: var(--text-xs); }
.b2c-pdf-preview { display: flex; flex-direction: column; gap: 1rem; }
.b2c-pdf-preview__thumb-wrap { position: relative; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--color-bg); max-height: 200px; }
.b2c-pdf-preview__thumb { width: 100%; max-height: 200px; object-fit: contain; display: block; }
.b2c-pdf-preview__remove {
  position: absolute; top: 0.5rem; right: 0.5rem; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-error); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.b2c-pdf-preview__name { font-weight: 700; font-size: var(--text-sm); color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b2c-pdf-preview__stats { font-size: var(--text-xs); color: var(--color-muted); margin-top: 0.25rem; }
.b2c-split-pdf { padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg); }
.b2c-split-pdf__row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; cursor: pointer; }
.b2c-split-pdf__label { font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); }
.b2c-split-pdf__help { font-size: var(--text-xs); color: var(--color-muted); line-height: 1.55; margin: 0.75rem 0 0; }
.btn-wiz-create {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; background: var(--gradient-gold); color: white; border: none; border-radius: var(--radius-lg);
  font-size: var(--text-sm); font-weight: 700; font-family: var(--font-body); cursor: pointer; box-shadow: var(--shadow-gold);
}
.btn-wiz-create:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-wiz-create.hidden { display: none; }

/* Flipbook publish success (step 6) */
#step-6.flip-success-active .step-body {
  padding: 0;
  max-width: none;
}
#step-6.flip-success-active .step-container {
  max-width: min(920px, 100%);
}

.flip-success {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 42%, #312e81 100%);
  color: #f8fafc;
  animation: flip-success-in 0.55s var(--ease-out) both;
}
@keyframes flip-success-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.flip-success__glow {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.45) 0%, transparent 68%);
  pointer-events: none;
}
.flip-success__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: clamp(1.25rem, 4vw, 2rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  align-items: center;
}
@media (max-width: 640px) {
  .flip-success__layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .flip-success__visual {
    margin: 0 auto;
  }
  .flip-success__share-row {
    grid-template-columns: 1fr;
  }
}
.flip-success__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}
.flip-success__book {
  position: relative;
  width: min(168px, 42vw);
  aspect-ratio: 3 / 4;
  border-radius: 6px 14px 14px 6px;
  box-shadow: 12px 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: perspective(800px) rotateY(-8deg);
  transition: transform 0.4s var(--ease-out);
}
.flip-success:hover .flip-success__book {
  transform: perspective(800px) rotateY(-4deg) translateY(-4px);
}
.flip-success__book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: linear-gradient(90deg, #0f172a, #334155);
  border-radius: 6px 0 0 6px;
  z-index: 2;
}
.flip-success__cover {
  position: absolute;
  inset: 0;
  left: 10px;
  border-radius: 0 14px 14px 0;
  overflow: hidden;
  background: #1e293b;
}
.flip-success__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.flip-success__cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.7);
  background: linear-gradient(160deg, #1e293b, #334155);
}
.flip-success__book-shine {
  position: absolute;
  inset: 0;
  left: 10px;
  background: linear-gradient(120deg, rgba(255,255,255,0.22) 0%, transparent 42%, transparent 100%);
  pointer-events: none;
  border-radius: 0 14px 14px 0;
}
.flip-success__live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.35);
}
.flip-success__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25);
  animation: flip-success-pulse 1.8s ease-in-out infinite;
}
@keyframes flip-success-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.85); }
}
.flip-success__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.85);
}
.flip-success__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}
.flip-success__subtitle {
  margin: 0.625rem 0 1.25rem;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.82);
  max-width: 36rem;
}
.flip-success__link-block {
  margin-bottom: 1rem;
}
.flip-success__link-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.7);
}
.flip-success__link-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.flip-success__link-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font-size: var(--text-xs);
  font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  -webkit-user-select: all;
  user-select: all;
}
.flip-success__link-input:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.flip-success__icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.flip-success__icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(199, 210, 254, 0.4);
}
.flip-success__icon-btn--done {
  background: rgba(22, 163, 74, 0.35);
  border-color: rgba(134, 239, 172, 0.5);
  color: #bbf7d0;
}
.flip-success__share-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}
.flip-success__share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.flip-success__share-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(199, 210, 254, 0.35);
  transform: translateY(-1px);
}
.flip-success__share-btn--primary {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(165, 180, 252, 0.45);
  color: #fff;
}
.flip-success__share-btn--primary:hover {
  background: rgba(99, 102, 241, 0.5);
}
.flip-success__open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: #0f172a;
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-body);
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.flip-success__open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  color: #0f172a;
}
.flip-success__dashboard-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(199, 210, 254, 0.9);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.flip-success__dashboard-link:hover {
  color: #fff;
}
.flip-success__no-link {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  font-size: var(--text-sm);
  color: rgba(226, 232, 240, 0.85);
}
@media (max-width: 640px) {
  .flip-success__dashboard-link {
    justify-content: center;
    width: 100%;
  }
}

/* Wizard footer */
.wizard-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: var(--color-chrome);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--color-border);
  padding: 0.875rem 0;
  padding-bottom: calc(0.875rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}
.wizard-footer-inner {
  max-width: min(760px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-sizing: border-box;
}
.wizard-step-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.wizard-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.btn-wiz-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.6875rem 1rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
}
.btn-wiz-back:hover { border-color: #C8C4BC; box-shadow: var(--shadow-sm); }
.btn-wiz-back.hidden { display: none; }
.btn-wiz-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.25rem;
  background: var(--gradient-brand);
  color: white;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-gold);
  white-space: nowrap;
}
.btn-wiz-next:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(99,102,241,0.35); }
.btn-wiz-next span { white-space: nowrap; }

/* B2C Music Picker */
.b2c-music-picker { display: flex; flex-direction: column; gap: 0.875rem; }
.b2c-music-picker__label { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.b2c-music-picker__display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.b2c-music-picker__display svg { color: var(--color-accent); flex-shrink: 0; }
.b2c-music-picker__name {
  flex: 1;
  border: none;
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  outline: none;
  min-width: 0;
}
.b2c-music-picker__name::placeholder { color: var(--color-muted); }
.b2c-music-picker__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.b2c-music-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6875rem 1rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
.b2c-music-btn:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.b2c-music-btn--primary {
  background: var(--gradient-brand);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-gold);
}
.b2c-music-btn--primary:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Music library dialog */
.b2c-music-dialog {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: min(100%, 28rem);
}
.b2c-music-dialog__player {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-brand-muted);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
}
.b2c-music-dialog__play {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: none;
  background: var(--color-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out);
}
.b2c-music-dialog__play:hover { transform: scale(1.05); }
.b2c-music-dialog__player-meta { flex: 1; min-width: 0; }
.b2c-music-dialog__now {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b2c-music-dialog__progress-track {
  height: 4px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.b2c-music-dialog__progress-bar {
  height: 100%;
  width: 0;
  background: var(--color-brand);
  border-radius: var(--radius-full);
  transition: width 0.1s linear;
}
.b2c-music-dialog__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.b2c-music-dialog__empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin: 0;
}
.b2c-music-item__tools {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.b2c-music-item:hover .b2c-music-item__tools,
.b2c-music-item.is-selected .b2c-music-item__tools { opacity: 1; }
.b2c-music-item__tool {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.b2c-music-item__tool:hover {
  border-color: var(--color-brand-light);
  color: var(--color-brand);
}
.b2c-music-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.b2c-music-item:hover {
  border-color: var(--color-brand-light);
  background: var(--color-brand-muted);
}
.b2c-music-item.is-selected {
  border-color: var(--color-brand);
  background: var(--color-brand-muted);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.b2c-music-item__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}
.b2c-music-item__icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--color-brand-muted);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.b2c-music-item__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b2c-music-item__badge {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-brand);
  color: white;
  opacity: 0;
  transform: scale(0.9);
  transition: all var(--duration-fast) var(--ease-out);
}
.b2c-music-item.is-selected .b2c-music-item__badge {
  opacity: 1;
  transform: scale(1);
}
.required-star { color: var(--color-error); }
.form-input-xl { padding: 1rem 1.125rem; font-size: var(--text-base); }
.theme-manager-container { min-height: 80px; }
.theme-loading,.music-loading { display: flex; align-items: center; gap: 0.625rem; padding: 1.5rem; color: var(--color-muted); font-size: var(--text-sm); border: 1.5px solid var(--color-border); border-radius: var(--radius-lg); }

/* ===========================================================
   PROFILE — Account settings (premium)
   =========================================================== */
.pf-page,
.profile-page {
  min-height: 100dvh;
  padding-bottom: 4rem;
  background: var(--color-page);
}
.pf-hero,
.profile-header {
  position: relative;
  padding: 2rem 1.25rem 2.5rem;
  background: linear-gradient(145deg, #4f46e5 0%, #6366f1 45%, #818cf8 100%);
  overflow: hidden;
}
.pf-hero__mesh,
.profile-header-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 50% 70% at 100% 100%, rgba(15, 23, 42, 0.15) 0%, transparent 55%);
}
.pf-hero__inner,
.profile-header-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.pf-avatar,
.profile-avatar-wrap { flex-shrink: 0; }
.pf-avatar--editable {
  position: relative;
}
.pf-avatar__edit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--color-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
  transition: transform var(--duration-fast) var(--ease-out), background var(--duration-fast);
}
.pf-avatar__edit:hover {
  transform: scale(1.06);
  background: var(--color-brand-dark);
}
.pf-panel__body {
  padding: 1.25rem;
}
.pf-form {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pf-form__subtitle {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}
.pf-form__hint {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: -0.25rem 0 0.25rem;
  line-height: 1.5;
}
.pf-field__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pf-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}
.pf-field-row .pf-input {
  flex: 1 1 12rem;
  min-width: 0;
}
.pf-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-primary);
  background: var(--color-bg);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.pf-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.pf-btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.pf-btn--primary:hover { filter: brightness(1.05); }
.pf-btn--primary:disabled { opacity: 0.6; cursor: not-allowed; }
.pf-form-divider {
  height: 1px;
  background: var(--color-border);
  margin: 1rem 0;
}
.pf-auth-sep {
  margin: 0 0.35rem;
  color: var(--color-muted);
}
.pf-auth-pill {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-brand-dark);
  background: var(--color-brand-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}
.pf-avatar__img,
.profile-avatar-img {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}
.pf-avatar__placeholder,
.profile-avatar-placeholder {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.45);
}
.pf-name,
.profile-name {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}
.pf-email,
.profile-email {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.5rem;
}
.pf-badge,
.profile-joined {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.18);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
}
.pf-body,
.profile-content {
  max-width: 640px;
  margin: -1.25rem auto 0;
  padding: 0.75rem 1.25rem 2rem;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
/* Compact stats — single row, 3 columns */
.pf-stats-bar,
.profile-stats-grid {
  display: flex;
  align-items: stretch;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.pf-stats-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  padding: 0.75rem 0.35rem;
  min-width: 0;
  text-align: center;
}
.pf-stats-bar__divider {
  width: 1px;
  background: var(--color-border);
  flex-shrink: 0;
  margin: 0.5rem 0;
}
.pf-stats-bar__value,
.profile-stat-number {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.pf-stats-bar__label,
.profile-stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
/* Legacy stat cards (unused) */
.pf-stat,
.profile-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.pf-panel,
.profile-section-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.pf-panel__head,
.profile-section-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-input-bg);
}
.pf-panel__icon,
.profile-section-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  background: var(--color-brand-muted);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pf-panel__title,
.profile-section-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}
.pf-rows,
.profile-info-rows { margin: 0; padding: 0; }
.pf-row,
.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.pf-row:last-child,
.profile-info-row:last-child { border-bottom: none; }
.pf-row__label,
.profile-info-label {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: 500;
  margin: 0;
}
.pf-row__value,
.profile-info-value {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 600;
  text-align: right;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-google,
.profile-google-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.pf-links,
.profile-quick-actions { display: flex; flex-direction: column; }
.pf-link,
.profile-action-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out);
}
.pf-link:last-child,
.profile-action-card:last-child { border-bottom: none; }
.pf-link:hover,
.profile-action-card:hover { background: #f8fafc; }
.pf-link__icon,
.profile-action-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--color-brand-muted);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pf-link__icon--brand,
.profile-action-icon-gold {
  background: var(--gradient-brand);
  color: #fff;
}
.pf-link__text,
.profile-action-text { flex: 1; min-width: 0; }
.pf-link__title,
.profile-action-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
}
.pf-link__desc,
.profile-action-desc {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 0.125rem;
}
.pf-link__chev { flex-shrink: 0; color: var(--color-muted); }
.pf-panel--danger { border-color: rgba(220, 38, 38, 0.2); }
.pf-signout,
.btn-sign-out {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--color-error);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}
.pf-signout:hover,
.btn-sign-out:hover { background: rgba(220, 38, 38, 0.06); }

.pf-panel--danger { border-color: rgba(220, 38, 38, 0.25); }
.pf-panel__icon--danger { background: rgba(220, 38, 38, 0.1); color: var(--color-error); }
.pf-delete-body { padding: 1.25rem; }
.pf-delete-lead {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0 0 0.75rem;
}
.pf-delete-list {
  margin: 0 0 0.75rem;
  padding-left: 1.125rem;
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.65;
}
.pf-delete-list li { margin-bottom: 0.35rem; }
.pf-delete-note {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.pf-delete-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.pf-delete-btn:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: #dc2626;
}
.pf-delete-dialog-msg { margin: 0 0 0.75rem; font-size: var(--text-sm); line-height: 1.55; }
.pf-delete-dialog-list {
  margin: 0 0 0.75rem;
  padding-left: 1.125rem;
  font-size: var(--text-sm);
  line-height: 1.55;
  text-align: left;
}
.pf-delete-dialog-warn {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #dc2626;
}


/* ===========================================================
   MISC
   =========================================================== */
.spinner { width: 1.25rem; height: 1.25rem; border: 2px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
.spinner-sm { width: 1rem; height: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal,.reveal-left,.reveal-right,.reveal-scale { opacity: 0; transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal      { transform: translateY(24px); }
.reveal-left  { transform: translateX(-24px); }
.reveal-right { transform: translateX(24px); }
.reveal-scale { transform: scale(0.95); }
.reveal.reveal-visible,.reveal-left.reveal-visible,.reveal-right.reveal-visible,.reveal-scale.reveal-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.45s; }

@keyframes pulse  { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.6; transform:scale(0.85); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.error-state { grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4rem 1.5rem; gap: 0.875rem; color: var(--color-muted); }
.error-state h3 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; color: var(--color-primary); }
.btn-retry { padding: 0.5625rem 1.25rem; background: var(--gradient-brand); color: #fff; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; font-family: var(--font-body); border: none; cursor: pointer; transition: all var(--duration-base) var(--ease-out); }
.btn-retry:hover { filter: brightness(1.05); }
.hidden { display: none !important; }

/* ===========================================================
   MOBILE
   =========================================================== */
@media (max-width: 768px) {
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat-divider:nth-child(4) { display: none; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card-large { grid-column: span 1; }
  .viewer-modes-grid { grid-template-columns: repeat(2,1fr); }
  .trust-badges-grid { grid-template-columns: repeat(2,1fr); }
  .landing-footer-inner { grid-template-columns: 1fr; gap: 1.25rem; text-align: center; }
  .footer-links { justify-content: center; }
  .auth-v2 { grid-template-columns: 1fr; }
  .auth-v2__stage {
    min-height: 42vh;
    padding: 1.5rem 1.25rem 1.25rem;
    align-items: center;
    text-align: center;
  }
  .auth-v2__brand { width: 100%; }
  .auth-v2__tagline { margin-left: auto; margin-right: auto; }
  .auth-v2__showcase { min-height: 200px; padding: 0.25rem 0 0.5rem; }
  .auth-v2__scene { padding: 0 1.25rem; }
  .auth-v2__scene { width: min(260px, 100%); }
  .auth-v2__book-wrap { width: 168px; height: 224px; }
  .auth-v2__float--music { top: 4%; right: -10%; }
  .auth-v2__float--share { bottom: 10%; left: -6%; }
  .auth-v2__main { padding: 2.75rem 1.25rem 2rem; }
  .auth-v2__mobile-tag { display: block; }
  .albums-grid,
  .albums-grid--list { grid-template-columns: 1fr; gap: 1rem; }
  .view-mode-grid { grid-template-columns: 1fr; }
  .viewer-dropdowns-grid { grid-template-columns: 1fr; }
  .pf-stats-bar__value,
  .profile-stat-number { font-size: 1.125rem; }
  .pf-hero__inner,
  .profile-header-inner { flex-direction: column; text-align: center; gap: 1rem; }
  .fab-create { display: flex; }
  .hero-headline { font-size: var(--text-5xl); }
  .section-title { font-size: var(--text-4xl); }
  .pricing-number { font-size: var(--text-5xl); }
  .final-cta-title { font-size: var(--text-4xl); }
  .dash-cta span,
  .btn-create-flipbook span { display: none; }
  .dash-cta,
  .btn-create-flipbook { padding: 0.75rem; border-radius: 50%; aspect-ratio: 1; }
  .dash-hero__inner { align-items: center; }
}
@media (max-width: 480px) {
  .albums-grid,
  .albums-grid--list { grid-template-columns: 1fr; gap: 0.875rem; }
  .viewer-modes-grid { grid-template-columns: 1fr 1fr; }
  .trust-badges-grid { grid-template-columns: 1fr 1fr; }
  .stat-divider { display: none; }
  .pf-stats-bar__item { padding: 0.625rem 0.25rem; }
  .pf-stats-bar__label,
  .profile-stat-label { font-size: 0.5625rem; }
}

/* ===========================================================
   LANDING PAGE v2
   =========================================================== */
.lp {
  width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}
#how,
#features,
#branding,
#pricing,
.lp-section[id] {
  scroll-margin-top: calc(var(--nav-offset) + 1rem);
}
.lp-hero {
  position: relative;
  padding: 2rem 1.25rem 3.5rem;
  text-align: center;
  overflow: hidden;
}
/* Hide hero until GSAP sets initial state (prevents pill/accent flash) */
.lp-hero--await .lp-pill,
.lp-hero--await .lp-title__line,
.lp-hero--await .lp-title__accent,
.lp-hero--await .lp-lead,
.lp-hero--await .lp-cta,
.lp-hero--await .lp-trust,
.lp-hero--await .lp-showcase,
.lp-hero--await .lp-device__pages,
.lp-hero--await .lp-device__meta {
  opacity: 0;
  visibility: hidden;
}
.lp-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: 50% 20%;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 50%, rgba(129, 140, 248, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
}
.lp-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.lp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  background: var(--color-brand-muted);
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-brand-dark);
}
.lp-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-brand);
  animation: pulse 2s ease-in-out infinite;
}
.lp-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--color-primary);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}
.lp-title__line {
  display: block;
}
.lp-title__accent,
.lp-title em {
  display: block;
  font-style: normal;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-lead {
  font-size: var(--text-lg);
  color: var(--color-muted);
  line-height: 1.65;
  max-width: 520px;
  margin: 0;
}
.lp-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
  margin-top: 0.5rem;
}
.lp-cta .lp-btn-primary {
  width: 100%;
  box-sizing: border-box;
}
.navbar-signin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-weight: 600;
}
.lp-cta-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  width: 100%;
}
.lp-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6875rem 0.75rem;
  min-height: 2.75rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.lp-btn-secondary:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: var(--color-brand-muted);
  color: var(--color-brand-dark);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}
.lp-btn-secondary--demo {
  background: linear-gradient(180deg, #fff 0%, #f5f3ff 100%);
  border-color: rgba(99, 102, 241, 0.3);
}
.lp-btn-secondary__ext {
  opacity: 0.45;
  margin-left: -0.125rem;
}
@media (max-width: 380px) {
  .lp-cta-split {
    grid-template-columns: 1fr;
  }
  .lp-btn-secondary {
    width: 100%;
  }
}
.lp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9375rem 1.75rem;
  background: var(--gradient-brand);
  color: white;
  font-weight: 700;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: var(--shadow-gold);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.lp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(99, 102, 241, 0.4);
}
.lp-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-weight: 500;
}
.lp-trust span { display: inline-flex; align-items: center; gap: 0.35rem; }
.lp-showcase {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  max-width: 340px;
  width: 100%;
  perspective: 1200px;
  perspective-origin: 50% 40%;
}
.lp-device {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 1.25rem;
  padding: 0.75rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  will-change: transform;
  backface-visibility: hidden;
}
.lp-device__screen {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #1e1b4b;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  text-align: left;
}
.lp-device__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.lp-device__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(15, 23, 42, 0.35) 45%,
    rgba(15, 23, 42, 0.88) 100%
  );
  pointer-events: none;
}
.lp-device__pages {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 48px;
  height: 64px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px 8px 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: rotate(6deg);
}
.lp-device__meta {
  position: relative;
  z-index: 2;
}
.lp-device__label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(199, 210, 254, 0.9);
  font-weight: 600;
}
.lp-device__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-top: 0.25rem;
}
.lp-marquee {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-page);
  overflow: hidden;
}
.lp-marquee__track {
  display: flex;
  gap: 2.5rem;
  animation: lpMarquee 28s linear infinite;
  width: max-content;
}
.lp-marquee__item {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
}
@keyframes lpMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.lp-section { padding: 4rem 1.25rem; }
.lp-section--alt { background: var(--color-page); }
.lp-wrap { max-width: 1080px; margin: 0 auto; }
.lp-head { text-align: center; max-width: 560px; margin: 0 auto 2.5rem; }
.lp-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}
.lp-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  margin: 0 0 0.75rem;
}
.lp-sub {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.65;
  margin: 0;
}
.lp-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) { .lp-steps { grid-template-columns: repeat(3, 1fr); } }
.lp-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.lp-step__num {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--color-brand-muted);
  color: var(--color-brand);
  font-weight: 800;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-step h3 { font-size: var(--text-base); font-weight: 700; margin: 0 0 0.5rem; color: var(--color-primary); }
.lp-step p { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.55; margin: 0; }
.lp-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .lp-bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .lp-bento { grid-template-columns: repeat(12, 1fr); }
  .lp-bento__card--wide { grid-column: span 7; }
  .lp-bento__card--tall { grid-column: span 5; grid-row: span 2; }
  .lp-bento__card--half { grid-column: span 6; }
}
.lp-bento__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.lp-bento__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--color-brand-muted);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.lp-bento__card h3 { font-size: var(--text-lg); font-weight: 700; margin: 0 0 0.5rem; color: var(--color-primary); }
.lp-bento__card p { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.55; margin: 0; }
.lp-bento__card--brand {
  border-color: rgba(201, 169, 110, 0.35);
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.06) 0%, var(--color-surface) 55%);
}
.lp-bento__link {
  display: inline-block;
  margin-top: 0.875rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-brand);
  text-decoration: none;
}
.lp-bento__link:hover { text-decoration: underline; }

/* Branding spotlight */
.lp-branding-spotlight {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .lp-branding-spotlight { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
}
.lp-branding-spotlight__lead { text-align: left; max-width: none; margin-bottom: 1.25rem; }
.lp-branding-spotlight__list { margin-bottom: 1.5rem; }
.lp-branding-spotlight__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.lp-branding-spotlight__price {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: 600;
}
.lp-branding-mock {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}
.lp-branding-mock__bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}
.lp-branding-mock__logo {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-brand) 0%, #e8d5a8 100%);
  flex-shrink: 0;
}
.lp-branding-mock__name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
}
.lp-branding-mock__book {
  position: relative;
  height: 9rem;
  margin: 0 auto 0.75rem;
  max-width: 11rem;
}
.lp-branding-mock__page {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #fff 0%, #f3f4f6 100%);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.lp-branding-mock__page--flip {
  transform: rotateY(-18deg) translateX(12px);
  transform-origin: left center;
  opacity: 0.92;
}
.lp-branding-mock__caption {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
  line-height: 1.5;
}

.lp-pricing-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 880px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .lp-pricing-grid { grid-template-columns: 1fr 1fr; align-items: stretch; }
}
.lp-pricing {
  max-width: none;
  margin: 0;
  background: var(--color-surface);
  border: 2px solid var(--color-brand);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-gold);
  display: flex;
  flex-direction: column;
}
.lp-pricing--addon {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.lp-pricing__label {
  margin: 0 0 0.5rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.lp-pricing__badge {
  display: inline-block;
  margin: 0 auto 0.75rem;
  padding: 0.25rem 0.625rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-brand-dark);
  background: rgba(201, 169, 110, 0.15);
  border-radius: 999px;
}
.lp-pricing__badge--sale {
  color: #9a3412;
  background: rgba(249, 115, 22, 0.14);
}
.lp-pricing__addon-cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}
.lp-pricing__headline {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.lp-price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}
.lp-price small { font-size: 1.25rem; font-weight: 600; }
.lp-price-offer {
  margin: 0.25rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.lp-price-offer__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border-radius: 999px;
}
.lp-price-offer__row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.lp-price-offer__compare {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.85;
}
.lp-price-offer .lp-price {
  font-size: clamp(2.25rem, 6vw, 3rem);
}
.lp-price-offer__note {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c2410c;
}
.lp-price-note { font-size: var(--text-sm); color: var(--color-muted); margin: 0.5rem 0 1.25rem; }
.lp-list {
  list-style: none;
  text-align: left;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.lp-list li {
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.lp-list li svg { flex-shrink: 0; color: var(--color-brand); margin-top: 2px; }
.lp-cta-band {
  padding: 4rem 1.25rem;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
  text-align: center;
  color: #fff;
}
.lp-cta-band .lp-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.lp-cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.lp-cta-band p {
  margin: 0 0 1.5rem;
  font-size: var(--text-base);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}
.lp-cta-band__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
}
.lp-cta-band__actions .lp-btn-primary,
.lp-cta-band__actions .lp-btn-secondary {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}
@media (min-width: 480px) {
  .lp-cta-band__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    max-width: none;
  }
  .lp-cta-band__actions .lp-btn-primary,
  .lp-cta-band__actions .lp-btn-secondary {
    width: auto;
    min-width: 11rem;
  }
}
.lp-btn-secondary--on-dark {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.lp-btn-secondary--on-dark:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.lp-cta-band .lp-btn-primary {
  background: var(--color-surface);
  color: var(--color-brand-dark);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.lp-cta-band .lp-btn-primary:hover {
  background: #f8fafc;
  color: #4338ca;
}
.lp-footer {
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.lp-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}
.lp-footer__links a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
}
.lp-footer__links a:hover { color: var(--color-brand); }
.lp-footer__copy { font-size: var(--text-xs); color: var(--color-muted); margin: 0; }
/* GSAP controls landing motion; keep reveals visible if GSAP is unavailable */
.lp-reveal { opacity: 1; transform: none; }
.lp.gsap-ready .lp-reveal { opacity: 1; transform: none; }
.lp.gsap-ready [data-lp-animate] {
  will-change: transform, opacity;
}
@media (min-width: 768px) {
  .lp-showcase { margin-left: auto; margin-right: auto; }
}

/* ── Custom branding (B2C) ───────────────────────────────────────── */
.branding-page { padding-bottom: 4rem; }
.branding-hero {
  padding: 1.25rem 2rem;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
}
.branding-hero__inner { max-width: 42rem; margin: 0 auto; }
.branding-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-decoration: none;
  margin-bottom: 1rem;
}
.branding-back:hover { color: var(--color-brand); }
.branding-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
}
.branding-hero__desc { color: var(--color-muted); margin: 0; line-height: 1.6; }
.branding-body { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem; }
.branding-loading { text-align: center; padding: 3rem; }
.branding-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.branding-purchase__card { text-align: center; }
.branding-purchase__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.branding-purchase__price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1.25rem;
}
.branding-purchase__price span {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
}
.branding-purchase__features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.branding-purchase__features li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--text-sm);
  line-height: 1.45;
}
.branding-purchase__features li svg,
.branding-purchase__features li [data-lucide] {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--color-brand);
}
.branding-purchase__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
}
.branding-purchase__cta { width: 100%; margin: 0; }
.branding-purchase__cta--secondary {
  background: transparent;
  color: var(--color-brand);
  border: 2px solid rgba(99, 102, 241, 0.45);
  box-shadow: none;
}
.branding-purchase__cta--secondary:hover {
  background: rgba(99, 102, 241, 0.08);
  box-shadow: none;
  transform: translateY(-1px);
  filter: none;
}
.branding-purchase__cta--secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.branding-purchase__note { font-size: var(--text-xs); color: var(--color-muted); margin: 1rem 0 0; }
.branding-setup-banner,
.branding-active-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: var(--text-sm);
}
.branding-setup-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.branding-active-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #047857;
}
.branding-form__section { margin-bottom: 2rem; }
.branding-form__section h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 1rem;
}
.branding-form__hint { font-size: var(--text-sm); color: var(--color-muted); margin: 0 0 1rem; }
.branding-subdomain-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.branding-subdomain-row .pf-input { flex: 1; }
.branding-subdomain-suffix { font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; }
/* Logo uploaders — parity with dashboard BusinessEditView */
.branding-logo-grid {
  background-color: #f3f4f6;
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.branding-logos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 32rem;
}
.branding-logo-field__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}
.branding-required {
  color: #ef4444;
  font-weight: 700;
}
.branding-logo-container {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.branding-logo-container:hover {
  border-color: #9ca3af;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.branding-logo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}
.branding-logo-placeholder__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  margin-bottom: 0.75rem;
  transition: transform 0.2s, color 0.2s;
}
.branding-logo-container:hover .branding-logo-placeholder__icon {
  color: #6b7280;
  transform: scale(1.08);
}
.branding-logo-placeholder__title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}
.branding-logo-placeholder__hint {
  font-size: 0.625rem;
  color: var(--color-muted);
  margin: 0.25rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.branding-logo-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  z-index: 10;
  transition: transform 0.5s ease;
}
.branding-logo-container:hover .branding-logo-preview-img {
  transform: scale(1.05);
}
.branding-logo-actions {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  opacity: 1;
  transition: opacity 0.2s;
}
@media (min-width: 768px) {
  .branding-logo-actions { opacity: 0; }
  .branding-logo-container:hover .branding-logo-actions { opacity: 1; }
}
.branding-logo-change {
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.branding-logo-change i {
  width: 0.75rem;
  height: 0.75rem;
}
.branding-form__actions { margin-top: 1.5rem; }

/* Social profiles */
.branding-social-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.branding-social-head h2 { margin: 0; }
.branding-social-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.375rem;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-brand-dark);
  background: rgba(201, 169, 110, 0.18);
  border-radius: 999px;
}
.branding-social-quick-wrap {
  position: relative;
  margin: 1rem 0 1.25rem;
}
.branding-social-quick {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0;
}
.branding-social-quick::-webkit-scrollbar { display: none; }
.branding-social-quick-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}
.branding-social-quick-wrap.is-scrollable .branding-social-quick-fade { opacity: 1; }
.branding-social-quick-wrap.is-at-start .branding-social-quick-fade--left { opacity: 0; }
.branding-social-quick-wrap.is-at-end .branding-social-quick-fade--right { opacity: 0; }
.branding-social-quick-fade--left {
  left: 0;
  background: linear-gradient(to right, var(--color-surface) 15%, transparent 100%);
}
.branding-social-quick-fade--right {
  right: 0;
  background: linear-gradient(to left, var(--color-surface) 15%, transparent 100%);
}
.branding-social-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.branding-social-chip:hover {
  border-color: rgba(201, 169, 110, 0.45);
  background: rgba(201, 169, 110, 0.06);
}
.branding-social-chip.is-added {
  border-color: rgba(201, 169, 110, 0.55);
  background: rgba(201, 169, 110, 0.1);
  color: var(--color-brand-dark);
}
.branding-social-chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
}
.branding-social-chip__icon i,
.branding-social-chip__check i { width: 1rem; height: 1rem; }
.branding-social-chip__icon svg,
.branding-social-card__icon svg { width: 1rem; height: 1rem; display: block; }
.branding-social-chip__check {
  display: flex;
  color: var(--color-brand);
}
.branding-social-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.branding-social-card {
  padding: 0.875rem;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}
.branding-social-card.is-removing {
  opacity: 0;
  transform: translateY(-6px);
}
.branding-social-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}
.branding-social-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}
.branding-social-card__icon i { width: 1.125rem; height: 1.125rem; }
.branding-social-card__icon--instagram { background: rgba(225, 48, 108, 0.12); color: #e1306c; }
.branding-social-card__icon--facebook { background: rgba(24, 119, 242, 0.12); color: #1877f2; }
.branding-social-card__icon--x { background: rgba(15, 20, 25, 0.1); color: #0f1419; }
.branding-social-card__icon--youtube { background: rgba(255, 0, 0, 0.1); color: #ff0000; }
.branding-social-card__icon--linkedin { background: rgba(10, 102, 194, 0.12); color: #0a66c2; }
.branding-social-card__icon--tiktok { background: rgba(0, 0, 0, 0.08); color: #111; }
.branding-social-card__icon--website { background: rgba(201, 169, 110, 0.15); color: var(--color-brand-dark); }
.branding-social-card__meta { flex: 1; min-width: 0; }
.branding-social-card__name {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
}
.branding-social-card__hint {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 0.125rem;
}
.branding-social-card__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.branding-social-card__remove:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}
.branding-social-card__remove i { width: 1rem; height: 1rem; }
.branding-social-card__input { width: 100%; }
.branding-social-card__input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.branding-social-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-muted);
}
.branding-social-empty[hidden] { display: none; }
.branding-social-empty__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
}
.branding-social-empty__icon i { width: 1.25rem; height: 1.25rem; }
.branding-social-empty p { margin: 0; font-size: var(--text-sm); }

.branding-form .branding-iti,
.branding-form .iti {
  width: 100%;
  display: block;
  margin-bottom: 0.25rem;
}
.branding-form .iti .branding-phone-input,
.branding-form .iti input[type="tel"] {
  width: 100%;
  padding-left: 3.25rem;
}
.branding-form .iti__country-list {
  z-index: 10050;
}
.branding-upsell {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.05);
}
.branding-upsell--active {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
  font-size: var(--text-sm);
  color: #047857;
}
.branding-upsell__body { flex: 1; min-width: 0; }
.branding-upsell__body strong { display: block; margin-bottom: 0.25rem; }
.branding-upsell__body p { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.branding-upsell__cta { flex-shrink: 0; }
.branding-upsell__link { margin-left: auto; font-weight: 600; color: var(--color-brand); text-decoration: none; font-size: var(--text-sm); }

/* ===========================================================
   FLIPICK NATIVE ANDROID APP — layout fixes
   WebView uses decorFitsSystemWindows (system handles status bar).
   Do NOT add extra top inset here — prevents double-gap above navbar.
   =========================================================== */
html.flipick-native-app {
  --flipick-safe-top: 0px !important;
  --flipick-safe-bottom: 0px !important;
  --nav-offset: var(--navbar-height) !important;
}

html.flipick-native-app body {
  padding-top: 0 !important;
}

html.flipick-native-app #app-navbar,
html.flipick-native-app .navbar {
  position: sticky !important;
  top: 0 !important;
  padding-top: 0 !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  height: var(--navbar-height) !important;
  min-height: var(--navbar-height) !important;
  max-height: var(--navbar-height) !important;
  box-sizing: border-box !important;
}

html.flipick-native-app:has(.create-page) .create-header {
  top: var(--nav-offset) !important;
  z-index: var(--z-raised);
}

html.flipick-native-app:has(.create-page) .create-main {
  padding-top: 0 !important;
}

html.flipick-native-app .create-main,
html.flipick-native-app #app-root {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

html.flipick-native-app .fab-create {
  bottom: calc(1rem + var(--flipick-safe-bottom));
}

/* -- Gallery designer ------------------------------------------- */
.b2c-upload-studio--gallery .b2c-upload-studio__grid {
  grid-template-columns: 1fr;
}
.b2c-gallery-mount { width: 100%; }
.gal-designer { display: flex; flex-direction: column; gap: 1.25rem; }
.gal-hero { margin-bottom: 0.25rem; }
.gal-title { font-size: var(--text-lg); font-weight: 700; color: var(--color-primary); margin: 0 0 0.35rem; }
.gal-desc { font-size: var(--text-sm); color: var(--color-muted); margin: 0; line-height: 1.5; }
.gal-setup-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .gal-setup-grid { grid-template-columns: 1.2fr 1fr; }
}
.gal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.gal-card__title { font-size: var(--text-sm); font-weight: 700; margin: 0; color: var(--color-primary); }
.gal-card__hint { font-size: var(--text-xs); color: var(--color-muted); margin: 0; }
.gal-field { display: flex; flex-direction: column; gap: 0.35rem; font-size: var(--text-sm); color: var(--color-text); }
.gal-field input {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  font: inherit;
  background: var(--color-bg);
  color: var(--color-text);
}
.gal-field small { color: var(--color-muted); font-size: var(--text-xs); }
.gal-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.gal-meta { font-size: var(--text-xs); color: var(--color-muted); margin: 0; }
.gal-thumb-strip {
  display: flex; flex-wrap: wrap; gap: 0.5rem; max-height: 160px; overflow: auto;
}
.gal-thumb {
  position: relative; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--color-border);
}
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-thumb__rm {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border: none;
  border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff; font-size: 12px; line-height: 1;
  cursor: pointer; padding: 0;
}
.gal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }
.gal-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border-radius: var(--radius-md); padding: 0.65rem 1.1rem; font-size: var(--text-sm);
  font-weight: 600; font-family: var(--font-body); border: 1px solid transparent; cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.gal-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.gal-btn--primary { background: var(--color-accent, #6366f1); color: #fff; }
.gal-btn--primary:hover:not(:disabled) { filter: brightness(1.05); }
.gal-btn--ready {
  background: #059669 !important;
  opacity: 1 !important;
  cursor: default !important;
}
.gal-ready-banner {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #ecfdf5;
  color: #065f46;
  font-size: var(--text-sm);
  text-align: center;
}
.gal-ready-banner.hidden { display: none; }
.gal-btn--ghost {
  background: var(--color-surface); color: var(--color-text); border-color: var(--color-border);
}
.gal-btn--ghost:hover:not(:disabled) { border-color: var(--color-muted); }
.gal-btn--active {
  border-color: var(--color-accent, #6366f1);
  color: var(--color-accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.gal-btn--sm { padding: 0.4rem 0.75rem; font-size: var(--text-xs); }

.gal-singles-grid { display: grid; gap: 1rem; }
@media (min-width: 800px) {
  .gal-singles-grid { grid-template-columns: repeat(3, 1fr); }
}
.gal-single-actions {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.gal-picker-toolbar {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem;
}
.gal-single-preview {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #f3f3f3;
  cursor: zoom-in;
  line-height: 0;
}
.gal-single-canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}
.gal-single-tip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.4rem 0.5rem;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.gal-preview-bar {
  display: none;
}
.gal-preview-label {
  min-width: 0;
  flex: 1 1 auto;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-primary);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gal-canvas-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.7rem;
  padding: 0.65rem;
  margin-top: 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}
.gal-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.gal-toolbar-group--page {
  flex: 1 1 230px;
  justify-content: flex-start;
  min-width: 0;
}
.gal-toolbar-group--zoom {
  flex: 0 0 auto;
  justify-content: center;
}
.gal-toolbar-group--zoom.hidden {
  display: none;
}
.gal-toolbar-group--actions {
  flex: 2 1 420px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 0.4rem;
  justify-content: stretch;
}
@media (min-width: 860px) {
  .gal-canvas-toolbar {
    padding: 0.7rem 0.8rem;
  }
  .gal-canvas-toolbar .gal-hint {
    flex-basis: 100%;
  }
}
@media (max-width: 560px) {
  .gal-canvas-toolbar {
    padding: 0.55rem;
  }
  .gal-toolbar-group--page,
  .gal-toolbar-group--actions {
    flex-basis: 100%;
  }
  .gal-toolbar-group--actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.gal-preview-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}
@media (min-width: 980px) {
  .gal-preview-workspace { grid-template-columns: minmax(0, 1fr); }
}
.gal-preview-stage {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  height: 480px;
  max-height: min(52vh, 480px);
  min-height: 280px;
  padding: 0.75rem;
  background: #eceae6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-sizing: border-box;
  overscroll-behavior: contain;
}
.gal-preview-stage-shell {
  position: relative;
}
.gal-canvas-footer-nav {
  display: grid;
  grid-template-columns: auto auto minmax(8rem, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.gal-preview-stage.is-zoomed {
  justify-content: flex-start;
  align-items: flex-start;
  overflow: auto;
}
.gal-preview-canvas {
  display: block; max-width: 100%; max-height: 100%;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  user-select: none;
}
.gal-preview-stage.is-zoomed .gal-preview-canvas {
  max-width: none;
  max-height: none;
}
.gal-preview-stage:has(.gal-preview-canvas.is-layout-editing),
.gal-preview-canvas.is-layout-editing {
  touch-action: none;
}
html.flipick-native-app .gal-preview-stage,
html.flipick-native-app .gal-preview-canvas.is-layout-editing {
  touch-action: none !important;
  overscroll-behavior: contain;
}
.gal-preview-canvas.is-layout-dragging { cursor: grabbing !important; }
.gal-page-float {
  display: none;
}
.gal-page-float:disabled { opacity: 0.28; cursor: not-allowed; }
.gal-page-float--prev { left: 0.55rem; }
.gal-page-float--next { right: 0.55rem; }
.gal-zoom-chip {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 5;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.76);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}
.gal-zoom-chip.hidden { display: none; }
.gal-help-modal.hidden { display: none; }
.gal-help-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
}
.gal-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}
.gal-help-sheet {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  max-height: min(86vh, 720px);
  margin: 7vh auto;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}
.gal-help-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.gal-help-head h4 {
  margin: 0;
  color: var(--color-primary);
  font-size: var(--text-lg);
}
.gal-help-head p {
  margin: 0.2rem 0 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.gal-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
}
.gal-help-grid article {
  display: grid;
  gap: 0.22rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.gal-help-grid strong {
  color: var(--color-primary);
  font-size: var(--text-sm);
}
.gal-help-grid span {
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1.45;
}
@media (max-width: 560px) {
  .gal-canvas-footer-nav {
    grid-template-columns: 1fr 1fr;
  }
  .gal-canvas-footer-nav .gal-preview-label {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .gal-help-sheet {
    margin: 4vh auto;
    max-height: 92vh;
  }
}
.gal-settings-bar {
  gap: 0.5rem;
}
.gal-settings-bar__fields {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 0.75rem;
}
.gal-field--inline {
  flex-direction: row; align-items: center; gap: 0.4rem;
}
.gal-field--inline span {
  font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap;
}
.gal-field--inline input {
  width: 4.5rem; padding: 0.4rem 0.5rem;
}
.gal-field-row--spread {
  grid-template-columns: 1fr auto; align-items: center;
}
.gal-preview-tools {
  display: none;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
@media (min-width: 760px) {
  .gal-preview-tools {
    grid-template-columns: repeat(5, auto) minmax(150px, 1fr);
  }
}
.gal-preview-tools > .gal-btn,
.gal-tool-btn {
  min-height: 36px;
  padding: 0.45rem 0.64rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: 800;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gal-preview-tools > .gal-btn:hover:not(:disabled),
.gal-tool-btn:hover:not(:disabled) {
  border-color: var(--color-muted);
  background: var(--color-surface);
}
.gal-preview-tools > .gal-btn[data-gal="layout-edit"].gal-btn--active,
.gal-tool-btn.is-active {
  border-color: var(--color-accent, #6366f1);
  color: var(--color-accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.gal-preview-tools > .gal-btn:disabled,
.gal-tool-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.gal-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.gal-zoom-controls.hidden { display: none; }
.gal-zoom-controls [data-gal="zoom-label"] {
  min-width: 44px;
  text-align: center;
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 800;
}
.gal-tool-btn--icon {
  width: 32px;
  min-width: 32px;
  padding-left: 0;
  padding-right: 0;
}
.gal-layer-panel--legacy {
  display: none;
}
.gal-layer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 89;
  display: none;
  background: rgba(15, 23, 42, 0.28);
}
.gal-layer-backdrop.is-open {
  display: block;
}
.gal-layer-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  width: min(380px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: max(0.9rem, env(safe-area-inset-top)) 0.75rem max(0.9rem, env(safe-area-inset-bottom));
  border-left: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: -18px 0 44px rgba(15, 23, 42, 0.22);
  transform: translateX(104%);
  transition: transform 180ms ease;
}
.gal-layer-drawer.is-open {
  transform: translateX(0);
}
.gal-layer-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--color-primary);
}
.gal-layer-panel {
  min-height: 120px;
  max-height: none;
  flex: 1;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: 0.65rem;
}
.gal-layer-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 800;
}
.gal-layer-panel__head small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.gal-layer-list { display: flex; flex-direction: column; gap: 0.4rem; }
.gal-layer-item {
  display: grid;
  grid-template-columns: auto 34px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}
.gal-layer-item.is-dragging { opacity: 0.55; }
.gal-layer-item.is-drop-target { border-color: var(--color-accent, #6366f1); }
.gal-layer-grip {
  color: var(--color-muted);
  font-size: 12px;
  cursor: grab;
}
.gal-layer-thumb {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  overflow: hidden;
  background:
    linear-gradient(45deg, #d7d7d7 25%, transparent 25%),
    linear-gradient(-45deg, #d7d7d7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d7d7d7 75%),
    linear-gradient(-45deg, transparent 75%, #d7d7d7 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.gal-layer-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-layer-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
}
.gal-layer-type {
  font-size: 10px;
  font-weight: 800;
  color: var(--color-muted);
}
.gal-layer-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}
.gal-layer-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.gal-layer-empty {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-xs);
}
.gal-hint { font-size: var(--text-xs); color: var(--color-muted); }
.gal-swap-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.65rem 0.85rem; border-radius: var(--radius-md);
  background: #fff7ed; color: #9a3412; font-size: var(--text-sm); font-weight: 600;
}
.gal-swap-banner.hidden { display: none; }

.gal-ctx-menu {
  position: fixed; z-index: 120;
  min-width: 200px; padding: 0.35rem;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; gap: 0.15rem;
}
.gal-ctx-menu.hidden { display: none; }
.gal-ctx-item {
  appearance: none; border: none; background: transparent; text-align: left;
  padding: 0.55rem 0.7rem; border-radius: var(--radius-sm);
  font: inherit; font-size: var(--text-sm); color: var(--color-text); cursor: pointer;
}
.gal-ctx-item:hover { background: var(--color-bg, #f3f4f6); }

.gal-mgr-sheet { width: min(720px, 94vw); max-height: 85vh; }
.gal-mgr-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.gal-mgr-head h4 { margin: 0; font-size: var(--text-base); }
.gal-mgr-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0;
}
.gal-mgr-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 0.6rem;
  max-height: 55vh; overflow: auto;
}
.gal-mgr-item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--color-border); background: #ddd; aspect-ratio: 1;
}
.gal-mgr-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-mgr-item__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.25rem 0.35rem; font-size: 10px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
}
.gal-mgr-item__rm {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border: none; border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; padding: 0;
}

.gal-photo-picker { position: fixed; inset: 0; z-index: 80; }
.gal-photo-picker.hidden { display: none; }
.gal-picker-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.gal-picker-sheet {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, 92vw); max-height: 80vh; overflow: auto;
  background: var(--color-surface); border-radius: var(--radius-lg); padding: 1rem;
  box-shadow: var(--shadow-lg);
}
.gal-picker-sheet h4 { margin: 0 0 0.75rem; font-size: var(--text-base); }
.gal-picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 0.5rem;
}
.gal-picker-grid--overlay {
  background:
    linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.04) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  padding: 0.5rem;
  border-radius: var(--radius-md);
}
.gal-picker-item {
  position: relative;
  border: none; padding: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  aspect-ratio: 1; background: #ddd;
}
.gal-picker-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-picker-item--overlay { background: rgba(255,255,255,0.55); }
.gal-picker-item--overlay img { object-fit: contain; padding: 0.35rem; box-sizing: border-box; }
.gal-picker-item.is-used img { filter: grayscale(0.35) brightness(0.72); }
.gal-picker-used {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.68);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

/* Crop editor — always viewport-safe */
.gal-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 12, 0.72);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.gal-crop-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100dvh;
}
.gal-crop-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-size: 12px;
  background: rgba(0,0,0,0.35);
}
.gal-crop-viewport {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
}
.gal-crop-stage {
  position: relative;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45);
  max-width: 100%;
  max-height: 100%;
}
.gal-crop-canvas {
  display: block;
  touch-action: none;
  cursor: grab;
  max-width: 100%;
  max-height: 100%;
}
.gal-crop-canvas:active { cursor: grabbing; }
.gal-crop-bar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  background: rgba(0,0,0,0.55);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.gal-crop-btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.gal-crop-btn--primary {
  background: #fff;
  color: #111;
}
.gal-preview-stage {
  min-height: 320px;
  max-height: min(70vh, 640px);
  overflow: hidden;
}
.gal-preview-stage.is-zoomed {
  overflow: auto;
}

.upload-type-selector { flex-wrap: wrap; }
@media (max-width: 560px) {
  .upload-type-btn { flex: 1 1 40%; font-size: 12px; padding: 0.6rem 0.5rem; }
}
