/* ========================================
   Raksha Bandhan Onboarding Styles
   Four States: unclaimed, setup, coming_soon, published
======================================== */

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

:root {
  --primary-color: #FF6B35;
  --accent-color: #FFD700;
  --bg-dark: #2D1810;
  --bg-card: #ffffff;
  --text-primary: #2D1810;
  --text-secondary: #666;
  --text-light: #999;
  --border-color: #e5e5e5;
  --success-color: #10b981;
  --error-color: #ef4444;
}

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

.spin {
  animation: spin 1s linear infinite;
}

body.rakhi-onboarding {
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #FF6B35 0%, #E85D26 50%, #CC4E1A 100%);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Firebase Emulator Warning — small corner badge so it doesn't overlap UI */
body.rakhi-onboarding > p:last-of-type {
  position: fixed;
  bottom: 8px;
  left: 8px;
  right: auto;
  padding: 4px 10px;
  background: #fef3cd;
  color: #856404;
  font-size: 0.65rem;
  text-align: left;
  z-index: 99999;
  border: 1px solid #ffc107;
  border-radius: 999px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
  pointer-events: none;
}

/* ========== Background Animation ========== */
.onboarding-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255, 107, 53, 0.95) 0%,
    rgba(232, 93, 38, 0.95) 50%,
    rgba(180, 60, 20, 0.95) 100%);
}

.floating-elements {
  position: absolute;
  inset: 0;
}

.float-element {
  position: absolute;
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

.rakhi-1, .rakhi-2 {
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  border-radius: 50%;
}

.rakhi-1 { top: 10%; left: 5%; animation-delay: 0s; }
.rakhi-2 { top: 60%; right: 10%; animation-delay: -7s; }

.sparkle-1, .sparkle-2 {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.sparkle-1 { top: 25%; right: 15%; animation-delay: -3s; }
.sparkle-2 { bottom: 20%; left: 12%; animation-delay: -10s; }

.flower-1, .flower-2 {
  width: 50px;
  height: 50px;
  background: #FFB347;
  border-radius: 50%;
}

.flower-1 { top: 45%; left: 3%; animation-delay: -5s; }
.flower-2 { bottom: 15%; right: 5%; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -20px) rotate(5deg); }
  50% { transform: translate(-5px, -40px) rotate(-3deg); }
  75% { transform: translate(15px, -15px) rotate(7deg); }
}

/* ========== Main Container ========== */
.onboarding-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem;
}

/* ========== Logo ========== */
.logo-container {
  margin-bottom: 2rem;
}

.logo {
  height: 32px;
  opacity: 0.9;
}

/* ========== Content Card ========== */
.content-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.card-inner {
  padding: 2.5rem 2rem;
  text-align: center;
}

/* ========== STATE: UNCLAIMED ========== */
.state-unclaimed .content-card {
  animation: fadeInUp 0.6s ease-out;
}

/* NFC Animation */
.nfc-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
}

.nfc-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  opacity: 0;
  animation: pulse-ring 2s ease-out infinite;
}

.nfc-ring.ring-2 { animation-delay: 0.5s; }
.nfc-ring.ring-3 { animation-delay: 1s; }

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.nfc-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
}

.nfc-icon ion-icon {
  font-size: 48px;
  color: white;
}

/* Titles */
.main-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Features Row */
.features-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.feature ion-icon {
  font-size: 24px;
  color: var(--primary-color);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), #E85D26);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary ion-icon {
  font-size: 20px;
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #f5f5f5;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Email Input (Unclaimed State) */
.email-section {
  margin-top: 1.5rem;
}

.email-section .form-group {
  text-align: left;
  margin-bottom: 1rem;
}

.email-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.email-input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.email-input-group ion-icon {
  font-size: 20px;
  color: #a0a0a0;
  flex-shrink: 0;
}

.email-input-group:focus-within ion-icon {
  color: var(--primary-color);
}

.email-input-group input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}

.email-input-group input::placeholder {
  color: #b0b0b0;
}

.phone-input-group .phone-prefix {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  padding-right: 0.5rem;
  border-right: 1px solid var(--border-color);
  margin-right: 0.25rem;
  user-select: none;
}

.phone-input-group:focus-within .phone-prefix {
  color: var(--primary-color);
  border-right-color: var(--primary-color);
}

/* ========== OTP Inputs ========== */
.otp-group {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.otp-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 1rem 0;
}

.otp-input {
  width: 48px;
  height: 56px;
  border: 2px solid #333;
  border-radius: 8px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'SF Mono', 'Roboto Mono', monospace;
  color: var(--text-primary);
  background: #fafafa;
  outline: none;
  transition: all 0.15s ease;
  caret-color: var(--primary-color);
}

.otp-input::placeholder {
  color: #ccc;
  font-weight: 400;
}

.otp-input:focus {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
  transform: scale(1.05);
}

.otp-input.filled {
  border-color: var(--success-color);
  background: #f0fdf4;
}

.otp-input.error {
  border-color: var(--error-color);
  background: #fef2f2;
  animation: shake 0.4s ease;
}

.otp-input.success {
  border-color: var(--success-color);
  background: #f0fdf4;
}

.claim-otp-input {
  width: 48px;
  height: 56px;
  border: 2px solid #333;
  border-radius: 8px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'SF Mono', 'Roboto Mono', monospace;
  color: var(--text-primary);
  background: #fafafa;
  transition: all 0.2s ease;
  outline: none;
}

.claim-otp-input::placeholder {
  color: #ccc;
  font-weight: 400;
}

.claim-otp-input:focus {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
  transform: scale(1.05);
}

.claim-otp-input.filled {
  border-color: var(--success-color);
  background: #f0fdf4;
}

.claim-otp-input.error {
  border-color: var(--error-color);
  background: #fef2f2;
  animation: shake 0.4s ease;
}

/* Active box — show focus highlight. The real blinking caret is a sibling
   span injected by otp-input.js (pseudo-elements don't render on <input>). */
.otp-input.active,
.claim-otp-input.active {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.otp-cell {
  position: relative;
  display: inline-flex;
}

.otp-cell-caret {
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 50%;
  width: 2px;
  background: var(--primary-color);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

.otp-cell:has(input.active:not(.filled)) .otp-cell-caret {
  opacity: 1;
  animation: otp-caret-blink 1s steps(2, start) infinite;
}

@keyframes otp-caret-blink {
  to { opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.otp-divider {
  width: 12px;
  height: 3px;
  background: #ccc;
  border-radius: 2px;
  align-self: center;
}

.otp-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.otp-hint ion-icon {
  vertical-align: middle;
  margin-right: 4px;
}

.otp-error {
  color: var(--error-color);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 0.5rem;
  font-weight: 500;
}

.otp-group.verifying {
  position: relative;
  pointer-events: none;
  opacity: 0.5;
}

.otp-group.verifying::after {
  content: 'Verifying...';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
}

/* ========== STATE: SETUP (Wizard) ========== */
.state-setup {
  width: 100%;
  max-width: 520px;
}

/* Stepper */
.stepper-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.step-circle ion-icon {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  display: none;
}

.step-number {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.step.active .step-circle {
  background: var(--accent-color);
}

.step.active .step-circle ion-icon {
  display: block;
  color: #2D1810;
}

.step.active .step-number {
  display: none;
}

.step.completed .step-circle {
  background: var(--success-color);
}

.step.completed .step-circle ion-icon {
  display: none;
}

.step.completed .step-circle::after {
  content: '';
  width: 12px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
  margin-top: -2px;
}

.step.completed .step-number {
  display: none;
}

.step-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step.active .step-label {
  color: white;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 0.5rem;
  margin-bottom: 1.5rem;
}

/* Wizard Card */
.wizard-card {
  padding: 0;
}

.wizard-step {
  padding: 2rem;
}

.wizard-step[style*="display: none"] {
  display: none !important;
}

.step-header {
  text-align: center;
  margin-bottom: 2rem;
}

.step-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.step-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  transition: all 0.2s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.input-wrapper ion-icon {
  font-size: 20px;
  color: #a0a0a0;
  flex-shrink: 0;
}

.input-wrapper:focus-within ion-icon {
  color: var(--primary-color);
}

.input-wrapper input,
.input-wrapper textarea {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
  color: #b0b0b0;
}

.input-wrapper textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 200px;
  line-height: 1.5;
}

.input-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.char-counter {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 0.25rem;
}

.char-counter.near-limit {
  color: #f59e0b;
}

.char-counter.at-limit {
  color: var(--error-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

.form-row .form-group {
  min-width: 0;
  width: 100%;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ========== Upload Zone ========== */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.upload-zone:hover {
  border-color: var(--primary-color);
  background: #fff5f0;
}

.upload-zone.drag-over {
  border-color: var(--primary-color);
  background: rgba(255, 107, 53, 0.1);
  border-style: solid;
}

.upload-dropzone {
  position: relative;
  min-height: 160px;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.dropzone-icon ion-icon {
  font-size: 28px;
  color: white;
}

.dropzone-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.dropzone-subtitle {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Upload Preview */
.upload-preview {
  position: relative;
  width: 100%;
}

.upload-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.upload-preview video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #000;
}

.upload-preview-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
}

.upload-preview-actions button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.upload-preview-actions button:hover {
  background: rgba(0, 0, 0, 0.8);
}

.upload-preview-actions button ion-icon {
  font-size: 16px;
}

/* Upload Progress */
.upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
}

.upload-progress-bar {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

/* Media Upload Grid */
.media-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 400px) {
  .media-upload-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Voice Message ========== */
.voice-hold-btn {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  cursor: pointer;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-sizing: border-box;
  overflow: hidden;
}

/* Toggled on <body> for the duration of a hold-to-record. The drag travels
   over surrounding text; without this iOS Safari long-press-selects it and
   shows the caret/loupe. Cleared on every recording end path. */
body.voice-noselect,
body.voice-noselect * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  cursor: default !important;
}

.voice-hold-btn:hover {
  filter: brightness(1.05);
}

.voice-hold-btn.recording {
  transform: scale(0.98);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.voice-hold-btn.cancelling {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.voice-hold-mic {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-hold-mic ion-icon {
  font-size: 22px;
  color: #fff;
}

.voice-hold-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.voice-hold-text .title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.voice-hold-text .hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.voice-divider {
  display: flex;
  align-items: center;
  margin: 0.75rem 0;
  color: var(--text-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.voice-divider::before,
.voice-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.voice-divider span {
  padding: 0 0.75rem;
}

.voice-recording {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #FFF5EE, #FFE8D6);
  border: 1px solid #FFD4B8;
  border-radius: 12px;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.voice-recording.warning {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #fca5a5;
}

.voice-recording.cancelling .voice-rec-mic,
.voice-recording.cancelling .voice-waveform-canvas {
  opacity: 0.35;
}

.voice-rec-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.voice-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: voice-rec-pulse 1s ease-in-out infinite;
}

@keyframes voice-rec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.voice-rec-timer {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 36px;
}

.voice-recording.warning .voice-rec-timer {
  color: #b91c1c;
}

.voice-waveform-canvas {
  flex: 1 1 0;
  min-width: 0;
  height: 36px;
  display: block;
}

.voice-rec-mic {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-rec-mic ion-icon {
  font-size: 18px;
  color: #fff;
}

.voice-cancel-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.voice-hint-slot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.voice-recording.cancelling .voice-cancel-hint {
  color: #b91c1c;
  font-weight: 600;
}

.voice-recording.cancelling .voice-lock-hint {
  visibility: hidden;
}

.voice-rec-lock {
  display: none;
  width: 36px;
  height: 36px;
  background: #10b981;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-rec-lock ion-icon {
  font-size: 18px;
  color: #fff;
}

.voice-locked-controls {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.voice-recording.locked .voice-rec-mic {
  display: none;
}

.voice-recording.locked .voice-rec-lock {
  display: inline-flex;
}

.voice-recording.locked .voice-cancel-hint {
  display: none;
}

.voice-recording.locked .voice-locked-controls {
  display: flex;
}

.voice-cancel-link {
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.voice-cancel-link:hover {
  color: #b91c1c;
}

.voice-stop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.voice-stop-btn:hover {
  filter: brightness(1.05);
}

.voice-stop-btn:active {
  transform: scale(0.97);
}

.voice-stop-btn ion-icon {
  font-size: 16px;
}

.voice-denied {
  padding: 1rem 1.25rem;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  background: #fafafa;
}

.voice-denied-msg {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.voice-denied-msg ion-icon {
  font-size: 20px;
  color: var(--error-color);
  flex-shrink: 0;
}

.voice-enable-mic-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.5rem;
  padding: 0;
  background: none;
  border: 0;
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.voice-enable-mic-link ion-icon {
  font-size: 14px;
}

.voice-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-upload-zone:hover {
  border-color: var(--primary-color);
  background: #fff5f0;
}

.voice-upload-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.voice-upload-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-upload-icon ion-icon {
  font-size: 22px;
  color: white;
}

.voice-upload-text {
  flex: 1;
}

.voice-upload-text .title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.voice-upload-text .hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Audio Player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #FFF5EE, #FFE8D6);
  border-radius: 12px;
  border: 1px solid #FFD4B8;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.audio-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.audio-play-btn:hover {
  transform: scale(1.1);
}

.audio-play-btn ion-icon {
  font-size: 20px;
}

.audio-info {
  flex: 1;
  min-width: 0;
}

.audio-filename {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.audio-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 107, 53, 0.2);
  border-radius: 2px;
  margin-top: 6px;
  cursor: pointer;
  position: relative;
}

.audio-progress-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.audio-duration {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 2px;
}

.audio-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-remove-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ========== Feature Toggle ========== */
.feature-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #fafafa;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feature-toggle:hover {
  background: #f5f5f5;
}

.feature-toggle.active {
  background: #FFF5EE;
  border-color: var(--primary-color);
}

.feature-toggle-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-toggle-info ion-icon {
  font-size: 22px;
  color: var(--primary-color);
}

.feature-toggle-info .label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-toggle-info .desc {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  bottom: 2px;
  left: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

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

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Feature Content (collapsible) */
.feature-content {
  display: none;
  padding: 0 0 1rem;
  animation: fadeIn 0.3s ease;
}

.feature-content.active {
  display: block;
}

/* ========== PIN Input ========== */
.pin-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 1rem 0;
}

.pin-input {
  width: 52px;
  height: 60px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'SF Mono', 'Roboto Mono', monospace;
  color: var(--text-primary);
  background: #fafafa;
  outline: none;
  transition: all 0.2s ease;
}

.pin-input:focus {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.pin-input.filled {
  border-color: var(--primary-color);
  background: #FFF5EE;
}

/* ========== Preview Card ========== */
.preview-card {
  background: linear-gradient(135deg, #FFF5EE, #FFE8D6);
  border: 1px solid #FFD4B8;
  border-radius: 16px;
  padding: 0.75rem;
  margin: 1.5rem 0;
}

.preview-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  background: #fff;
}

#preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.preview-iframe-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
  pointer-events: none;
}

.preview-iframe-overlay.show {
  display: flex;
}

.preview-header {
  text-align: center;
  margin-bottom: 1rem;
}

.preview-occasion {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.preview-names {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.preview-message {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
  text-align: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.preview-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
}

.preview-media-item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #f0f0f0;
}

.preview-media-item img,
.preview-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: center;
}

.preview-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 107, 53, 0.1);
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--primary-color);
  font-weight: 500;
}

/* ========== Step Actions ========== */
.step-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.step-actions .btn-primary {
  flex: 1;
}

.step-actions .btn-secondary {
  flex: 0;
  padding: 1rem 1.25rem;
}

/* ========== STATE: COMING SOON ========== */
.state-coming-soon .content-card {
  animation: fadeInUp 0.6s ease-out;
}

.coming-soon-content {
  text-align: center;
}

.coming-soon-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coming-soon-icon ion-icon {
  font-size: 40px;
  color: white;
}

.coming-soon-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.coming-soon-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ========== Toast Notifications ========== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  background: var(--text-primary);
  color: white;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  max-width: 90%;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--success-color);
}

.toast.error {
  background: var(--error-color);
}

/* ========== Cropper Modal ========== */
/* Instagram-style Cropper Modal */
.cropper-modal-overlay {
  position: fixed;
  inset: 0;
  background: #1a1a1a;
  z-index: 9998;
  display: flex;
  flex-direction: column;
}

.cropper-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  overflow: hidden;
}

.cropper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  flex-shrink: 0;
}

.cropper-header h3 {
  display: none;
}

.cropper-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
}

.cropper-close:active {
  opacity: 0.6;
}

.cropper-header .btn-cropper-apply-top {
  background: none;
  border: none;
  color: #0095f6;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  letter-spacing: 0.01em;
}

.cropper-header .btn-cropper-apply-top:active {
  opacity: 0.6;
}

.cropper-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  min-height: 0;
}

.cropper-body img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.cropper-toolbar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  flex-shrink: 0;
}

.cropper-toolbar button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  transition: background 0.2s;
}

.cropper-toolbar button:active {
  background: rgba(255, 255, 255, 0.25);
}

/* Hide the old footer — actions moved to header */
.cropper-footer {
  display: none;
}

/* Desktop: centered modal instead of full-screen */
@media (min-width: 600px) {
  .cropper-modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }

  .cropper-dialog {
    max-width: 600px;
    height: 80vh;
    border-radius: 12px;
  }

  .cropper-header {
    border-radius: 12px 12px 0 0;
  }

  .cropper-toolbar {
    border-radius: 0 0 12px 12px;
  }
}

/* Override cropper.js internal .cropper-modal (dark mask outside crop area) */
.cropper-modal-overlay .cropper-modal,
.cropper-dialog .cropper-modal {
  background: rgba(0, 0, 0, 0.5) !important;
  display: block !important;
  position: absolute !important;
  border-radius: 0 !important;
  max-width: none !important;
  height: auto !important;
  flex-direction: unset !important;
  overflow: visible !important;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ========== Save Indicator ========== */
.save-indicator {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 100;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
}

.save-indicator.show {
  opacity: 1;
  transform: translateY(0);
}

.save-indicator.saving {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-secondary);
}

.save-indicator.saved {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.save-indicator.error {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

/* ========== Footer ========== */
.onboarding-footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
}

.onboarding-footer p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.onboarding-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
  .onboarding-container {
    padding: 1rem 0.75rem;
  }

  .card-inner {
    padding: 2rem 1.5rem;
  }

  .wizard-step {
    padding: 1.5rem;
  }

  .stepper-container {
    padding: 0 0.5rem;
  }

  .step-label {
    font-size: 0.6rem;
  }

  .main-title {
    font-size: 1.5rem;
  }

  .features-row {
    gap: 1rem;
  }

  .pin-inputs {
    gap: 8px;
  }

  .pin-input {
    width: 46px;
    height: 54px;
  }
}

@media (max-width: 400px) {
  .otp-input,
  .claim-otp-input {
    width: 42px;
    height: 50px;
    font-size: 1.5rem;
  }

  .otp-inputs,
  .otp-group {
    gap: 6px;
  }
}

/* ========== Hidden utility ========== */
.hidden {
  display: none !important;
}

/* ========== Spotify Embed ========== */
.spotify-input-wrapper {
  position: relative;
}

.spotify-status {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 50%;
  font-size: 14px;
  color: #fff;
}

.spotify-status.is-loading,
.spotify-status.is-valid,
.spotify-status.is-invalid {
  display: inline-flex;
}

.spotify-status.is-loading {
  background: var(--text-light);
  animation: spin 0.8s linear infinite;
}

.spotify-status.is-valid {
  background: #1DB954; /* Spotify green */
}

.spotify-status.is-invalid {
  background: var(--error-color);
}

#spotify-input-hint.is-error {
  color: var(--error-color);
  font-weight: 600;
}

#spotify-input-hint.is-success {
  color: #168f3f;
  font-weight: 600;
}

/* Help collapsible */
.spotify-help {
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fafafa;
}

.spotify-help > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
}

.spotify-help > summary::-webkit-details-marker { display: none; }

.spotify-help > summary ion-icon {
  font-size: 16px;
  color: #1DB954;
}

.spotify-help[open] > summary {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.spotify-help-steps {
  margin: 0;
  padding: 12px 14px 12px 32px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.spotify-help-steps li + li {
  margin-top: 6px;
}

.spotify-open-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 14px 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #1DB954;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.spotify-open-link ion-icon {
  font-size: 13px;
}

/* Search */
.spotify-search {
  margin-top: 0.75rem;
}

.spotify-search-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spotify-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.spotify-search-input-wrap:focus-within {
  border-color: #1DB954;
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
}

.spotify-search-input-wrap > ion-icon {
  font-size: 18px;
  color: var(--text-light);
  flex-shrink: 0;
}

.spotify-search-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.spotify-search-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  border-top-color: #1DB954;
  flex-shrink: 0;
  animation: spin 0.8s linear infinite;
}

.spotify-search-spinner.is-loading {
  display: inline-block;
}

.spotify-search-results {
  margin-top: 8px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  display: none;
}

.spotify-search-results.has-results,
.spotify-search-results.has-empty,
.spotify-search-results.has-error {
  display: block;
}

.spotify-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.spotify-search-result:last-child {
  border-bottom: 0;
}

.spotify-search-result:hover,
.spotify-search-result:focus {
  background: #f5fdf6;
  outline: none;
}

.spotify-search-result-cover {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 4px;
  background: #f0f0f0 center/cover no-repeat;
}

.spotify-search-result-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.spotify-search-result-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-search-result-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-search-result-type {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f8ec;
  color: #168f3f;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spotify-search-results-empty,
.spotify-search-results-error {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}

.spotify-search-results-error {
  color: var(--error-color);
}

/* Curated picks */
.spotify-picks {
  margin-top: 0.75rem;
}

.spotify-picks-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spotify-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.spotify-pick-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.spotify-pick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  border-color: #1DB954;
}

.spotify-pick-card.is-selected {
  border-color: #1DB954;
  box-shadow: 0 0 0 2px #1DB95433;
}

.spotify-pick-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f0f0f0 center/cover no-repeat;
}

.spotify-pick-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spotify-pick-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-pick-cta {
  font-size: 0.7rem;
  color: #1DB954;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.spotify-unavailable {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.75rem;
  padding: 10px 12px;
  background: #fef3cd;
  border: 1px solid #ffc107;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #856404;
}

.spotify-unavailable ion-icon {
  font-size: 18px;
  flex-shrink: 0;
  color: #d97706;
}

.spotify-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.spotify-preview iframe {
  width: 100%;
  height: 80px;
  border: none;
  border-radius: 12px;
  display: block;
}

.spotify-clear-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease;
}

.spotify-clear-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.spotify-clear-btn ion-icon {
  font-size: 14px;
}

/* ========== Slideshow Preview ========== */
.slideshow-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 8px;
  margin-top: 0.75rem;
}

.slideshow-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #e0e0e0;
}

.slideshow-info {
  flex: 1;
  min-width: 0;
}

.slideshow-title-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slideshow-source {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ========== Error State ========== */
.field-error {
  font-size: 0.8rem;
  color: var(--error-color);
  margin-top: 0.25rem;
  display: none;
}

.field-error.show {
  display: block;
}

.input-wrapper.error {
  border-color: var(--error-color);
}

/* ========== Theme Picker (Step 4) ========== */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.theme-chip {
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  font-family: inherit;
  color: inherit;
}

.theme-chip:hover {
  border-color: #fbbf24;
}

.theme-chip[aria-checked="true"] {
  border-color: #f97316;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.18);
  transform: translateY(-1px);
}

.theme-swatch {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  display: block;
}

.theme-swatch-default {
  background:
    radial-gradient(circle at 30% 35%, #ffd5b8 0%, transparent 55%),
    radial-gradient(circle at 70% 70%, #fcb774 0%, transparent 50%),
    #fff1e6;
}

.theme-swatch-marigold {
  background:
    radial-gradient(circle at 50% 30%, #b91c1c 0 12%, transparent 13%),
    linear-gradient(180deg, #fce8c1 0%, #d4a36a 65%, #b88248 100%);
}

.theme-swatch-constellation {
  background:
    radial-gradient(1px 1px at 20% 30%, #fff 99%, transparent),
    radial-gradient(1px 1px at 60% 50%, #fff 99%, transparent),
    radial-gradient(1px 1px at 80% 70%, #fff 99%, transparent),
    radial-gradient(1px 1px at 35% 80%, #fff 99%, transparent),
    radial-gradient(circle at 50% 50%, #b91c1c 0 8%, transparent 9%),
    linear-gradient(180deg, #0a0e2c 0%, #1a1648 100%);
}

.theme-chip-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.1;
}

.theme-chip-desc {
  font-size: 0.65rem;
  color: #6b7280;
  line-height: 1.1;
}

/* ========== Preview Card Theme Variants ========== */
.preview-card[data-theme="marigold-ink"] {
  background: linear-gradient(180deg, #fce8c1 0%, #d4a36a 100%);
  color: #3a2110;
  border-color: #b88248;
}

.preview-card[data-theme="marigold-ink"] .preview-occasion,
.preview-card[data-theme="marigold-ink"] .preview-names {
  color: #3a2110;
}

.preview-card[data-theme="constellation"] {
  background:
    radial-gradient(1.5px 1.5px at 15% 25%, rgba(255,255,255,0.85) 99%, transparent),
    radial-gradient(1.5px 1.5px at 60% 60%, rgba(255,255,255,0.7) 99%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, rgba(255,255,255,0.6) 99%, transparent),
    radial-gradient(1.5px 1.5px at 30% 80%, rgba(255,255,255,0.6) 99%, transparent),
    linear-gradient(180deg, #0a0e2c 0%, #1a1648 100%);
  color: #f5f3ff;
  border-color: #1e1b4b;
}

.preview-card[data-theme="constellation"] .preview-occasion,
.preview-card[data-theme="constellation"] .preview-names {
  color: #f5f3ff;
}

.preview-card[data-theme="constellation"] .preview-message {
  background: rgba(255,255,255,0.06);
  color: #e9d5ff;
}
