/* Voice Greeting Cards — Main CSS v5 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d0d1a; --surface: rgba(255,255,255,0.06); --surface-2: rgba(255,255,255,0.10);
  --border: rgba(255,255,255,0.12); --text: #f0f0f8; --text-muted: rgba(240,240,248,0.55);
  --accent: #a78bfa; --green: #34d399; --red: #f87171;
  --radius: 16px; --radius-sm: 10px; --trans: all 0.25s cubic-bezier(0.4,0,0.2,1);
}
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }

/* ── Header ── */
.site-header { position: relative; padding: 44px 24px 52px; text-align: center; overflow: hidden; }
.header-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(167,139,250,0.25) 0%, transparent 65%); pointer-events: none; }
.header-inner { position: relative; z-index: 1; }
.logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.logo-icon { font-size: 1.9rem; }
.logo-text { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 900; background: linear-gradient(135deg,#c084fc,#60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-tagline { color: var(--text-muted); font-size: 0.95rem; font-weight: 300; letter-spacing: 0.04em; }

/* ── Layout ── */
.main-content { padding: 0 16px 80px; }
.container { max-width: 680px; margin: 0 auto; }

/* ── Steps ── */
.steps { display: flex; align-items: center; justify-content: center; margin-bottom: 36px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: 0.4; transition: var(--trans); }
.step.active, .step.done { opacity: 1; }
.step-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 600; background: var(--surface); transition: var(--trans); }
.step.active .step-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 14px rgba(167,139,250,0.4); }
.step.done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.step span { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.step.active span { color: var(--accent); }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 24px; max-width: 56px; margin-bottom: 18px; }

/* ── Form Sections ── */
.form-section { display: none; animation: fadeUp 0.35s ease both; }
.form-section.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.section-title { font-family: 'Playfair Display', serif; font-size: 1.65rem; font-weight: 700; margin-bottom: 6px; text-align: center; }
.section-sub { color: var(--text-muted); font-size: 0.88rem; text-align: center; margin-bottom: 24px; line-height: 1.5; }

/* ── Greeting Grid ── */
.greeting-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 20px 0 28px; }
@media (max-width: 500px) { .greeting-grid { grid-template-columns: repeat(2,1fr); } }
.greeting-card-opt { cursor: pointer; display: block; }
.greeting-card-opt input { display: none; }
.opt-inner { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 16px 6px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--border); transition: var(--trans); text-align: center; }
.opt-inner:hover { background: var(--surface-2); border-color: rgba(167,139,250,0.4); transform: translateY(-2px); }
.opt-emoji { font-size: 1.8rem; display: block; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; -webkit-text-fill-color: initial; background: none; }
.opt-label { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); line-height: 1.3; }
.greeting-card-opt input:checked + .opt-inner { background: rgba(167,139,250,0.18); border-color: var(--accent); box-shadow: 0 0 18px rgba(167,139,250,0.22); }
.greeting-card-opt input:checked + .opt-inner .opt-label { color: var(--accent); }
.full-btn { display: block; width: 100%; }

/* ── Fields ── */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.field-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field-label { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.field-input, .field-textarea { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 0.95rem; padding: 11px 15px; width: 100%; transition: var(--trans); resize: none; }
.field-input:focus, .field-textarea:focus { outline: none; border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 3px rgba(167,139,250,0.12); }
.field-textarea { min-height: 110px; }
.char-count { text-align: right; font-size: 0.72rem; color: var(--text-muted); margin-top: -10px; }

/* ── Theme Picker ── */
.theme-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 10px; }
.theme-opt { cursor: pointer; text-align: center; }
.theme-opt input { display: none; }
.theme-swatch { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; transition: var(--trans); max-width: 50px; margin: 0 auto; }
.theme-name { display: block; font-size: 0.65rem; margin-top: 5px; color: var(--text-muted); }
.theme-opt input:checked + .theme-swatch { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.2); transform: scale(1.1); }

/* ══════════════════════════════════════
   VOICE TABS
══════════════════════════════════════ */
.voice-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 5px; }
.vtab { flex: 1; padding: 11px 10px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--text-muted); font-family: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: var(--trans); }
.vtab.active { background: linear-gradient(135deg,#a78bfa,#60a5fa); color: #fff; box-shadow: 0 4px 14px rgba(167,139,250,0.3); }
.vtab:not(.active):hover { background: var(--surface-2); color: var(--text); }
.voice-tab-panel { display: none; }
.voice-tab-panel.active { display: block; animation: fadeUp 0.3s ease both; }

/* ── Pre-permission info box ── */
.permission-info-box { display: flex; gap: 14px; align-items: flex-start; background: rgba(167,139,250,0.08); border: 1.5px solid rgba(167,139,250,0.25); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.pib-icon { font-size: 2rem; flex-shrink: 0; margin-top: 2px; }
.pib-content { flex: 1; }
.pib-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.pib-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.pib-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pib-step { font-size: 0.75rem; background: rgba(255,255,255,0.08); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; color: var(--text); }
.pib-step strong { color: var(--accent); }
.pib-arrow { color: var(--text-muted); font-size: 0.8rem; }

/* ── Recorder Box ── */
.recorder-box { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.rec-badges { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; min-height: 24px; }
.rec-badge { display: inline-block; padding: 3px 12px; border-radius: 100px; font-size: 0.7rem; font-weight: 600; }
.badge-quality { background: rgba(167,139,250,0.2); border: 1px solid rgba(167,139,250,0.4); color: #c084fc; }
.badge-size    { background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.3); color: #34d399; }
.recorder-visualizer { background: rgba(0,0,0,0.3); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; height: 80px; position: relative; display: flex; align-items: center; justify-content: center; }
#waveCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
#waveCanvas.active { display: block; }
.wave-idle { position: absolute; display: flex; align-items: flex-end; gap: 4px; height: 50px; padding: 0 8px; }
.wave-idle span { display: block; width: 4px; border-radius: 2px; background: rgba(167,139,250,0.3); animation: idleWave 1.4s ease-in-out infinite; }
.wave-idle span:nth-child(1) { height: 12px; animation-delay: 0s; }
.wave-idle span:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.wave-idle span:nth-child(3) { height: 30px; animation-delay: 0.2s; }
.wave-idle span:nth-child(4) { height: 22px; animation-delay: 0.3s; }
.wave-idle span:nth-child(5) { height: 16px; animation-delay: 0.4s; }
.wave-idle span:nth-child(6) { height: 24px; animation-delay: 0.5s; }
.wave-idle span:nth-child(7) { height: 32px; animation-delay: 0.6s; }
.wave-idle span:nth-child(8) { height: 20px; animation-delay: 0.7s; }
.wave-idle span:nth-child(9) { height: 14px; animation-delay: 0.8s; }
.wave-idle span:nth-child(10){ height: 18px; animation-delay: 0.9s; }
@keyframes idleWave { 0%,100% { transform: scaleY(1); opacity: 0.3; } 50% { transform: scaleY(1.6); opacity: 0.6; } }
.rec-timer { font-size: 1.45rem; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 8px; color: var(--accent); transition: color 0.3s; }
.rec-timer.urgent { color: var(--red); }
.rec-status { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 18px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.status-dot.recording { background: var(--red); animation: pulse 1s infinite; }
.status-dot.done { background: var(--green); }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1);}50%{opacity:0.5;transform:scale(0.82);} }
.rec-controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.btn-rec, .btn-stop, .btn-discard { display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: 100px; border: none; cursor: pointer; font-family: inherit; font-size: 0.88rem; font-weight: 600; transition: var(--trans); }
.btn-rec { background: linear-gradient(135deg,#a78bfa,#60a5fa); color: #fff; }
.btn-rec:hover { transform: scale(1.04); box-shadow: 0 6px 18px rgba(167,139,250,0.4); }
.btn-stop { background: rgba(248,113,113,0.15); color: var(--red); border: 1.5px solid rgba(248,113,113,0.3); }
.btn-stop:not(:disabled):hover { background: rgba(248,113,113,0.25); }
.btn-stop:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-discard { background: var(--surface-2); color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-discard:hover { color: var(--red); }
.playback-box { margin-top: 18px; }
.playback-box audio { width: 100%; border-radius: var(--radius-sm); margin-bottom: 6px; }
.playback-note { font-size: 0.78rem; color: var(--green); font-weight: 500; }

/* ── Upload Tab ── */
.upload-info-box { background: rgba(96,165,250,0.08); border: 1.5px solid rgba(96,165,250,0.2); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.uib-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.uib-apps { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.uib-app { font-size: 0.72rem; background: rgba(255,255,255,0.08); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; color: var(--text-muted); }
.uib-formats { font-size: 0.72rem; color: var(--text-muted); }

/* Drop zone */
.drop-zone { border: 2px dashed rgba(167,139,250,0.35); border-radius: var(--radius); padding: 32px 20px; text-align: center; cursor: pointer; transition: var(--trans); background: var(--surface); }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: rgba(167,139,250,0.08); transform: scale(1.01); }
.dz-icon { font-size: 2.5rem; margin-bottom: 10px; }
.dz-title { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.dz-sub { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 14px; }
.btn-choose-file { display: inline-block; background: linear-gradient(135deg,#a78bfa,#60a5fa); color: #fff; border: none; border-radius: 100px; padding: 10px 24px; font-family: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: var(--trans); }
.btn-choose-file:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(167,139,250,0.35); }
/* Drop zone preview */
.dz-preview { display: flex; align-items: center; gap: 14px; }
.dz-file-icon { font-size: 2.4rem; flex-shrink: 0; }
.dz-file-info { flex: 1; text-align: left; }
.dz-filename { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 3px; word-break: break-all; }
.dz-filesize { font-size: 0.72rem; color: var(--green); }
.dz-remove { background: rgba(248,113,113,0.15); border: 1.5px solid rgba(248,113,113,0.3); color: var(--red); border-radius: 50%; width: 30px; height: 30px; font-size: 0.9rem; cursor: pointer; flex-shrink: 0; transition: var(--trans); }
.dz-remove:hover { background: rgba(248,113,113,0.3); }

/* ── Nav Buttons ── */
.btn-row { display: flex; gap: 10px; justify-content: center; }
.btn-next, .btn-back { padding: 13px 34px; border-radius: 100px; border: none; cursor: pointer; font-family: inherit; font-size: 0.92rem; font-weight: 600; transition: var(--trans); }
.btn-next { background: linear-gradient(135deg,#a78bfa,#60a5fa); color: #fff; box-shadow: 0 4px 18px rgba(167,139,250,0.32); }
.btn-next:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(167,139,250,0.48); }
.btn-back { background: var(--surface); color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-back:hover { background: var(--surface-2); color: var(--text); }
.btn-generate { flex: 1; font-size: 1rem; }

/* ── Share Box ── */
.share-box { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 32px 22px; text-align: center; margin-top: 20px; }
.share-success-icon { font-size: 3.8rem; margin-bottom: 14px; }
.share-label { color: var(--text-muted); margin-bottom: 18px; font-size: 0.95rem; }
.share-link-row { display: flex; gap: 8px; margin-bottom: 18px; }
.share-link-input { flex: 1; background: rgba(0,0,0,0.3); border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 0.82rem; padding: 11px 13px; }
.btn-copy { padding: 11px 18px; border-radius: var(--radius-sm); border: none; background: var(--accent); color: #fff; font-family: inherit; font-weight: 600; cursor: pointer; transition: var(--trans); white-space: nowrap; font-size: 0.88rem; }
.btn-copy:hover { background: #c084fc; }
.btn-whatsapp-share { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #25d366; color: #fff; font-weight: 600; padding: 13px 26px; border-radius: 100px; text-decoration: none; font-size: 0.92rem; transition: var(--trans); margin-bottom: 14px; }
.btn-whatsapp-share:hover { background: #1eac52; transform: translateY(-2px); }
.btn-make-another { display: block; color: var(--text-muted); font-size: 0.82rem; text-decoration: none; margin-top: 6px; }
.btn-make-another:hover { color: var(--accent); }

/* ── Footer ── */
.site-footer { text-align: center; padding: 22px; color: var(--text-muted); font-size: 0.78rem; border-top: 1px solid var(--border); }

/* ── Loading Overlay ── */
.loading-overlay { position: fixed; inset: 0; background: rgba(13,13,26,0.88); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.loading-inner { text-align: center; padding: 20px; }
.upload-icon-anim { font-size: 2.8rem; margin-bottom: 12px; animation: bounce 1s ease infinite alternate; }
@keyframes bounce { from{transform:translateY(0);}to{transform:translateY(-8px);} }
.upload-label-txt { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.upload-sub-txt { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.progress-bar-outer { width: 240px; height: 8px; background: rgba(255,255,255,0.1); border-radius: 100px; overflow: hidden; margin: 0 auto; }
.progress-bar-inner { height: 100%; border-radius: 100px; background: linear-gradient(90deg,#a78bfa,#60a5fa); transition: width 0.3s ease; box-shadow: 0 0 10px rgba(167,139,250,0.5); width: 0%; }
.progress-pct { font-size: 1.1rem; font-weight: 700; color: var(--accent); margin-top: 10px; }

/* ── Mic Permission Popup ── */
.mic-popup-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.8); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.mic-popup { background: #1a1a2e; border: 1.5px solid rgba(167,139,250,0.3); border-radius: 20px; padding: 28px 22px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,0.5); animation: popSlide 0.3s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes popSlide { from{transform:scale(0.85) translateY(20px);opacity:0;}to{transform:scale(1);opacity:1;} }
.mic-popup-icon { font-size: 2.8rem; margin-bottom: 10px; display: block; }
.mic-popup h3 { font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; color: #f0f0f8; }
.mic-popup p { color: rgba(240,240,248,0.65); font-size: 0.85rem; line-height: 1.6; margin-bottom: 14px; }
.browser-tab-hint { display: flex; align-items: center; gap: 8px; background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.25); border-radius: 10px; padding: 10px 13px; margin-bottom: 13px; text-align: left; }
.browser-tab-hint span { font-size: 0.8rem; color: rgba(240,240,248,0.8); }
.hint-icon { font-size: 1.1rem; flex-shrink: 0; }
.mic-steps { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; text-align: left; }
.mic-step-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 9px; }
.mic-step-row:last-child { margin-bottom: 0; }
.mic-step-num { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.mic-step-text { font-size: 0.8rem; color: rgba(240,240,248,0.8); line-height: 1.5; }
.mic-step-text strong { color: #f0f0f8; }
.btn-mic-try { display: block; width: 100%; background: linear-gradient(135deg,#a78bfa,#60a5fa); color: #fff; border: none; border-radius: 100px; padding: 12px; font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--trans); margin-bottom: 8px; }
.btn-mic-try:hover { transform: translateY(-2px); }
.btn-mic-switch { display: block; width: 100%; background: rgba(96,165,250,0.12); border: 1.5px solid rgba(96,165,250,0.3); border-radius: 100px; color: #60a5fa; padding: 11px; font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--trans); margin-bottom: 8px; }
.btn-mic-switch:hover { background: rgba(96,165,250,0.2); }
.btn-mic-close { display: block; width: 100%; background: none; border: 1.5px solid var(--border); border-radius: 100px; color: var(--text-muted); padding: 10px; font-family: inherit; font-size: 0.82rem; cursor: pointer; transition: var(--trans); }
.btn-mic-close:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

/* ── Toast ── */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120px); background: rgba(20,20,40,0.97); border: 1.5px solid rgba(167,139,250,0.4); color: var(--text); padding: 12px 26px; border-radius: 100px; font-size: 0.88rem; z-index: 9999; transition: transform 0.3s ease; backdrop-filter: blur(10px); pointer-events: none; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════
   CARD PREVIEW (Step 4)
══════════════════════════════════════ */
.preview-wrap {
  margin-bottom: 20px;
}
.preview-label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}
.card-preview-shell {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  animation: previewPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes previewPop {
  from { opacity:0; transform: scale(0.9) translateY(16px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.cp-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  transition: background 0.4s ease;
}
.cp-glass {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 28px 24px 24px;
  text-align: center;
  color: #fff;
}
.cp-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.cp-emoji {
  font-size: 2.6rem;
  margin-bottom: 10px;
  display: block;
  animation: emojiBounce 0.5s 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes emojiBounce {
  from { opacity:0; transform:scale(0); }
  to   { opacity:1; transform:scale(1); }
}
.cp-lbl {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 3px;
}
.cp-to { margin-bottom: 12px; }
.cp-receiver {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.cp-msg {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  margin-bottom: 14px;
  text-align: left;
  min-height: 48px;
}
.cp-from { margin-bottom: 14px; }
.cp-sender {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 700;
  color: #fff;
}
.cp-audio-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 7px 18px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.9);
}
.cp-audio-icon { font-size: 1rem; }

/* Share box update */
.share-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  text-align: center;
}

/* ══════════════════════════════════════
   LIVE CARD PREVIEW IFRAME (Step 4)
══════════════════════════════════════ */
.preview-wrap {
  margin-bottom: 20px;
}
.preview-label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

/* iPhone-style frame around iframe */
.iframe-shell {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 36px;
  overflow: hidden;
  box-shadow:
    0 0 0 8px rgba(255,255,255,0.08),
    0 0 0 10px rgba(255,255,255,0.04),
    0 30px 70px rgba(0,0,0,0.6);
  animation: previewPop 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
  /* Fixed height — phone-like */
  height: 580px;
  border: 2px solid rgba(255,255,255,0.15);
}
@keyframes previewPop {
  from { opacity:0; transform:scale(0.88) translateY(20px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

/* The iframe fills the shell */
#cardIframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  border-radius: 34px;
  /* Scale down card.php content to fit */
  transform-origin: top left;
}

/* Badge overlay at bottom */
.iframe-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  display: flex;
  justify-content: center;
  pointer-events: none;
  border-radius: 0 0 34px 34px;
}
.iframe-badge {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  font-size: 0.72rem;
  padding: 6px 16px;
  border-radius: 100px;
}

/* Loading shimmer while iframe loads */
.iframe-shell::before {
  content: '💌 Loading preview...';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(13,13,26,0.8);
  z-index: -1;
  border-radius: 34px;
}

/* Mobile: make iframe shell smaller */
@media (max-width: 420px) {
  .iframe-shell {
    height: 500px;
    border-radius: 28px;
  }
  #cardIframe { border-radius: 26px; }
  .iframe-overlay { border-radius: 0 0 26px 26px; }
}

/* ══════════════════════════════════════
   VIDEO UPLOAD SECTION
══════════════════════════════════════ */
.video-upload-info {
  background: rgba(96,165,250,0.08);
  border: 1.5px solid rgba(96,165,250,0.22);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.vui-icons { font-size: 1.8rem; margin-bottom: 8px; letter-spacing: 6px; }
.vui-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.vui-apps  { display:flex; flex-wrap:wrap; gap:7px; justify-content:center; margin-bottom:10px; }
.vui-formats { font-size: 0.72rem; color: var(--text-muted); }

/* Video drop zone - slightly taller */
.video-dz { min-height: 160px; }

/* 3-tab layout */
.voice-tabs { gap: 6px; }
.voice-tabs .vtab { font-size: 0.8rem; padding: 10px 6px; }

/* Video preview box */
.video-preview-box {
  margin-top: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1.5px solid var(--border);
}
.video-preview-box video { display:block; width:100%; }
.video-preview-box .playback-note { padding: 10px 14px; }
