/* ============================================
   ui5b — Labels Below Variant (based on ui4)
   ============================================ */

html, body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  overscroll-behavior: none;
}
html.ui4-scroll-locked,
body.ui4-scroll-locked {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}
input, textarea, button, select {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.site-header { display: none !important; }
.tabbar { display: none !important; }
.main-content { margin-left: 0 !important; padding-top: 0 !important; }
.sidebar, .sidebar-overlay { display: none !important; }

.content-area {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 140px;
  position: relative;
  overflow-x: hidden;
}
.content-area.ui4-summary-mode {
  max-width: none;
  padding-bottom: 0;
}

/* ---- Wizard Step Containers ---- */
.wizard-step {
  display: none;
  opacity: 0;
  transition: opacity 180ms ease;
}
.wizard-step.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
}
.wizard-step.is-staging {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.wizard-step-scroll {
  width: 100%;
}

.wizard-step-scroll-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ============================================
   Step 1 — Style Selection (UI5B)
   ============================================ */
#step1 {
  padding: 0 12px;
  padding-top: calc(7vh + 25px);
}

/* ---- Title & description ---- */
.ui4-step1-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: uppercase;
  margin: -10px 0 4px;
  flex-shrink: 0;
}
.ui4-step1-desc {
  font-size: 16px;
  color: rgba(255,255,255,1);
  font-style: italic;
  text-align: center;
  margin: 0 0 12px;
  flex-shrink: 0;
}

/* ---- UI5B Cards (side-by-side videos) ---- */
.ui5b-cards {
  display: flex; gap: 8px; padding: 28px 20px 0; flex: 1; min-height: 0;
  align-items: flex-start;
  justify-content: center;
}
.ui5b-card {
  flex: 0 0 calc((100% - 8px) / 2); width: calc((100% - 8px) / 2); aspect-ratio: 9/16; border-radius: 12px; overflow: hidden;
  position: relative; opacity: 0.6; cursor: pointer;
  transition: opacity 0.3s, border 0.3s;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid transparent;
  background: #0a0a0a;
  align-self: flex-start;
}
.ui5b-poster,
.ui5b-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ui5b-poster {
  z-index: 0;
}
.ui5b-card video {
  z-index: 1;
  opacity: 0;
  visibility: hidden;
}
.ui5b-card.video-ready .ui5b-poster { opacity: 0; }
.ui5b-card.video-ready video { opacity: 1; visibility: visible; }
.ui5b-card.active {
  opacity: 1; border: 1.5px solid rgba(139,92,246,0.6);
}
.ui5b-check {
  position:absolute; top:8px; right:8px; width:20px; height:20px;
  border-radius:50%; background:#22c55e;
  display:none; align-items:center; justify-content:center;
  z-index: 2;
}
.ui5b-check svg { width:12px; height:12px; }
.ui5b-card.active .ui5b-check { display:flex; }
.ui5b-labels {
  display:flex; gap:8px; padding:8px 20px 0;
}
.ui5b-lbl {
  flex:1; text-align:center; font-size:17px; font-weight:400;
  color:rgba(255,255,255,0.35); text-transform:uppercase; letter-spacing:0.5px;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.ui5b-lbl.active { color:#fff; font-weight:700; }

.ui4-bottom-nav.ui5b-step1-nav-clear {
  background: none;
}

/* ---- Step 1 hint ---- */
.ui4-step1-hint {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 8px;
  flex-shrink: 0;
}

/* ============================================
   Fixed Bottom Nav
   ============================================ */
.ui4-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  z-index: 50;
  padding: 16px 16px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ui4-bottom-nav .btn-continue {
  margin-top: 0;
}
.ui4-bottom-nav .btn-summary-cta {
  margin-top: 0;
  margin-bottom: 0;
}

.btn-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  animation: btnPulse 2.5s ease-in-out infinite;
  transition: transform 0.15s;
}
.btn-continue:active {
  transform: scale(0.97);
  animation: none;
}
.btn-continue::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: btnShimmer 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 24px rgba(139,92,246,0.45); }
  50% { transform: scale(1.015); box-shadow: 0 3px 12px rgba(139,92,246,0.35); }
}
@keyframes btnShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ============================================
   Progress Bar
   ============================================ */
.ui4-top-chrome {
  display: none;
  position: relative;
  z-index: 20;
}
.ui4-top-chrome.visible {
  display: block;
}
.ui4-progress-inner {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 12px;
}
.progress-bar {
  display: flex;
  gap: 2px;
  margin: 0 -12px 20px;
  overflow: hidden;
}

.progress-fill {
  display: none;
}

.progress-seg {
  flex: 1;
  height: 5px;
  border-radius: 1px;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s ease;
}

.progress-seg.done {
  background: #8b5cf6;
}

#stepCarousel,
#stepNameAge {
  position: relative;
}

.ui4-back-btn {
  position: absolute;
  top: 8px;
  left: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 10;
  line-height: 0;
  display: none;
  -webkit-tap-highlight-color: transparent;
}
.ui4-back-btn.visible {
  display: block;
}
.ui4-back-btn svg {
  width: 22px;
  height: 22px;
}

/* ============================================
   Carousel Steps (2-10)
   ============================================ */
#stepCarousel {
  padding: 0 12px;
  min-height: calc(100dvh - 140px);
}
#carouselInner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 7vh;
  transition: opacity 180ms ease;
}

.carousel-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: -10px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.carousel-subtitle {
  text-align: center;
  font-size: 16px;
  color: rgba(255,255,255,0.90);
  font-style: italic;
  margin: 0 0 12px;
}

/* ---- Carousel Container ---- */
.carousel-wrap {
  position: relative;
  overflow: hidden;
  height: 370px;
  margin: 0 -12px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-track {
  display: flex;
  gap: 12px;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  align-items: center;
  will-change: transform;
}

.carousel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.carousel-fade-l {
  left: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85), transparent);
}
.carousel-fade-r {
  right: 0;
  background: linear-gradient(to left, rgba(0,0,0,0.85), transparent);
}

/* ---- Carousel Card ---- */
.cc {
  width: 210px;
  min-width: 210px;
  height: 315px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: scale(0.65) translateY(22px);
  will-change: transform, opacity;
  cursor: grab;
  flex-shrink: 0;
}
.cc:active { cursor: grabbing; }

/* Active card glow */
.cc {
  box-shadow: 0 0 0 1.5px rgba(var(--brand-rgb),0.35);
}
.cc.cc-active {
  box-shadow: 0 4px 16px rgba(var(--brand-rgb),0.3), 0 0 0 1.5px rgba(var(--brand-rgb),0.6);
}

/* Image background -- always visible until video takes over */
.cc-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background: rgba(var(--card-bg-rgb), 1);
}

/* Video background -- sits above image, hidden until ready */
.cc-bg-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
}
/* When video is ready, show it instantly (no fade = no flicker) */
.cc.video-ready .cc-bg-vid { opacity: 1; }

/* Emoji background */
.cc-bg-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  z-index: 1;
}

/* Gradient overlay */
.cc-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
  z-index: 3;
  pointer-events: none;
}

/* Label */
.cc-label {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  z-index: 4;
}

#namePreviewLabel {
  bottom: 12px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  font-style: italic;
  letter-spacing: 0;
  line-height: 1.25;
}

/* Checkmark */
.cc-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--check-ok, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cc.cc-active .cc-check {
  opacity: 1;
  transform: scale(1);
}
.cc-check svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Voice Waveform ---- */
.cc-waveform {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 5;
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 0 10px 8px;
  pointer-events: none;
}
.cc.audio-playing .cc-waveform {
  display: flex;
}
.cc.audio-playing .cc-label {
  bottom: 40px;
}
.cc-wf-bar {
  width: 3px;
  border-radius: 2px;
  background: rgba(139, 92, 246, 0.85);
  transform-origin: bottom;
  animation: wfPulse 0.5s ease-in-out infinite;
}
@keyframes wfPulse {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(0.25); }
}

/* ---- Dot Indicators ---- */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 4px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s, transform 0.3s;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  position: relative;
  cursor: pointer;
}
.dot::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
}
.dot.active {
  background: var(--brand);
  transform: scale(1.3);
}

/* ============================================
   Step 11 — Name & Age
   ============================================ */
#stepNameAge {
  padding: 0 12px;
  min-height: calc(100dvh - 140px);
}
/* Same layout as #carouselInner -- flex:1, center content vertically */
.ui4-name-age-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 7vh;
}
.ui4-name-age-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ui4-name-age-center > .carousel-subtitle {
  margin-bottom: 0;
}

/* Name step preview card */
.ui4-name-preview-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  height: 370px;
  align-items: center;
}
.ui4-name-preview-card {
  width: 210px;
  height: 315px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #0a0a0a;
  box-shadow: 0 4px 16px rgba(var(--brand-rgb), 0.3), 0 0 0 1.5px rgba(var(--brand-rgb), 0.6);
}
.ui4-name-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Name field */
.ui4-name-field {
  width: 100%;
  max-width: 320px;
  margin: 16px auto 0;
}
.ui4-name-input-row {
  position: relative;
}
.ui4-name-input-row input {
  width: 100%;
  height: 56px;
  padding: 0 58px;
  border: 1px solid rgba(var(--brand-rgb),0.4);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  outline: none;
  font-family: inherit;
}
.ui4-name-input-row input::placeholder {
  color: rgba(255,255,255,0.3);
  font-style: italic;
}
.ui4-name-input-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(var(--brand-rgb),0.25);
}
.ui4-name-input-row input.input-error {
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(248,113,113,0.25);
}
.ui4-name-error {
  display: none;
  margin-top: 8px;
  color: #f87171;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  min-height: 18px;
}
.ui4-name-error.visible { display: block; }
.ui4-btn-roll {
  position: absolute;
  right: 8px;
  top: 0;
  bottom: 0;
  margin: auto;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ui4-btn-roll:hover { background: rgba(var(--brand-rgb),0.15); }
.ui4-btn-roll:active { background: rgba(var(--brand-rgb),0.3); }
.ui4-btn-roll.spinning {
  animation: diceSpin 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes diceSpin {
  0%   { transform: rotate(0deg) scale(1); }
  30%  { transform: rotate(180deg) scale(1.2); }
  70%  { transform: rotate(330deg) scale(0.95); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ============================================
   Step 12 — Summary
   ============================================ */
#stepSummary {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  padding: 0;
}
#stepSummary .carousel-title {
  font-size: 22px;
  margin-top: 20px;
  margin-bottom: 10px;
}
.step-summary-scroll {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--brand-rgb), 0.65) rgba(255,255,255,0.06);
}
.step-summary-scroll::-webkit-scrollbar {
  width: 12px;
}
.step-summary-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.06);
}
.step-summary-scroll::-webkit-scrollbar-thumb {
  background: rgba(var(--brand-rgb), 0.65);
  border-radius: 999px;
  border: 3px solid rgba(0,0,0,0);
  background-clip: padding-box;
}
.step-summary-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--brand-rgb), 0.82);
  background-clip: padding-box;
}
.step-summary-content {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 104px);
}

.summary-preview {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin-bottom: 16px;
  background: #0a0a0a;
  border: 1px solid rgba(var(--brand-rgb),0.25);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ui4e-video-card,
#summaryVideo {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.summary-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  opacity: 1;
  transition: opacity 220ms ease;
}
.summary-preview video.video-restarting {
  opacity: 0;
}
.summary-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.15) 100%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(8px);
  z-index: 1;
  pointer-events: none;
  transition: opacity 140ms linear, filter 140ms linear;
}

.summary-subtitle {
  display: none;
}
.summary-preview-info {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 5;
}
.summary-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}
.summary-age {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

/* ---- Creation Loading Overlay ---- */
.creation-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: opacity 0.5s ease;
}
.creation-loading.fade-out { opacity: 0; pointer-events: none; }
.creation-heart {
  position: absolute;
  font-size: 22px;
  opacity: 0.5;
  pointer-events: none;
  animation: driftHeart 3s ease-in-out infinite, floatPulse 5s ease-in-out infinite;
}
.creation-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-hover), var(--brand), var(--brand-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  position: relative;
  z-index: 2;
}
.creation-progress-wrap {
  width: 100%;
  max-width: 220px;
  position: relative;
  z-index: 2;
}
.creation-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.creation-pct { color: #fff; }
.creation-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  overflow: hidden;
}
.creation-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--brand-hover));
  border-radius: 100px;
  transition: width 0.1s linear;
}
.creation-status {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  position: relative;
  z-index: 2;
}
@keyframes driftHeart {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}
@keyframes floatPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.2; }
}

/* ---- Summary Grid ---- */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.summary-card {
  position: relative;
  overflow: hidden;
  height: 64px;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--brand-rgb),0.25);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.2s;
}
.summary-card:active { opacity: 0.8; }
.summary-card.full-width {
  grid-column: 1 / -1;
}
.summary-card-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  border-radius: 0 10px 10px 0;
  display: none;
}
.summary-card-bg[src]:not([src=""]) { display: block; }
.summary-card-emoji {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
}
.summary-card-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}
.summary-card-value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}

/* ---- Preview CTA (inside summary-preview) ---- */
.btn-preview-cta {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: calc(100% - 40px);
  max-width: 280px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  animation: btnPreviewPulse 2.5s ease-in-out infinite;
}
.btn-preview-cta:active,
.btn-preview-cta.btn-pressed {
  transform: translate(-50%, -50%) scale(0.97) !important;
  animation: none;
}
.btn-preview-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: btnShimmer 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btnPreviewPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); box-shadow: 0 4px 24px rgba(139,92,246,0.45); }
  50% { transform: translate(-50%,-50%) scale(1.015); box-shadow: 0 3px 12px rgba(139,92,246,0.35); }
}

/* ---- Summary bottom CTA ---- */
.btn-summary-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin-top: 20px;
  margin-bottom: 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  animation: btnPulse 2.5s ease-in-out infinite;
  transition: transform 0.15s;
}
.btn-summary-cta:active {
  transform: scale(0.97);
  animation: none;
}
.btn-summary-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: btnShimmer 3s ease-in-out infinite;
  pointer-events: none;
}


.btn-summary-cta:disabled,
.btn-summary-cta.is-inactive {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  animation: none;
  transform: none;
}

.btn-summary-cta:disabled::after,
.btn-summary-cta.is-inactive::after {
  opacity: 0;
  animation: none;
}
/* ---- Summary Edit Modal (ui3-style) ---- */
.sum-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sum-modal-overlay.open { display: flex; }

.sum-modal {
  position: relative;
  background: #0a0a0a;
  border: 1px solid rgba(var(--brand-rgb),0.2);
  border-radius: 12px;
  max-width: 28rem;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}
.sum-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.sum-modal-header h2 {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.sum-modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.sum-modal-close:hover { color: #fff; }

.sum-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Image-backed option (like ui3 modal-option-img) */
.sum-modal-opt-img {
  position: relative;
  overflow: hidden;
  height: 48px;
  border-radius: 8px;
  border: 1px solid rgba(var(--brand-rgb),0.2);
  background: rgba(24,24,27,0.4);
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.sum-modal-opt-img:hover { background: rgba(39,39,42,0.3); }
.sum-modal-opt-img.selected {
  border-color: rgba(var(--brand-rgb),0.7);
}
.sum-modal-opt-img .sum-opt-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}
.sum-modal-opt-img .sum-opt-name {
  position: relative;
  z-index: 2;
  font-size: 14px;
  font-weight: 500;
  color: rgb(212,212,216);
}
.sum-modal-opt-img.selected .sum-opt-name { color: #fff; }

/* Emoji-backed option (like ui3 modal-option) */
.sum-modal-opt-emoji {
  border-radius: 8px;
  border: 1px solid rgba(var(--brand-rgb),0.2);
  background: #111;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: #fff;
  font-size: 14px;
  overflow: hidden;
}
.sum-modal-opt-emoji:hover {
  border-color: rgba(var(--brand-rgb),0.35);
  background: #1a1a1a;
}
.sum-modal-opt-emoji.selected {
  border-color: var(--brand);
}
.sum-modal-opt-emoji .sum-opt-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.sum-modal-opt-emoji .sum-opt-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}

/* ---- Touch press ---- */
.btn-pressed { transform: scale(0.96) !important; }

/* ---- Desktop adjustments ---- */
@media (min-width: 640px) {
  .content-area { max-width: 660px; }
  .style-video-wrap { max-height: 480px; }
  .ui5b-cards {
    gap: 16px;
    padding: 38px 10px 0;
  }
  .ui5b-card {
    flex: 0 0 calc((100% - 16px) / 2);
    width: calc((100% - 16px) / 2);
    max-width: 316px;
    border-radius: 14px;
  }
  .ui5b-labels {
    gap: 16px;
    padding: 16px 10px 0;
  }
  .ui5b-lbl {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.6px;
  }
  .ui5b-lbl.active {
    font-weight: 800;
  }
  .ui4-step1-hint {
    margin-top: 28px;
    font-size: 13px;
  }
  .carousel-title,
  .ui4-step1-title {
    font-size: 34px;
  }
  .carousel-subtitle,
  .ui4-step1-desc {
    font-size: 20px;
  }
  .carousel-wrap { height: 490px; margin: 0 -18px; }
  .carousel-fade { width: 60px; }
  .cc { width: 270px; min-width: 270px; height: 405px; }
  .ui4-name-preview-wrap { height: 490px; }
  .ui4-name-preview-card { width: 270px; height: 405px; }
  #namePreviewLabel { font-size: 15px; }
  .btn-continue,
  .btn-summary-cta {
    height: 62px;
    font-size: 19px;
    border-radius: 16px;
  }
  .btn-preview-cta {
    height: 60px;
    max-width: 310px;
    font-size: 18px;
    border-radius: 15px;
  }
  .ui4-bottom-nav {
    bottom: 12px;
    max-width: 660px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .ui4-progress-inner { max-width: 660px; }
  .step-summary-content { max-width: 660px; }
  .ui4e-summary-row {
    width: 352px;
    margin-left: auto;
    margin-right: auto;
  }
  .ui4e-video-card {
    width: calc(100% - 78px);
  }
  .ui4e-tiles {
    width: 72px;
    gap: 4px;
  }
  .ui4e-tile {
    justify-content: flex-end;
    padding: 0 6px 8px;
  }
  .ui4e-tile-label {
    font-size: 7px;
    margin-top: auto;
  }
  .ui4e-tile-value {
    font-size: 10px;
    margin-top: 1px;
  }
}

/* Shared ui4e-style summary layout for ui4a/ui4b/ui5 variants */

#stepSummary .carousel-title {
  font-size: 24px;
}

.ui4e-summary-row {
  position: relative;
  margin-bottom: 16px;
}

.ui4e-video-card {
  width: calc(100% - 86px);
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #0a0a0a;
  border: 1px solid rgba(var(--brand-rgb), 0.25);
}

.ui4e-video-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: blur(8px);
  opacity: 1;
  transition: opacity 220ms ease;
}

.ui4e-video-card video.video-restarting {
  opacity: 0;
}

.ui4e-tiles {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ui4e-tiles.is-inactive {
  opacity: 0.45;
  pointer-events: none;
}

.ui4e-tile {
  flex: 1;
  border-radius: 5px;
  border: 1px solid rgba(var(--brand-rgb), 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ui4e-tile:active {
  opacity: 0.7;
}

.ui4e-tile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ui4e-tile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.ui4e-tile-label {
  position: relative;
  z-index: 2;
  font-size: 6px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ui4e-tile-value {
  position: relative;
  z-index: 2;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.ui4e-tile-emoji {
  position: absolute;
  top: 50%;
  right: 5px;
  z-index: 2;
  font-size: 12px;
  transform: translateY(-50%);
}

.ui4e-tile--emoji {
  background: rgba(var(--brand-rgb), 0.06);
}

@media (orientation: landscape) and (max-height: 600px) {
  .content-area {
    max-width: 620px;
  }

  #step1 {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: #000;
  }

  #step1 .wizard-step-scroll {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    min-height: 0;
    overflow: hidden;
  }

  #step1 .wizard-step-scroll-inner {
    width: 100%;
    max-width: none;
    min-height: 100%;
    margin: 0;
    padding: 0;
    display: block;
  }

  #step1 .ui4-step1-title,
  #step1 .ui4-step1-desc {
    position: relative;
    z-index: 3;
    margin-left: 0;
    margin-right: 0;
    pointer-events: none;
  }

  #step1 .ui4-step1-title {
    font-size: 22px;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 16px 0;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.75);
  }

  #step1 .ui4-step1-desc {
    font-size: 14px;
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  }

  #step1 .ui5b-cards {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    gap: 0;
    padding: 0;
    margin: 0;
    display: flex;
    background: #000;
  }

  #step1 .ui5b-card {
    flex: 1 1 50%;
    width: auto;
    height: 100%;
    aspect-ratio: unset;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #0a0a0a;
    transform: none;
    transition: filter 0.3s ease;
  }

  #step1 #cardRealistic {
    background-image: url('../images6/720x1280_style_realistic_3.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }

  #step1 #cardAnime {
    background-image: url('../images6/anime/720x1280_style_anime_3.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }

  #step1 .ui5b-card + .ui5b-card {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  #step1 .ui5b-card::after {
    content: attr(data-label);
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 108px);
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
    z-index: 5;
    pointer-events: none;
  }

  #step1 .ui5b-poster,
  #step1 .ui5b-card video {
    object-position: center center;
    transition: filter 0.3s ease;
    pointer-events: none;
  }

  #step1 .ui5b-poster {
    opacity: 0.72;
    filter: saturate(0.92) brightness(0.9);
  }

  #step1 .ui5b-card video {
    display: block;
    opacity: 0;
    visibility: visible;
    filter: saturate(0.92) brightness(0.9);
  }

  #step1 .ui5b-card.video-ready.active video {
    opacity: 1;
    filter: none;
    transition: none;
  }

  #step1 .ui5b-card.video-ready.active .ui5b-poster {
    opacity: 0;
    transition: none;
  }

  #step1 .ui5b-card.video-ready:not(.active) video {
    opacity: 0;
  }

  #step1 .ui5b-card.active {
    box-shadow: none;
    border: 0;
    transform: none;
    filter: none;
  }

  #step1 .ui5b-card.active .ui5b-poster {
    opacity: 1;
    filter: none;
  }

  #step1 .ui5b-check {
    display: none !important;
  }

  #step1 .ui5b-labels,
  #step1 .ui4-step1-hint {
    display: none;
  }

  .ui4-bottom-nav.ui5b-step1-nav-clear {
    background: none;
  }

  .ui4-progress-inner,
  #stepCarousel .wizard-step-scroll-inner,
  #stepNameAge .wizard-step-scroll-inner,
  .step-summary-content {
    max-width: 620px;
  }

  .ui4-bottom-nav {
    width: min(620px, calc(100vw - 24px));
    max-width: none;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  #carouselInner,
  .ui4-name-age-inner {
    padding-top: 2px;
  }

  #stepCarousel .carousel-title,
  #stepNameAge .carousel-title {
    font-size: 20px;
    margin: -4px 0 0;
  }

  #stepCarousel .carousel-subtitle,
  #stepNameAge .carousel-subtitle {
    font-size: 12px;
    margin: 0 0 5px;
  }

  #stepCarousel .carousel-wrap {
    height: 248px;
    margin: 0;
  }

  #stepCarousel .carousel-fade {
    width: 24px;
  }

  #stepCarousel .cc {
    width: 152px;
    min-width: 152px;
    height: 228px;
    border-radius: 14px;
  }

  #stepCarousel .cc-label {
    font-size: 15px;
  }

  #stepCarousel .carousel-dots {
    margin-top: 6px;
    margin-bottom: 0;
  }

  #stepNameAge .ui4-name-preview-wrap {
    height: 248px;
  }

  #stepNameAge .ui4-name-preview-card {
    width: 152px;
    height: 228px;
    border-radius: 14px;
  }

  #stepNameAge .ui4-name-field {
    max-width: 280px;
    margin-top: 6px;
  }

  #stepNameAge .ui4-name-input-row input {
    height: 44px;
    font-size: 17px;
    padding: 0 50px;
  }

  #stepNameAge .ui4-btn-roll {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  #stepCarousel,
  #stepNameAge {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  #stepCarousel .wizard-step-scroll,
  #stepNameAge .wizard-step-scroll {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #stepCarousel .wizard-step-scroll-inner,
  #stepNameAge .wizard-step-scroll-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 104px);
  }

  #stepCarousel .wizard-step-scroll::-webkit-scrollbar,
  #stepNameAge .wizard-step-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  #stepSummary .carousel-title {
    font-size: 20px;
    margin-top: 10px;
    margin-bottom: 8px;
  }

  .ui4e-summary-row {
    width: 220px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12px;
  }

  .ui4e-video-card {
    width: calc(100% - 60px);
    border-radius: 9px;
  }

  .ui4e-tiles {
    width: 56px;
    gap: 2px;
  }

  .ui4e-tile {
    border-radius: 4px;
    padding: 0 4px;
  }

  .ui4e-tile-label {
    font-size: 5px;
  }

  .ui4e-tile-value {
    font-size: 7px;
  }

  .ui4e-tile-emoji {
    right: 4px;
    font-size: 10px;
  }

  .summary-preview-info {
    bottom: 10px;
    left: 10px;
  }

  .summary-name {
    font-size: 14px;
    margin-bottom: 1px;
  }

  .summary-age {
    font-size: 10px;
  }

  .creation-loading {
    gap: 8px;
  }

  .creation-heart {
    font-size: 12px;
  }

  .creation-title {
    font-size: 12px;
  }

  .creation-progress-wrap {
    max-width: 124px;
  }

  .creation-progress-labels {
    margin-bottom: 4px;
    font-size: 7px;
    letter-spacing: 0.35px;
  }

  .creation-track {
    height: 5px;
  }

  .creation-status {
    font-size: 9px;
    max-width: 124px;
  }

  .btn-preview-cta {
    width: calc(100% - 24px);
    max-width: 168px;
    height: 36px;
    border-radius: 11px;
    font-size: 10px;
    letter-spacing: 0.2px;
  }
}

@media (min-width: 640px) and (hover: hover) and (pointer: fine) {
  .content-area {
    max-width: 700px;
  }

  #step1 {
    padding-top: calc(3.5vh + 14px);
  }

  .ui4-progress-inner,
  #stepCarousel .wizard-step-scroll-inner,
  #stepNameAge .wizard-step-scroll-inner,
  .step-summary-content {
    max-width: 680px;
  }

  .ui4-bottom-nav {
    bottom: 18px;
    width: min(680px, calc(100vw - 36px));
    max-width: none;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding-top: 16px;
    padding-bottom: 16px;
  }

  #step1 .ui4-step1-title,
  #step1 .ui4-step1-desc {
    pointer-events: none;
  }

  #step1 .ui4-step1-title {
    font-size: 36px;
  }

  #step1 .ui4-step1-desc {
    font-size: 21px;
    margin-bottom: 0;
  }

  #step1 .ui5b-cards {
    gap: 14px;
    padding: 32px 18px 0;
    justify-content: center;
  }

  #step1 .ui5b-card {
    flex: 0 0 calc((100% - 14px) / 2);
    width: calc((100% - 14px) / 2);
    max-width: 244px;
    border-radius: 16px;
  }

  #step1 .ui5b-labels {
    display: flex;
    gap: 14px;
    width: min(calc(100% - 36px), 502px);
    margin: 0 auto;
    padding: 16px 0 0;
  }

  #step1 .ui5b-lbl {
    flex: 0 0 calc((100% - 14px) / 2);
    max-width: 244px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.65px;
  }

  #step1 .ui5b-lbl.active {
    font-weight: 800;
  }

  #step1 .ui4-step1-hint {
    display: block;
    margin-top: 24px;
    font-size: 11px;
    opacity: 0.58;
  }

  #carouselInner,
  .ui4-name-age-inner,
  .step-summary-content {
    padding-top: 3.5vh;
  }

  #stepCarousel .carousel-title,
  #stepNameAge .carousel-title {
    font-size: 36px;
    margin-top: -6px;
    margin-bottom: 6px;
  }

  #stepCarousel .carousel-subtitle,
  #stepNameAge .carousel-subtitle {
    font-size: 21px;
    margin-bottom: 32px;
  }

  #stepCarousel .carousel-wrap {
    height: 378px;
    margin: -12px -20px -24px;
  }

  #stepCarousel .carousel-track {
    top: 12px;
    height: calc(100% - 24px);
    align-items: flex-start;
  }

  #stepCarousel .carousel-fade {
    width: 68px;
  }

  #stepCarousel .cc {
    width: 228px;
    min-width: 228px;
    height: 342px;
  }

  #stepCarousel .cc-label {
    font-size: 20px;
  }

  #stepCarousel .carousel-dots {
    margin-top: 44px;
    margin-bottom: 0;
  }

  #stepNameAge .ui4-name-preview-wrap {
    height: 342px;
  }

  #stepNameAge .ui4-name-preview-card {
    width: 228px;
    height: 342px;
  }

  #stepNameAge .ui4-name-field {
    margin-top: 28px;
  }

  #namePreviewLabel {
    font-size: 16px;
  }

  .btn-continue,
  .btn-summary-cta {
    height: 64px;
    font-size: 20px;
    border-radius: 16px;
  }

  .btn-preview-cta {
    height: 60px;
    max-width: 320px;
    font-size: 15px;
    border-radius: 15px;
  }

  #stepSummary .carousel-title {
    font-size: 36px;
    margin-top: -6px;
    margin-bottom: 6px;
  }

  #stepSummary .summary-subtitle {
    display: block;
    font-size: 21px;
    margin: 0 0 32px;
  }

  .ui4e-summary-row {
    width: 324px;
    margin-bottom: 14px;
  }

  .ui4e-video-card {
    width: calc(100% - 80px);
    border-radius: 10px;
  }

  .ui4e-tiles {
    width: 72px;
    gap: 4px;
  }

  .ui4e-tile {
    justify-content: flex-end;
    padding: 0 6px 10px;
    border-radius: 5px;
  }

  .ui4e-tile-label {
    font-size: 7px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.35px;
    margin-top: auto;
  }

  .ui4e-tile-value {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 2px;
  }

  .ui4e-tile-emoji {
    right: 6px;
    font-size: 12px;
  }
}

/* ============================================
   ui7 Step 1 Overrides
   ============================================ */
#step1 {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  padding: 0;
}

#step1 .ui5f-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  display: flex;
  z-index: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.2,0.64,1);
  will-change: transform;
}

#step1 .ui5f-slide {
  width: 50%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}

#step1 .ui5f-poster,
#step1 .ui5f-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#step1 .ui5f-poster {
  z-index: 0;
}

#step1 .ui5f-slide video {
  z-index: 1;
  opacity: 0;
}

#step1 .ui5f-slide.video-ready .ui5f-poster {
  opacity: 0;
}

#step1 .ui5f-slide.video-ready video {
  opacity: 1;
}

#step1 .ui5f-toggles {
  position: absolute;
  top: 16px;
  right: 14px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

#step1 .ui5f-circle {
  min-width: 112px;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.25s ease;
}

#step1 .ui5f-circle.active {
  background: rgba(139,92,246,0.8);
  border: 2px solid #fff;
  color: #fff;
}

#step1 .ui5f-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 40px 16px calc(env(safe-area-inset-bottom,0px) + 16px);
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

#step1 .ui5f-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

#step1 .ui5f-subtitle {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: rgba(255,255,255,1);
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

#step1 .ui5f-cta {
  margin-bottom: 0;
}

.ui4-bottom-nav.ui5f-step1-nav-clear {
  background: none;
}

@media (min-width: 640px) and (hover: hover) and (pointer: fine) {
  #step1 .ui5f-bottom {
    bottom: 0;
    padding-top: calc(3.5vh + 14px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 34px);
  }

  #step1 .ui5f-title {
    font-size: 36px;
    margin-bottom: 6px;
  }

  #step1 .ui5f-subtitle {
    font-size: 21px;
  }

  #step1 .ui5f-circle {
    min-width: 132px;
    height: 48px;
    font-size: 13px;
  }

  #step1 .ui5f-cta {
    height: 64px;
    font-size: 20px;
    border-radius: 16px;
  }
}

/* ============================================
   ui7 Step 2-10 Static Card Grid
   ============================================ */
.content-area {
  overflow-x: visible;
}

#stepCarousel {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 14px;
  box-sizing: border-box;
  overflow: hidden;
}

#stepCarousel .wizard-step-scroll {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#stepCarousel .wizard-step-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

#stepCarousel .wizard-step-scroll-inner {
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0 auto;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 112px);
}

#stepCarousel #carouselInner {
  width: 100%;
  min-height: 100%;
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
}

#stepNameAge .ui4-name-age-inner {
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
}

#ui4TopChrome .ui4-back-btn {
  top: 0;
  left: 4px;
}

#stepCarousel .carousel-center {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

#stepCarousel .carousel-subtitle {
  margin-bottom: 12px;
}

#stepCarousel .ui7-card-grid-wrap,
#stepCarousel .carousel-wrap {
  height: auto;
  margin: 0 auto;
  overflow: visible;
  touch-action: pan-y;
  user-select: auto;
  -webkit-user-select: auto;
}

#stepCarousel .carousel-track {
  position: static;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 344px);
  height: auto;
  margin: 0 auto;
  padding: 2px;
  box-sizing: border-box;
  align-items: stretch;
  justify-content: center;
  transform: none !important;
  will-change: auto;
}

#stepCarousel .carousel-fade,
#stepCarousel .carousel-dots {
  display: none !important;
}

#stepCarousel .cc {
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 2 / 3;
  opacity: 1 !important;
  transform: none !important;
  cursor: pointer;
  border-radius: 14px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#stepCarousel .cc:active {
  cursor: pointer;
}

#stepCarousel .cc:focus,
#stepCarousel .cc:focus-visible {
  outline: none;
}

#stepCarousel .cc img,
#stepCarousel .cc video {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

#stepCarousel .cc-label {
  padding: 0 8px;
  font-size: 15px;
  line-height: 1.15;
}

#stepCarousel .cc-bg-emoji {
  font-size: 44px;
}

@media (orientation: landscape), (min-width: 640px) {
  #stepCarousel .wizard-step-scroll-inner {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  }

  #stepCarousel #carouselInner {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }

  #stepCarousel .carousel-center {
    max-width: none;
  }

  #stepCarousel .carousel-subtitle {
    margin-bottom: 12px;
  }

  #stepCarousel .carousel-track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: calc(100vw - 36px);
    gap: 8px;
    align-items: center;
    justify-content: center;
  }

  #stepCarousel .cc {
    flex: 0 1 clamp(120px, calc((100vw - 92px) / 6), 172px);
    width: clamp(120px, calc((100vw - 92px) / 6), 172px);
    min-width: 0;
    max-width: 172px;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  #stepCarousel {
    height: 100dvh;
    min-height: 0;
  }

  #stepCarousel .wizard-step-scroll-inner,
  #stepNameAge .wizard-step-scroll-inner {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 136px);
  }

  #stepCarousel #carouselInner {
    padding-top: calc(env(safe-area-inset-top, 0px) + 2px);
  }

  #stepCarousel .carousel-title {
    font-size: 20px;
    margin: -4px 0 0;
  }

  #stepCarousel .carousel-subtitle {
    font-size: 12px;
    margin: 0 0 8px;
  }

  #stepCarousel .carousel-track {
    max-width: calc(100vw - 28px);
    gap: 6px;
  }

  #stepCarousel .cc {
    flex-basis: min(118px, calc((100vw - 76px) / 6));
    width: min(118px, calc((100vw - 76px) / 6));
    max-width: 128px;
    border-radius: 12px;
  }

  #stepCarousel .cc-label {
    font-size: 12px;
  }

  .ui4-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    transform: none;
    padding: 10px 14px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    background: linear-gradient(to top, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.9) 72%, transparent 100%);
    box-sizing: border-box;
  }

  .ui4-bottom-nav .btn-continue,
  .ui4-bottom-nav .btn-summary-cta {
    height: 48px;
    border-radius: 14px;
    font-size: 16px;
  }
}

@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  #step1 .ui5f-poster,
  #step1 .ui5f-slide video {
    object-position: center 20%;
  }

  #stepCarousel #carouselInner {
    padding-top: clamp(76px, 10vh, 128px);
  }

  #stepNameAge .ui4-name-age-inner,
  #stepSummary .step-summary-content {
    padding-top: clamp(76px, 10vh, 128px);
  }

  #stepCarousel .carousel-center {
    max-width: none;
  }

  #stepCarousel .carousel-subtitle {
    margin-bottom: 32px;
  }

  #stepCarousel .carousel-track {
    max-width: calc(100vw - 56px);
    gap: 12px;
    margin-top: clamp(20px, 4vh, 56px);
  }

  #stepCarousel .cc {
    flex-basis: clamp(132px, calc((100vw - 132px) / 6), 196px);
    width: clamp(132px, calc((100vw - 132px) / 6), 196px);
    max-width: 196px;
    border-radius: 16px;
  }

  #stepCarousel .cc-label {
    font-size: 18px;
  }
}

/* ui7 desktop full-width progress chrome */
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  .ui4-top-chrome {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .ui4-progress-inner {
    width: 100vw;
    max-width: none;
    padding: 0;
  }

  .progress-bar {
    margin: 0 0 20px;
  }

  #ui4TopChrome .ui4-back-btn,
  .ui4-back-btn {
    left: 8px;
  }
}

/* ui7 variants: preview CTA is disabled */
#btnPreviewCta,
.btn-preview-cta {
  display: none !important;
}

#stepSummary .ui4e-video-card,
#stepSummary .ui4e-video-card *,
#summaryVideo {
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent;
}

.summary-feature-icons {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.summary-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.96;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.28));
}

.summary-feature-icon svg {
  display: block;
}
