:root {
  --bg-primary: #1a0a0a;
  --bg-secondary: #2d1515;
  --bg-card: #2a1010;
  --bg-input: #3a1a1a;
  --input-readonly-bg: #2a1010;
  --border-color: #6b2d2d;
  --border-accent: #c9a84c;
  --text-primary: #f5e6d0;
  --text-secondary: #c4a882;
  --text-muted: #8b6b5a;
  --accent: #c9a84c;
  --accent-hover: #e0c06a;
  --accent-2: #8b1a1a;
  --accent-3: #4a1942;
  --gradient-1: linear-gradient(135deg, #8b1a1a 0%, #c9a84c 50%, #8b1a1a 100%);
  --gradient-hero: linear-gradient(
    160deg,
    #1a0505 0%,
    #3d0e0e 40%,
    #1a0a2e 100%
  );
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 4px 20px rgba(201, 168, 76, 0.3);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --font-heading: "Playfair Display", serif;
  --font-body: "Lato", sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 60px;
}

/* Light Theme */
body[data-theme="light"] {
  --bg-primary: #faf7f2;
  --bg-secondary: #f0ebe0;
  --bg-card: #ffffff;
  --bg-input: #f8f5ef;
  --input-readonly-bg: #eee;
  --border-color: #d4c4a8;
  --border-accent: #c9a84c;
  --text-primary: #2c1810;
  --text-secondary: #5c4033;
  --text-muted: #9b7e6a;
  --accent: #8b1a1a;
  --accent-hover: #a52020;
  --accent-2: #c9a84c;
  --gradient-hero: linear-gradient(
    160deg,
    #fdf3e7 0%,
    #f5e6d0 50%,
    #fdf0f8 100%
  );
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
}

/* Pastel Theme */
body[data-theme="pastel"] {
  --bg-primary: #fdf0f8;
  --bg-secondary: #f5e8f5;
  --bg-card: #ffffff;
  --bg-input: #fdf5ff;
  --input-readonly-bg: #f0e8f5;
  --border-color: #dbbae0;
  --border-accent: #b87dc4;
  --text-primary: #3a1a4a;
  --text-secondary: #7a4a8a;
  --text-muted: #aaa;
  --accent: #9b3db8;
  --accent-hover: #b050d0;
  --accent-2: #e88fc8;
  --gradient-hero: linear-gradient(
    160deg,
    #fff0fa 0%,
    #fde8ff 50%,
    #f0eaff 100%
  );
  --shadow-sm: 0 2px 8px rgba(150, 0, 180, 0.08);
  --shadow-md: 0 8px 24px rgba(150, 0, 180, 0.12);
}

/* Dark Theme */
body[data-theme="dark"] {
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --bg-card: #1e1e1e;
  --bg-input: #252525;
  --input-readonly-bg: #1a1a1a;
  --border-color: #333;
  --border-accent: #888;
  --text-primary: #e8e8e8;
  --text-secondary: #aaa;
  --text-muted: #666;
  --accent: #c0a060;
  --accent-hover: #d4b870;
  --accent-2: #604020;
  --gradient-hero: linear-gradient(160deg, #050505 0%, #111 50%, #0a0a15 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition:
    background 0.4s,
    color 0.4s;
  overflow-x: hidden;
}

/* Font classes */
body.font-cinzel {
  --font-heading: "Cinzel", serif;
}
body.font-dancing {
  --font-heading: "Dancing Script", cursive;
}

/* ─── Loading Screen ─── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--gradient-hero);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 16px;
}

.loading-mandala {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mandala-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0.6;
}
.ring-1 {
  width: 120px;
  height: 120px;
  animation: spin 8s linear infinite;
}
.ring-2 {
  width: 85px;
  height: 85px;
  animation: spin 5s linear infinite reverse;
  border-color: var(--accent-2);
}
.ring-3 {
  width: 55px;
  height: 55px;
  animation: spin 3s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-om {
  font-size: 32px;
  color: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.95);
  }
}

.loading-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 4px;
}
.loading-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
}

/* ─── Top Navigation ─── */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(26, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  transition: var(--transition);
}

body[data-theme="light"] .top-nav {
  background: rgba(255, 255, 255, 0.9);
}
body[data-theme="pastel"] .top-nav {
  background: rgba(253, 240, 248, 0.9);
}
body[data-theme="dark"] .top-nav {
  background: rgba(13, 13, 13, 0.95);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
}
.nav-logo {
  font-size: 1.5rem;
}
.nav-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 168, 76, 0.1);
}
.btn-icon.danger:hover {
  border-color: #e74c3c;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

/* ─── Theme Panel ─── */
.theme-panel {
  position: fixed;
  top: 70px;
  right: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 20px;
  z-index: 999;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  transition: var(--transition);
}
.theme-panel h4 {
  font-family: var(--font-heading);
  color: var(--accent);
  margin-bottom: 12px;
}
.theme-panel label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin: 12px 0 6px;
}

.theme-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.theme-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}
.theme-btn:hover,
.theme-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a0a0a;
}

#fontSelector {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.accent-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.swatch:hover,
.swatch.active {
  border-color: var(--text-primary);
  transform: scale(1.2);
}

.hidden {
  display: none !important;
}

/* ─── App Wrapper & Steps ─── */
.app-wrapper {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.step {
  display: none;
  min-height: calc(100vh - var(--nav-height));
  animation: fadeInStep 0.5s ease;
}
.step.active {
  display: block;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── STEP 1: Welcome ─── */
.welcome-bg {
  min-height: calc(100vh - var(--nav-height));
  background: var(--gradient-hero);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 40px 20px;
}

.mandala-watermark {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    transparent 30%,
    rgba(201, 168, 76, 0.05) 50%,
    transparent 70%
  );
  border: 1px solid rgba(201, 168, 76, 0.1);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: rotateSlow 30s linear infinite;
}
.mandala-watermark::before {
  content: "";
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.08);
  animation: rotateSlow 20s linear infinite reverse;
}
.mandala-watermark::after {
  content: "🪷";
  position: absolute;
  font-size: 3rem;
  opacity: 0.06;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes rotateSlow {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.welcome-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
}

.welcome-badge {
  display: inline-block;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--accent);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.welcome-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.title-deco {
  color: var(--accent);
  font-style: italic;
}
.title-sub {
  display: block;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-family: var(--font-heading);
  color: var(--text-secondary);
  letter-spacing: 8px;
  font-weight: 400;
  margin-top: 4px;
}

.welcome-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin: 20px 0 32px;
  line-height: 1.7;
  font-weight: 300;
}

.welcome-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}
.feat-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  backdrop-filter: blur(8px);
}
.feat-chip i {
  color: var(--accent);
  margin-right: 6px;
}

.welcome-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.4);
  filter: brightness(1.1);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-xl {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline:hover {
  background: rgba(201, 168, 76, 0.1);
  transform: translateY(-2px);
}

.welcome-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.welcome-note i {
  margin-right: 6px;
}

.welcome-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.1);
}
.deco-c1 {
  width: 800px;
  height: 800px;
  top: -200px;
  right: -200px;
}
.deco-c2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
}
.deco-c3 {
  width: 200px;
  height: 200px;
  top: 100px;
  left: 100px;
}

.lotus-row {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  display: flex;
  gap: 12px;
  opacity: 0.4;
  animation: floatLotus 4s ease-in-out infinite;
}
@keyframes floatLotus {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

/* ─── STEP 2: Form Wizard ─── */
.form-wizard-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px;
}

.wizard-progress-wrap {
  margin-bottom: 40px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.wizard-steps-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  overflow-x: auto;
  gap: 4px;
  padding-bottom: 8px;
}

.step-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 60px;
  transition: var(--transition);
  flex: 1;
}

.step-nav-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.step-nav-item.active .step-nav-dot {
  background: var(--gradient-1);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-gold);
  transform: scale(1.1);
}
.step-nav-item.completed .step-nav-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a0a0a;
}

.step-nav-item span {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
}
.step-nav-item.active span {
  color: var(--accent);
}

.wizard-progress-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.wizard-progress-fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.wizard-progress-label {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Form Section */
.form-section {
  display: none;
  animation: fadeInSection 0.4s ease;
}
.form-section.active {
  display: block;
}

@keyframes fadeInSection {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}
.section-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--gradient-1);
}
.section-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.req {
  color: #e74c3c;
}

.form-input {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
  background: var(--bg-secondary);
}
.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
  resize: vertical;
  min-height: 80px;
}
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

select.form-input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tooltip-hint {
  cursor: help;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.range-row span {
  color: var(--text-muted);
  white-space: nowrap;
}
.range-row .form-input {
  flex: 1;
}

.mt-8 {
  margin-top: 8px;
}

/* Chips UI */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  min-height: 60px;
}
.chip {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a0a0a;
  font-weight: 700;
}

/* Form Navigation Buttons */
.form-nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  gap: 16px;
}

/* ─── Photo Upload ─── */
.photo-upload-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.profile-upload-wrap,
.gallery-upload-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
}
.profile-upload-wrap h3,
.gallery-upload-wrap h3 {
  font-family: var(--font-heading);
  color: var(--accent);
  margin-bottom: 16px;
  font-size: 1.1rem;
}
.gallery-upload-wrap h3 small {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.profile-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-drop-zone:hover {
  border-color: var(--accent);
}
.profile-drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(201, 168, 76, 0.08);
}

.profile-photo-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drop-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
}
.drop-placeholder i {
  font-size: 2rem;
  margin-bottom: 8px;
  color: var(--accent);
  opacity: 0.5;
}
.drop-placeholder p {
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.drop-placeholder small {
  font-size: 0.75rem;
}

/* Frame styles */
.profile-photo-preview.frame-circle img {
  border-radius: 50%;
}
.profile-photo-preview.frame-rounded img {
  border-radius: 16px;
}
.profile-photo-preview.frame-traditional img {
  border-radius: 8px;
  border: 8px solid var(--accent);
  outline: 4px solid var(--accent-2);
}
.profile-photo-preview.frame-gold img {
  border-radius: 8px;
  border: 6px solid #c9a84c;
  box-shadow:
    0 0 0 2px #8b1a1a,
    0 0 0 6px #c9a84c;
}

.frame-selector {
  margin-top: 16px;
}
.frame-selector label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 8px;
}
.frame-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.frame-btn {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: var(--transition);
}
.frame-btn.active,
.frame-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 168, 76, 0.1);
}

.gallery-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  margin-bottom: 16px;
}
.gallery-drop-zone:hover {
  border-color: var(--accent);
}
.gallery-drop-zone i {
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 8px;
  display: block;
}
.gallery-drop-zone p {
  font-size: 0.85rem;
}

.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item .remove-gallery {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.7rem;
  display: none;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover .remove-gallery {
  display: flex;
}

.gallery-layout-toggle {
  display: flex;
  gap: 8px;
}
.layout-btn {
  flex: 1;
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: var(--transition);
}
.layout-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 168, 76, 0.1);
}

/* ─── STEP 3: Preview ─── */
.preview-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-height));
}

.preview-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}
.preview-sidebar h3 {
  font-family: var(--font-heading);
  color: var(--accent);
  margin-bottom: 4px;
  font-size: 1.1rem;
}
.sidebar-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.sidebar-divider {
  border-color: var(--border-color);
  margin: 16px 0;
}

.section-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.toggle-item:hover {
  background: rgba(201, 168, 76, 0.08);
}
.toggle-item input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.full-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.preview-main {
  padding: 24px;
  background: var(--bg-primary);
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.preview-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 1px;
}

.preview-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 12px;
}
.btn-icon-sm {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: var(--transition);
}
.btn-icon-sm:hover {
  color: var(--accent);
}
#zoomLevel {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: center;
}

.preview-frame-wrap {
  display: flex;
  justify-content: center;
  overflow: auto;
  padding-bottom: 40px;
}

/* ─── BIODATA PREVIEW (A4 Layout) ─── */
.preview-frame {
  width: 794px;
  min-height: 1123px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-radius: 4px;
  overflow: hidden;
  transform-origin: top center;
  transition: transform 0.3s;
  color: #2c1810;
  font-family: var(--font-body);
  position: relative;
}

/* ====== TEMPLATE: CLASSIC ====== */
.template-classic .biodata-cover {
  background: linear-gradient(135deg, #6b0e0e 0%, #8b1a1a 40%, #c9a84c 100%);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.template-classic .biodata-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.03) 10px,
    rgba(255, 255, 255, 0.03) 20px
  );
}
.template-classic .cover-name {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  color: #fff;
  font-weight: 700;
  position: relative;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.template-classic .cover-sub {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 8px;
}
.template-classic .cover-photo-wrap {
  margin: 20px auto;
  width: 140px;
  height: 140px;
}
.template-classic .divider-ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 16px 0;
}
.template-classic .divider-ornament::before,
.template-classic .divider-ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.biodata-body {
  padding: 32px;
}

.biodata-section {
  margin-bottom: 28px;
  break-inside: avoid;
}
.biodata-section-title {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 8px 16px;
  margin-bottom: 16px;
  position: relative;
}
.template-classic .biodata-section-title {
  color: #8b1a1a;
  border-left: 4px solid #c9a84c;
  border-bottom: 1px solid #f0e0c0;
  background: #fff8f0;
}

.biodata-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}
.bio-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bio-row.full {
  grid-column: 1 / -1;
}
.bio-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9b7e6a;
}
.bio-value {
  font-size: 0.9rem;
  color: #2c1810;
  font-weight: 500;
}

.bio-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Frame styles in biodata */
.photo-frame-circle .bio-photo {
  border-radius: 50%;
}
.photo-frame-rounded .bio-photo {
  border-radius: 16px;
}
.photo-frame-traditional .bio-photo {
  border-radius: 8px;
  border: 6px solid #c9a84c;
  outline: 3px solid #8b1a1a;
}
.photo-frame-gold .bio-photo {
  border-radius: 8px;
  border: 5px solid #c9a84c;
  box-shadow:
    0 0 0 2px #8b1a1a,
    0 0 0 5px #c9a84c;
}

/* ====== TEMPLATE: MODERN ====== */
.template-modern {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 1123px;
}
.template-modern .modern-sidebar {
  background: #1a1a2e;
  color: #fff;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}
.template-modern .modern-sidebar::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.1);
}
.template-modern .modern-photo {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #c9a84c;
}
.template-modern .modern-name {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  margin-bottom: 4px;
}
.template-modern .modern-title {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.template-modern .sidebar-detail {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}
.template-modern .sidebar-detail strong {
  color: #c9a84c;
  margin-bottom: 2px;
}
.template-modern .sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c9a84c;
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
  padding-bottom: 4px;
  margin: 20px 0 12px;
}

.template-modern .modern-main {
  padding: 32px;
  background: #fff;
}
.template-modern .modern-section-title {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  border-bottom: 2px solid #c9a84c;
  padding-bottom: 6px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.template-modern .modern-bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  margin-bottom: 24px;
}
.template-modern .bio-row .bio-label {
  color: #9b7e6a;
}
.template-modern .bio-row .bio-value {
  color: #2c1810;
}

/* ====== TEMPLATE: ROYAL ====== */
.template-royal {
  background: #fdfaf0;
  border: 12px solid #c9a84c;
  box-shadow: inset 0 0 0 4px #8b1a1a;
  position: relative;
}
.template-royal::before {
  content: "🪷";
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 1.5rem;
  opacity: 0.4;
}
.template-royal::after {
  content: "🪷";
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.4;
}
.template-royal .royal-header {
  background: linear-gradient(135deg, #8b1a1a, #c9a84c, #8b1a1a);
  padding: 40px;
  text-align: center;
  position: relative;
}
.template-royal .royal-crown {
  font-size: 2rem;
  margin-bottom: 8px;
}
.template-royal .royal-name {
  font-family: "Playfair Display", serif;
  font-size: 2.8rem;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.template-royal .royal-sub {
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-top: 8px;
}
.template-royal .royal-ornament {
  font-size: 1.5rem;
  text-align: center;
  margin: 16px 0;
  color: #c9a84c;
  opacity: 0.5;
}
.template-royal .royal-section-title {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: #8b1a1a;
  text-align: center;
  border-top: 2px double #c9a84c;
  border-bottom: 2px double #c9a84c;
  padding: 8px;
  margin-bottom: 16px;
  background: linear-gradient(to right, transparent, #fff8e8, transparent);
}
.template-royal .royal-photo-wrap {
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
  border: 6px solid #c9a84c;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 4px #8b1a1a,
    0 8px 24px rgba(0, 0, 0, 0.3);
}
.template-royal .royal-body {
  padding: 32px 40px;
}

/* ====== TEMPLATE: MAGAZINE ====== */
.template-magazine {
  background: #fff;
  position: relative;
}
.template-magazine .mag-hero {
  height: 340px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0a0a, #3d1515);
}
.template-magazine .mag-hero-photo {
  position: absolute;
  inset: 0;
  opacity: 0.7;
}
.template-magazine .mag-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.template-magazine .mag-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(26, 10, 10, 0.95));
  padding: 40px 40px 32px;
}
.template-magazine .mag-name {
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}
.template-magazine .mag-tag {
  display: inline-block;
  background: #c9a84c;
  color: #1a0a0a;
  font-weight: 700;
  padding: 4px 14px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.template-magazine .mag-body {
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.template-magazine .mag-section-title {
  font-family: "Playfair Display", serif;
  font-size: 0.95rem;
  color: #8b1a1a;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-left: 3px solid #c9a84c;
  padding-left: 10px;
  margin-bottom: 12px;
}

/* Chips in biodata */
.bio-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bio-chip {
  background: #f5e6d0;
  color: #8b1a1a;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}

/* Gallery in biodata */
.bio-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.bio-gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}
.bio-gallery-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.bio-gallery-carousel img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* ─── STEP 4: Templates ─── */
.templates-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}
.templates-header {
  text-align: center;
  margin-bottom: 40px;
}
.templates-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.templates-header p {
  color: var(--text-secondary);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.template-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.template-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.template-card.active {
  border-color: var(--accent);
  box-shadow: var(--shadow-gold);
}

.template-preview {
  height: 180px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.classic-preview {
  background: linear-gradient(135deg, #8b1a1a, #c9a84c);
}
.classic-preview .tp-header {
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
}
.classic-preview .tp-body {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modern-preview {
  background: #fff;
  flex-direction: row;
}
.modern-preview .tp-sidebar {
  width: 60px;
  background: #1a1a2e;
}
.modern-preview .tp-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.royal-preview {
  background: #fdfaf0;
  border: 6px solid #c9a84c;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}
.royal-preview .tp-crown {
  font-size: 2rem;
}
.royal-preview .tp-border {
  width: 80%;
  height: 2px;
  background: linear-gradient(to right, transparent, #c9a84c, transparent);
}

.magazine-preview {
  background: #fff;
  flex-direction: row;
  align-items: stretch;
}
.magazine-preview .tp-mag-photo {
  width: 80px;
  background: linear-gradient(135deg, #1a0a0a, #8b1a1a);
}
.magazine-preview .tp-mag-text {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.tp-line {
  height: 8px;
  background: rgba(139, 26, 26, 0.2);
  border-radius: 4px;
}
.tp-line.short {
  width: 60%;
}
.tp-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 auto;
}

.template-info {
  padding: 16px;
  flex: 1;
}
.template-info h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 6px;
}
.template-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.template-tags {
  display: flex;
  gap: 6px;
}
.template-tags span {
  font-size: 0.72rem;
  background: rgba(201, 168, 76, 0.15);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
}

.select-template-btn {
  margin: 0 16px 16px;
  justify-content: center;
}

.templates-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── STEP 5: Export ─── */
.export-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}
.export-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: bounce 1s ease infinite alternate;
}
@keyframes bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}
.export-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.export-header p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.export-preview-mini {
  width: 200px;
  height: 280px;
  margin: 0 auto 40px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border-accent);
  background: #fff;
}
.export-preview-mini .preview-frame {
  transform: scale(0.25);
  transform-origin: top left;
  box-shadow: none;
  pointer-events: none;
}

.export-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.export-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.export-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}
.export-card-icon {
  font-size: 2.5rem;
}
.export-card h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 1.1rem;
}
.export-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.export-card .btn-primary {
  width: 100%;
  justify-content: center;
}

.export-footer-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Crop Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 0;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover {
  color: var(--accent);
}

.crop-container {
  padding: 20px;
  max-height: 400px;
  overflow: hidden;
}
.crop-container img {
  max-width: 100%;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

/* ─── Toast Notifications ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
  min-width: 260px;
  max-width: 360px;
  animation: slideInToast 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.toast-error {
  border-left-color: #e74c3c;
}
.toast.toast-success {
  border-left-color: #2ecc71;
}
.toast.toast-info {
  border-left-color: #3498db;
}

@keyframes slideInToast {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ─── Decorative Dividers ─── */
.bio-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  gap: 10px;
  color: #c9a84c;
}
.bio-divider::before,
.bio-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #c9a84c, transparent);
}
.bio-divider-text {
  font-size: 0.8rem;
  white-space: nowrap;
  color: #c9a84c;
}

/* ─── Print Styles ─── */
@media print {
  body {
    margin: 0;
    background: #fff;
  }
  .top-nav,
  .preview-sidebar,
  .preview-toolbar,
  #step-welcome,
  #step-form,
  #step-templates,
  #step-export,
  .theme-panel,
  .toast-container {
    display: none !important;
  }
  #step-preview {
    display: block !important;
  }
  .preview-layout {
    display: block;
  }
  .preview-main {
    padding: 0;
  }
  .preview-frame-wrap {
    display: block;
  }
  .preview-frame {
    width: 100%;
    box-shadow: none;
    transform: none !important;
    border-radius: 0;
    margin: 0;
  }
  @page {
    size: A4;
    margin: 0;
  }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .preview-layout {
    grid-template-columns: 1fr;
  }
  .preview-sidebar {
    position: static;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
  }
  .section-toggles {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .photo-upload-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: 1;
  }
  .templates-grid {
    grid-template-columns: 1fr 1fr;
  }
  .export-options {
    grid-template-columns: 1fr;
  }
  .wizard-steps-nav {
    gap: 0;
  }
  .step-nav-item span {
    font-size: 0.6rem;
  }
  .step-nav-dot {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  .preview-frame {
    width: 100%;
  }
  .template-magazine .mag-body {
    grid-template-columns: 1fr;
  }
  .template-modern {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .welcome-title {
    font-size: 3rem;
  }
  .welcome-actions {
    flex-direction: column;
    align-items: center;
  }
  .nav-title {
    display: none;
  }
  .templates-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Utility ─── */
.text-center {
  text-align: center;
}
.mt-16 {
  margin-top: 16px;
}
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-size: 0.9rem;
}
.empty-state i {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
