/* === ca6f base reset === */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    /* ===== CSS VARIABLES (ca6f theme) ===== */
    :root {
      --primary: #0e0e0e;
      --secondary: #1a1a1a;
      --accent: #ae52e7;
      --accent-hover: #9a47d1;
      --white: #fff;
      --gray-300: #d1d5db;
      --gray-500: #6b7280;
      --gray-700: #374151;
      --gray-900: #111827;
      --pink-accent: #fe6283;
      --light-blue: #e9f2ff;
      --semi-transparent-white: #ffffff1f;
      --font-size-xs: 0.75rem;
      --font-size-s: 0.875rem;
      --font-size-m: 1rem;
      --font-size-l: 1.125rem;
      --font-size-xl: 1.25rem;
      --font-size-2xl: 1.5rem;
      --font-size-3xl: 1.875rem;
      --font-size-4xl: 2.25rem;
      --spacing-xs: 0.25rem;
      --spacing-s: 0.5rem;
      --spacing-m: 1rem;
      --spacing-l: 1.5rem;
      --spacing-xl: 2rem;
      --spacing-2xl: 3rem;
      --rounded-s: 0.25rem;
      --rounded-m: 0.5rem;
      --rounded-l: 0.75rem;
      --rounded-xl: 1rem;
      --rounded-2xl: 1.5rem;
      --shadow-sm: 0 1px 2px 0 #0000000d;
      --shadow-m: 0 4px 6px -1px #0000001a;
      --shadow-l: 0 10px 15px -3px #0000001a;
      --shadow-xl: 0 20px 25px -5px #0000001a;
      --gradient-bg: linear-gradient(143deg, #4e283c 37.31%, #271a2b 112.95%);
      --gradient-pink: linear-gradient(90deg, #8350cb, #fe6283);
      --transition-fast: 0.2s ease;
      --transition-normal: 0.3s ease;
      --transition-slow: 0.5s ease;
      --container-max-width: 1200px;
      --progress-stepper-width-desktop: 505px;
      --progress-stepper-width-mobile: 355px;
    }

    /* SUMMARY â€” desktop and landscape layout */
    @media (orientation: landscape), (min-width: 541px) {
      .summary-wrap {
        display: grid;
        grid-template-columns: 15fr 8fr; /* JS kirjutab vajadusel px-idega Ã¼le */
        column-gap: 10px;
        align-items: start;
      }

      .summary-hero {
        position: relative;
        aspect-ratio: 9 / 16;
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid var(--accent-2);
        background: rgba(255, 255, 255, 0.05);
      }

      .summary-right {
        height: 100%;
        display: grid;
        /* Desktop/Landscape: 2 columns x 5 rows (compact like mobile) */
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .summary-tile {
        position: relative;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid var(--accent-2);
        background: rgba(255, 255, 255, 0.05);
        aspect-ratio: 3 / 4;
      }

      .summary-dim { display: none !important; }

      .summary-icon-wrap {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 6px;
      }

      .summary-icon {
        font-size: 35px;
        opacity: .95;
      }
    }

    /* Desktop content widths defined later in the file (late overrides) */

    /* Style step (1) â€” show two style cards sideâ€‘byâ€‘side in landscape/desktop */
    @media (orientation: landscape), (min-width: 768px) {
      .style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
      /* Constrain summary wrap to keep tiles compact */
      .summary-wrap { max-width: 28rem; margin-left: auto; margin-right: auto; }
      /* Slightly increase gaps to reduce per-tile width further */
      .summary-right { gap: 12px; }
    }

html {
  scroll-behavior: smooth;
}

/* Normalize text auto-sizing across mobile browsers (Android/iOS) */
html, body{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
      min-height: 100vh;
      background: linear-gradient(143deg, var(--bg-1, #4e283c) 37.31%, var(--bg-2, #271a2b) 112.95%) !important;
      color: #fff;
      font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
      overflow-x: hidden;
    }

    .video-bg {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      height: 100svh;
      object-fit: cover;
      z-index: -2;
      pointer-events: none;
      will-change: transform;
    }

    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.5);
      z-index: -1;
      pointer-events: none;
    }

    .hidden {
      display: none !important;
    }

    .page-wrapper {
      position: relative;
      min-height: 100vh;
      padding-top: 0;
      padding-bottom: 0;
      display: flex;
      justify-content: center;
      align-items: flex-start;
    }

.content {
      width: min(92vw, 26rem);
      display: flex;
      flex-direction: column;
      gap: 14px;
      text-align: center;
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 16px;
      padding: 20px 18px;
      padding-top: calc(20px + env(safe-area-inset-top, 0px));
      padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
      backdrop-filter: saturate(120%) blur(10px);
      -webkit-backdrop-filter: saturate(120%) blur(10px);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
      margin-bottom: 20px;
      position: relative;
      overflow: hidden;
}

    .content>*:last-child {
      margin-bottom: 0 !important;
    }

    .trust-bar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(0, 0, 0, 0.9);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      padding: 8px 12px;
      z-index: 10;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 16px;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.8);
      animation: slideUp 0.5s ease-out 1s both;
    }

    @keyframes slideUp {
      from {
        transform: translateY(100%);
      }

      to {
        transform: translateY(0);
      }
    }

    .trust-item {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .trust-icon {
      width: 16px;
      height: 16px;
      opacity: 0.9;
    }

    .value-banner {
      background: #151515;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      padding: 8px 12px;
      margin-bottom: 10px;
      text-align: center;
      animation: fadeIn .8s ease-out .3s both;
    }

    /* Make value banner look interactive when used as CTA on step 7 */
    .value-banner.clickable { cursor: pointer; }
    .value-banner.clickable:hover { background: rgba(255,255,255,0.08); }
    .summary-wrap.clickable { cursor: pointer; }
    /* Dim removed on summary */

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .value-text {
      font-size: 14px;
      font-weight: 600;
      color: #fff;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .value-text .highlight {
      color: var(--accent-2);
      font-weight: 700;
      transition: transform .2s ease;
      display: inline-block;
    }

    @media (max-width:390px) {
      .value-banner {
        padding: 7px 10px;
        margin-bottom: 8px;
      }

      .value-text {
        font-size: 13px;
      }
    }

    .progress-bar {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: rgba(255, 255, 255, 0.1);
      border-top-left-radius: inherit;
      border-top-right-radius: inherit;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      overflow: hidden;
    }

    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
      transition: width .3s cubic-bezier(.4, 0, .2, 1);
      box-shadow: 0 0 10px color-mix(in srgb, var(--accent-2) 40%, transparent);
    }

    .section-title {
      font-weight: 800;
      font-size: clamp(17px, 4vw, 24px);
      letter-spacing: -0.5px;
      line-height: 1.3;
      margin: 0;
      color: #fff;
      text-transform: uppercase;
      
    }

    .section-subtitle {
      font-weight: 600;
      font-size: clamp(14px, 4vw, 18px);
      line-height: 1.2;
      margin: 0 0 10px 0;
      color: #fff;
    }

    .btn-primary {
      background: linear-gradient(103deg, #de8424, #fc658f 31%, #8049f3);
      color: #fff;
      border: 0;
      border-radius: 14px;
      padding: 16px 24px;
      font-weight: 700;
      font-size: 18px;
      text-transform: uppercase;
      letter-spacing: .5px;
      line-height: 1;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      min-height: 52px;
      margin-top: 24px;
      cursor: pointer;
      box-shadow: 0 8px 24px rgba(255, 112, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
      transition: all .2s cubic-bezier(.4, 0, .2, 1);
      position: relative;
      overflow: hidden;
    }

    .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;                 /* jÃ¤Ã¤b konteineri sisse */
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transform: translateX(-120%);      /* start vÃ¤ljaspool vasakul */
  transition: transform .6s ease;    /* animatsioon transformâ€™iga */
  pointer-events: none;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.btn-primary:not(:disabled):hover::before {
  transform: translateX(120%);       /* libise paremale vÃ¤lja */
}
/* Prevent hover-lighten on single-action steps (CTA step re-enables via .cta-action) */
.navigation-wrapper.single-action:not(.cta-action) .btn-primary::before{ display: none; }
.navigation-wrapper.single-action:not(.cta-action) .btn-primary:not(:disabled):hover{
  background: var(--accent-2) !important;
}
.btn-primary.is-pressed,
.btn-primary:not(:disabled):active{
  transform: scale(0.96) translateY(3px) !important;
  filter: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

    .btn-primary:disabled {
      opacity: .4;
      cursor: not-allowed;
    }

@media (hover: hover) {
  .btn-primary:not(:disabled):hover {
    background: linear-gradient(103deg, #de8424, #fc658f 31%, #8049f3);
    box-shadow: 0 12px 32px rgba(255, 112, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.3);
  }
}
@supports (-webkit-touch-callout: none) {
  .btn-primary:not(:disabled):active,
  .navigation-wrapper .btn-primary:not(:disabled):active,
  .navigation-wrapper .btn-primary.is-pressed{
    transform: scale(0.96) translateY(3px) !important;
    -webkit-transform: scale(0.96) translateY(3px) !important;
    background: var(--accent-2) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
    filter: none !important;
    transition: transform .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, .2, 1) !important;
    -webkit-transition: -webkit-transform .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, .2, 1) !important;
  }
}
    .btn-primary.no-anim {
      animation: none !important;
    }

    .trust-mini {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      margin-top: 16px;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.6);
      font-weight: 500;
      animation: fadeIn .5s ease-out .8s both;
    }

    .style-grid {      display: grid; grid-template-columns: 1fr 1fr;
      gap: 12px;
      width: 100%;
    }

    .style-card {
      position: relative;
      border-radius: 14px;
      overflow: hidden;
      border: 2px solid transparent;
      background: rgba(255, 255, 255, 0.05);
      aspect-ratio: 9/16;
      display: flex;
      align-items: stretch;
      justify-content: stretch;
      -webkit-tap-highlight-color: transparent;
      transition: all .2s ease;
      cursor: pointer;
    }

    .style-card button {
      all: unset;
      position: relative;
      width: 100%;
      height: 100%;
      cursor: pointer;
      display: block;
    }

.style-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  transition: transform .2s ease;
}

    @media(hover:hover) {
      .style-card:hover {
        transform: scale(1.03);
        border-color: rgba(255, 255, 255, 0.2);
      }
    }

    /* (old .style-badge capsule styles removed) */
    .style-card.selected {
      border-color: var(--accent-1);
      box-shadow:
        0 0 0 3px color-mix(in srgb, var(--accent-1) 35%, transparent),
        0 8px 24px color-mix(in srgb, var(--accent-1) 25%, transparent);
    }

    .style-check {
      position: absolute;
      right: 10px;
      top: 10px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
      display: none;
      place-items: center;
      z-index: 2;
      font-size: 16px;
      font-weight: 700;
      box-shadow: 0 4px 12px rgba(255, 112, 0, 0.3);
      animation: checkIn .3s cubic-bezier(.34, 1.56, .64, 1);
    }

    @keyframes checkIn {
      from {
        transform: scale(0);
      }

      to {
        transform: scale(1);
      }
    }

.style-card.selected .style-check {
  display: grid;
}

/* Selected style card: make video appear slightly larger */
.style-card.selected video{
  transform: scale(1.03);
}

    .grid {
      display: grid;
      gap: 10px;
      width: 100%;
    }

    .grid-3 {
      grid-template-columns: repeat(3, 1fr);
    }

    .card {
      position: relative;
      border-radius: 12px;
      overflow: hidden;
      border: 2px solid rgba(33, 33, 33, 1);
      background: rgba(21, 21, 21, 1);
      aspect-ratio: 3/4;
      display: flex;
      align-items: stretch;
      justify-content: stretch;
      transition: all .2s ease;
      cursor: pointer;
    }

    .card button {
      all: unset;
      width: 100%;
      height: 100%;
      cursor: pointer;
      display: block;
      position: relative;
    }

/* Ensure injected media covers the card area (steps 2â€“4 images) */
.card button img,
.card button picture,
.card button video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
  transition: transform .2s ease;
}

    /* (old .badge capsule styles removed) */
    .check {
      display: none;
      position: absolute;
      right: 6px;
      top: 6px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
      place-items: center;
      z-index: 2;
      font-size: 12px;
      font-weight: 700;
      animation: checkIn .3s cubic-bezier(.34, 1.56, .64, 1);
    }

    .card.selected {
      border-color: var(--accent-1);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-1) 35%, transparent);
    }

.card.selected .check {
  display: grid;
}

/* Selected cards: default scale-up (non-ethnicity) */
.card.selected button img,
.card.selected button picture,
.card.selected button video {
  transform: scale(1.03);
}

/* Ethnicity cards: scale the wrapper uniformly instead of individual images */
.content #ethnicityGroup .eth-img-wrap { transition: transform .2s ease; transform-origin: center center; will-change: transform; }
.content #ethnicityGroup .card.selected .eth-img-wrap { transform: scale(1.03) !important; }
/* Prevent global per-image scaling for ethnicity, but preserve center translate for centering */
.content #ethnicityGroup .card.selected button img,
.content #ethnicityGroup .card.selected button picture,
.content #ethnicityGroup .card.selected button video { transform: none !important; }
.content #ethnicityGroup .card.selected button img.eth-img-center { transform: translateX(-50%) !important; }

    /* (old .card.selected .badge gradient removed) */
    .card.age {
      aspect-ratio: 16/9;
    }

    .card.age .num {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: clamp(16px, 4.5vw, 20px);
      z-index: 2; /* above dim overlay */
    }

    .card .dim {
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.12));
      z-index: 1; /* dim above image */
    }

    .card.icon-card .icon-content {
      position: absolute;
      z-index: 2; /* above dim overlay */
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px;
    }

.card.icon-card .icon {
  font-size: 40px; /* bigger in all views */
  line-height: 1;
}

.card.icon-card .icon svg{
  display: block;
  width: 44px;
  height: 44px;
}

.card.icon-card[data-type="relationship"] .icon svg{
  width: 76px;
  height: 76px;
}

/* Hook: recolor relationship icons via currentColor */
.card.icon-card[data-type="relationship"] .icon{ color: #fff; }
.card.icon-card[data-type="relationship"] .icon svg path{ fill: currentColor !important; }

.card.icon-card.voice-card .icon {
  font-size: 36px; /* bigger in all views */
  color: #fff; /* default icon (triangle/bars) color via currentColor */
}

/* Mobile portrait: make step 5 emojis/icons larger */
@media (orientation: portrait) and (max-width: 540px){
  .card.icon-card .icon { font-size: 44px; }
.card.icon-card.voice-card .icon { font-size: 40px; }
}

.summary-icon svg{
  display: block;
  width: 44px;
  height: 44px;
}

/* Voice summary icon follows currentColor */
#summaryVoice .summary-icon { color: #fff; }

.summary-icon.summary-icon--text{
  font-size: 33px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  letter-spacing: 0.02em;
  min-width: 2ch;
}

#summaryRelationship .summary-icon svg{
  width: 76px;
  height: 76px;
}
/* Hook: recolor relationship icon in summary via currentColor */
#summaryRelationship .summary-icon{ color: #fff; }
#summaryRelationship .summary-icon svg path{ fill: currentColor !important; }

.group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* Consistent spacing between groups (cards â†’ next heading) */
.group + .group { margin-top: 14px; }
@media (min-width: 768px) {
  /* Desktop already adds .grid margin-bottom; keep inter-group top spacing modest */
  .group + .group { margin-top: 8px; }
}

    .group-title {
      font-weight: 700;
      font-size: clamp(15px, 3.85vw, 18px);
      letter-spacing: -0.5px;
      text-align: center;
      color: rgba(255, 255, 255, 1);
      margin-top: 5px;
      margin-bottom: 6px;
      text-transform: uppercase;
      
    }

    .btn-secondary {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      min-height: 44px;
      margin-top: 8px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.2);
      background: rgba(255, 255, 255, 0.05);
      color: rgba(255, 255, 255, 0.9);
      font-weight: 600;
      font-size: 15px;
      cursor: pointer;
      transition: all .2s ease;
    }

    .btn-secondary:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.3);
    }

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

    .content.animating {
      pointer-events: none;
    }

    @keyframes cardOut {
      0% {
        opacity: 1;
        transform: scale(1);
      }

      100% {
        opacity: 0;
        transform: scale(0.95);
      }
    }

    @keyframes cardIn {
      0% {
        opacity: 0;
        transform: scale(0.95);
      }

      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    .content.closing {
      animation: cardOut .2s ease-out forwards;
    }

    .content.opening {
      animation: cardIn .25s ease-out forwards;
    }

    @media (max-width:375px) {
      /* Unify small mobile portrait with larger portrait rules */
      .content { gap: 14px; padding: 20px 18px; }
      .section-title { font-size: clamp(15px, 3.6vw, 22px); }
      .section-subtitle { font-size: clamp(14px, 4vw, 18px); }
      .btn-primary { font-size: 18px; padding: 16px 24px; }
      .value-banner { padding: 8px 12px; margin-bottom: 10px; }
      .value-text { font-size: 13px; }
    }

    @media (orientation:landscape) and (max-height:500px) {
      .page-wrapper {
        padding-top: 20px;
      }

      .trust-bar {
        display: none;
      }
    }

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

      100% {
        background-position: 1000px 0;
      }
    }

    .skeleton {
      background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
      background-size: 1000px 100%;
      animation: shimmer 2s infinite;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    button:focus-visible {
      outline: 2px solid var(--accent-2);
      outline-offset: 2px;
    }

    button:focus {
      outline: none;
    }

    button:focus:not(:focus-visible) {
      outline: none;
    }

button,
.style-card,
.card {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation; /* eliminate 300ms click delay on iOS */
}

    @media (prefers-reduced-motion: reduce) {

      *,
      *::before,
      *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
      }

      .video-bg,
      .style-card video {
        display: none !important;
      }

      .overlay {
        background: rgba(0, 0, 0, 0.8);
      }
    }

    /* SUMMARY â€“ mobile portrait layout */
    @media (max-width: 540px) {
      .summary-wrap {
        display: grid;
        grid-template-columns: 15fr 8fr;
        /* JS kirjutab tÃ¤psete px-idega Ã¼le */
        column-gap: 8px;
        align-items: start;
      }

      .summary-hero {
        position: relative;
        aspect-ratio: 9 / 16;
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid var(--accent-2);
        background: rgba(255, 255, 255, 0.05);
      }

      .summary-right {
        height: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .summary-tile {
        position: relative;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid var(--accent-2);
        background: rgba(255, 255, 255, 0.05);
        aspect-ratio: 3 / 4;
      }

      .summary-dim {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.4));
        z-index: 0;
      }

      .summary-icon-wrap {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 6px;
      }

      .summary-icon {
        font-size: 31px;
        opacity: .95;
      }
    }

    /* (old summary compact badge blocks removed) */
    /* Step heading spacing */
    .step-heading {
      margin: 0 0 8px 0;
    }

    /* Colored emoji inside section-title (disables text-clip mask) */
    .section-title .emoji {
      background: none !important;
      -webkit-background-clip: initial !important;
      background-clip: initial !important;
      -webkit-text-fill-color: initial !important;
      color: inherit;
      margin-right: 6px;
    }

    /* Edge-to-edge badge â€“ COMMON BASE for all (style, card, summary) */
    .style-badge,
    .card .badge,
    .summary-wrap .summary-badge {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      padding: 4px 8px;
      font-size: 11px;
      line-height: 1.2;
      font-weight: 600; /* Ã¼htlustatud */
      background: rgba(0, 0, 0, 0.60);
      color: #fff;
      border: 0;
      border-radius: 0;
      border-bottom-left-radius: inherit;
      border-bottom-right-radius: inherit;
      display: flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-transform: capitalize;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      z-index: 2;
      pointer-events: none;
    }

    /* Selected â€“ one declaration is enough */
    .style-card.selected .style-badge,
    .card.selected .badge {
      background: rgba(0, 0, 0, 0.72) !important;
      border: 0 !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    /* Summary smaller badges (refinement) */
    .summary-right .summary-badge {
      padding: 2px 6px;
      font-size: 10px;
      line-height: 1.1;
    }
    @media (min-width: 768px) {
      .summary-right .summary-badge { font-size: 13px; padding: 4px 8px; }
      .summary-icon { font-size: 37px; }
    }
    @media (min-width: 1200px) {
      .summary-right .summary-badge { font-size: 14px; padding: 5px 10px; }
      .summary-icon { font-size: 40px; }
    }

    /* Responsive sizing (only size/padding, not positioning) */
    @media (max-width:540px) {
      .summary-wrap .summary-badge {
        font-size: 11px;
        padding: 3px 6px;
      }
    }

    @media (min-width:768px) {
      .summary-wrap .summary-badge {
        font-size: 12px;
        padding: 5px 10px;
      }
    }

    /* === THEME OVERRIDE: Purple â†” Pink === */
/* Purple+Pink theme variables removed (using ca6a palette below) */

/* Content pane */
.content{
  background: linear-gradient(143deg, var(--bg-1) 37.31%, var(--bg-2) 112.95%) !important;
  border-color: rgba(255,255,255,.12) !important;
}

/* Cards (steps 2â€“6) + style cards (step 1) */
.card,
.style-card{
  background: var(--card-grad-1), var(--card-grad-2), var(--card-base) !important;
  border-color: var(--accent-2) !important; /* #fe6283 */
}

/* Selected state */
.card.selected,
.style-card.selected{
  border-color: var(--accent-1) !important; /* purple */
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent-1) 35%, transparent),
    0 8px 24px color-mix(in srgb, var(--accent-1) 25%, transparent) !important;
}

/* Small round checks on selected tiles */
.check,
.style-check{
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2)) !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-2) 35%, transparent) !important;
}

/* CTA button */
.btn-primary{
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2)) !important;
  box-shadow:
    0 8px 24px color-mix(in srgb, var(--accent-2) 28%, transparent),
    0 4px 12px rgba(0,0,0,.3) !important;
}
@media (hover: hover) {
  .btn-primary:not(:disabled):hover{
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent-1) 90%, #fff), color-mix(in srgb, var(--accent-2) 90%, #fff)) !important;
    box-shadow:
      0 12px 32px color-mix(in srgb, var(--accent-2) 35%, transparent),
      0 6px 16px rgba(0,0,0,.3) !important;
  }
}

/* Shine stripe on hover â€“ unchanged (works with existing ::before rule) */

/* Progress bar fill */
.progress-fill{
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2)) !important;
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent-2) 40%, transparent) !important;
}

/* Value banner highlight */
.value-text .highlight{
  color: var(--accent-2) !important;
}

    /* === Late overrides (ensure these apply after base .content rule) === */
    @media (orientation: landscape) {
      /* Steps 1â€“6 container a bit narrower */
      .content { width: min(92vw, 46rem); }
    }

    @media (min-width: 768px) {
      /* Steps 1â€“6 desktop container */
      .content { width: min(92vw, 50rem); }
      /* Summary container (shrinks tiles + hero) */
      .content.content--wide-summary { width: min(96vw, 28rem); }
    }

    @media (min-width: 1200px) {
      .content.content--wide-summary { width: min(96vw, 32rem); }
      .summary-wrap { max-width: 32rem; }
    }

    /* Reduce side gutters for steps 1â€“6 by widening inner grids */
    @media (orientation: landscape) {
      .content .grid,
      .content .style-grid { width: 100%; max-width: 35.5rem; margin-left: auto; margin-right: auto; }
    }

    /* Desktop emoji/icon sizing (steps 5â€“7) */
@media (min-width: 768px) {
  /* Step 5 & 6 cards */
  .card.icon-card .icon { font-size: 48px; }
  .card.icon-card.voice-card .icon { font-size: 44px; }
  /* Summary step icons (smaller on desktop) */
  .summary-icon { font-size: 35px; }
}
@media (min-width: 1200px) {
  .card.icon-card .icon { font-size: 52px; }
  .card.icon-card.voice-card .icon { font-size: 48px; }
  .summary-icon { font-size: 37px; }
}

    /* Desktop typography scale-up and breathing room */
    @media (min-width: 768px) {
      .section-title { font-size: clamp(20px, 2.9vw, 24px); letter-spacing: -0.5px; }
      .section-subtitle { font-size: clamp(18px, 2.6vw, 22px); }
      .group-title { font-size: clamp(18px, 2.2vw, 20px); margin-bottom: 12px; letter-spacing: -0.5px; }
      .value-text { font-size: 16px; }
      .grid { margin-bottom: 16px; }
      .style-grid { margin-bottom: 16px; }
      .btn-primary { font-size: 20px; min-height: 62px; margin-top: 28px; }
      .btn-secondary { font-size: 16px; min-height: 52px; margin-top: 12px; }
      .style-badge, .card .badge { font-size: 13px; }
      .card.age .num { font-size: clamp(18px, 2.2vw, 22px); }
      .trust-mini { font-size: 12px; }
    }
    @media (min-width: 1200px) {
      .section-title { font-size: 26px; letter-spacing: -0.5px; }
      .section-subtitle { font-size: 24px; }
      .group-title { font-size: 22px; margin-bottom: 14px; letter-spacing: -0.5px; }
      .value-text { font-size: 18px; }
      .btn-primary { font-size: 21px; min-height: 64px; }
      .btn-secondary { font-size: 17px; min-height: 54px; }
      .style-badge, .card .badge { font-size: 14px; }
      .card.age .num { font-size: 24px; }
      .trust-mini { font-size: 13px; }
    }
    /* Buttons align to grid width on desktop */
    @media (orientation: landscape) {
      .content .btn-primary,
      .content .btn-secondary { width: 100%; max-width: 35.5rem; margin-left: auto; margin-right: auto; }
    }
    @media (min-width: 768px) {
      .content .btn-primary,
      .content .btn-secondary { width: 100%; max-width: 36rem; margin-left: auto; margin-right: auto; }
    }
    /* Summary right badges smaller in mobile portrait only (hero unchanged) */
    @media (max-width: 540px) {
      .summary-right .summary-badge { font-weight: 500; font-size: 9px; }
    }
    @media (min-width: 768px) {
      .content .grid,
      .content .style-grid { width: 100%; max-width: 36rem; margin-left: auto; margin-right: auto; }
    }

  

/* === ca6 overrides === */
.video-bg, .overlay { display: none !important; }

.content{
  width: 100vw !important;
  min-height: 100vh !important;
  background: linear-gradient(143deg, var(--bg-1, #4e283c) 37.31%, var(--bg-2, #271a2b) 112.95%) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
  overflow: visible !important;
}

/* Replace progress bar with stepper */
.progress-bar, .progress-fill { display: none !important; }
.progress-stepper{
  position: static;
  top: auto; left: auto; right: auto;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  padding: 8px 6px;
  background: transparent;
  z-index: auto;
}
.progress-stepper .step{ height: 6px; border-radius: 4px; background: rgba(255,255,255,.15); }
.progress-stepper .step.done{ background: linear-gradient(90deg, var(--accent-1,#8350cb), var(--accent-2,#fe6283)); }
.progress-stepper .step.current{ background: var(--accent-2,#fe6283); }

/* Step 1: double the space between stepper and title */
.progress-stepper + .value-banner.hidden + #title{ margin-top: 16px; }

/* Step 1 spacing: 30px above and below the title (14px gap + 16px margin) */
.content.content--step1 #title.section-title{ margin-top: 16px !important; margin-bottom: 16px !important; }

/* Desktop: make value banner and stepper match grid width and centered */
@media (min-width: 768px){
  .value-banner,
  .progress-stepper{ width: 100%; max-width: 36rem; margin-left: auto; margin-right: auto; }
}
@media (orientation: landscape){
  .value-banner,
  .progress-stepper{ width: 100%; max-width: 35.5rem; margin-left: auto; margin-right: auto; }
}

/* Step 1 (single, centered, wider) */
.cta-btn-first{
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 12px auto 0;
  left: auto; right: auto; transform: none;
  align-self: center;
  position: sticky;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
}
@media (orientation: landscape){
  .cta-btn-first{ max-width: 35.5rem; }
}

/* Step 1: remove extra bottom padding under the stepper to equalize spacing */
.content.content--step1 .progress-stepper{ padding-bottom: 0; }

/* Steps 2â€“5: slightly smaller cards (~10%) to add breathing room */
@media (orientation: landscape){
  .content.content--wide-cards .grid.grid-3 .card { flex: 0 0 calc(((min(96vw, var(--cards-row-width, 46rem)) - 60px) / 7) * 0.9); }
}
@media (min-width: 768px){
  .content.content--wide-cards .grid.grid-3 .card { flex: 0 0 calc(((min(96vw, var(--cards-row-width, 46rem)) - 72px) / 7) * 0.9); }
}

/* Steps 2â€“5: equalize vertical spacing to 20px */
.content.content--wide-cards{ gap: 20px; }
.content.content--wide-cards .progress-stepper{ padding-bottom: 6px; }
.content.content--wide-cards .group .step-heading{ margin-bottom: 20px; }
.content.content--wide-cards .group .grid,
.content.content--wide-cards .group .age-selector{ margin-top: 0; margin-bottom: 0; }
.content.content--wide-cards .group + .group{ margin-top: 20px; }
.content.content--wide-cards .group .grid{ padding-top: 0; padding-bottom: 0; }

/* Step 6 (summary): hide stepper and set 30px spacing via 16px margins (14px gap + 16px) */
.content.content--wide-summary .progress-stepper{ display: none !important; }
.content.content--wide-summary .value-banner{ margin-bottom: 16px; }
.content.content--wide-summary .section-title.step-heading + .summary-wrap{ margin-top: 16px !important; }

/* Step 6: smaller, centered icons for Voice and Relationship */
#summaryVoice .summary-icon svg{ width: 36px; height: 36px; }
#summaryRelationship .summary-icon svg{ width: 64px; height: 64px; }
#summaryVoice .summary-icon,
#summaryRelationship .summary-icon{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Button layout: stack vertically (Next on top, Back below) */
.next-btn, .back-btn{
  display: block;
  width: 100%;
  min-height: 56px;
}
.next-btn{ margin-right: 0; }

/* Final CTA (single, centered, wider) */
.cta-btn-final{
  display: inline-flex;
  width: 100%;
  margin: 50px auto 0;
  left: auto; right: auto; transform: none;
  align-self: center;
}

/* Ensure page background covers full page (remove visible black bars) */
html, body{ background: linear-gradient(143deg, var(--bg-1, #4e283c) 37.31%, var(--bg-2, #271a2b) 112.95%) !important; }
.trust-bar{ display:none !important; }


/* (Removed bottom-nav persistent bar) */

/* === Sticky Navigation Wrapper (Next/Back) === */
.navigation-wrapper{
  position: fixed; /* keep at bottom of the screen */
  left: 0;
  right: 0;
  /* Raise nav above bottom edge to add whitespace; keep safe-area respected */
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 9999; /* ensure above cards */
  background: transparent; /* no background */
  border-top: 0;           /* no border */
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
}
.navigation-inner{
  display: grid;
  grid-template-columns: 1fr 1.6fr; /* Back narrower, Next wider */
  gap: 10px;
  align-items: stretch;
  width: 100%;
  max-width: 36rem; /* match grid width */
  margin-left: auto;
  margin-right: auto; /* center within content */
}
/* Single action mode (steps 1 and 6): hide Back, make Next full width and centered */
.navigation-wrapper.single-action .navigation-inner{
  grid-template-columns: 1fr;
}
.navigation-wrapper.single-action #backBtn{ display: none !important; }
.navigation-wrapper .btn-primary,
.navigation-wrapper .btn-secondary{
  margin-top: 0; /* remove extra top gaps inside nav */
  min-height: 56px;
}
@media (min-width:768px){
  .navigation-wrapper{ padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .navigation-inner{ gap: 12px; grid-template-columns: 1fr 1.5fr; max-width: 36rem; }
  .navigation-wrapper .btn-primary,
  .navigation-wrapper .btn-secondary{ min-height: 58px; }
}

/* Match grid width in landscape where grids use 35.5rem cap */
@media (orientation: landscape){
  .navigation-inner{ max-width: 35.5rem; }
}

@media (hover: none) {
  .navigation-wrapper .btn-primary:not(:disabled):hover{
    background: var(--accent-2) !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
  .navigation-wrapper.cta-action .btn-primary{
    background: var(--accent-2) !important;
  }
  .navigation-wrapper.cta-action .btn-primary::before{
    display: none !important;
  }
}

/* Desktop: pull navigation closer to the content section */
@media (min-width: 1024px){
  .navigation-wrapper{
    bottom: clamp(72px, 14vh, 200px);
  }
}

/* Laptops with less vertical space: keep nav closer to the bottom edge */
@media (min-width: 1024px) and (max-height: 900px){
  .navigation-wrapper{
    bottom: max(40px, env(safe-area-inset-bottom, 0px));
  }
}

/* Ultra-wide desktops: keep nav closer to bottom to avoid overlapping content */
@media (min-width: 1600px) and (min-height: 900px){
  .navigation-wrapper{
    bottom: max(40px, env(safe-area-inset-bottom, 0px));
  }
}

/* Remove extra nav primary shadows for cleaner look */
.navigation-wrapper .btn-primary{
  background: var(--accent-2) !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}
.navigation-wrapper .btn-primary:not(:disabled):hover{
  background: var(--accent-2) !important;
  box-shadow: none !important;
  filter: none !important;
}
.navigation-wrapper .btn-primary:not(:disabled):active,
.navigation-wrapper .btn-primary.is-pressed{
  background: var(--accent-2) !important;
  transform: scale(0.96) translateY(3px) !important;
  box-shadow: none !important;
  filter: none !important;
}
/* Disabled Next: gray look, no shadow, keep full opacity for contrast */
.navigation-wrapper .btn-primary:disabled{
  /* Gray it out via filter (keeps original gradient underneath) */
  filter: grayscale(90%) brightness(0.7) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  color: rgba(255,255,255,0.9) !important;
}
.navigation-wrapper .btn-primary:disabled::before{ display: none; }

/* Back button styling inside nav */
.navigation-wrapper .btn-secondary{
  background: #00000040 !important;
  border: 1px solid #ffffff !important;
  color: #ffffff !important;
}
.navigation-wrapper .btn-secondary:hover{
  background: #00000055 !important;
  border-color: #ffffff !important;
}

/* Theme overrides (palette from style_ca5a.css) */
:root{
  --accent-1: #25F4EE;   /* aqua */
  --accent-2: #FE2C55;   /* pink */
  --bg-1:     #000000;   /* black */
  --bg-2:     #0a0a0a;   /* near black */
  --card-grad-1: linear-gradient(36deg, #25F4EE40 -18.81%, transparent 51.42%);
  --card-grad-2: linear-gradient(33deg, transparent -2.3%, #FE2C5540 98.42%);
  --card-base:   #11111166;
}

/* === ca6a theme-specific overrides === */
/* 1) Buttons: use solid red primary (no gradient) */
.btn-primary{
  background: var(--accent-2) !important; /* solid reddish primary */
}
@media (hover: hover) {
  .btn-primary:not(:disabled):hover{
    background: color-mix(in srgb, var(--accent-2) 85%, #ffffff) !important;
  }
}

/* 2) Card borders: default thinner, selected unchanged */
.card, .style-card{ border-width: 2px !important; }
.card.selected, .style-card.selected{ border-width: 3px !important; }

/* 3) Progress stepper: use solid primary (no gradient) */
.progress-stepper .step.done{ background: var(--accent-2) !important; }
.progress-stepper .step.current{ background: var(--accent-2) !important; }

/* === ca6r theme overrides aligned to ca6a === */
/* Cards background: use theme variables (matches ca6a) */
.card,
.style-card{
  background: var(--card-grad-1), var(--card-grad-2), var(--card-base) !important;
}

/* Primary buttons: solid accent per ca6a */
.next-btn,
.navigation-wrapper .btn-primary,
.btn-primary{
  background: var(--accent-2) !important;
}

/* === ca6f final ensure: prevent older themes from overriding === */
:root{
  /* Use ca6a palette (aqua + pink on black) */
  --bg-1: #000000;
  --bg-2: #0a0a0a;
}
html, body{
  background: linear-gradient(143deg, var(--bg-1, #000000) 37.31%, var(--bg-2, #0a0a0a) 112.95%) !important;
}
.content{
  background: linear-gradient(143deg, var(--bg-1, #000000) 37.31%, var(--bg-2, #0a0a0a) 112.95%) !important;
  /* Ensure room for fixed navigation bar at bottom on short pages */
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
}
.btn-primary{
  background: var(--accent-2) !important;
  box-shadow: none !important;
  animation: none !important;
}
@media (hover: hover) {
  .btn-primary:not(:disabled):hover{
    background: color-mix(in srgb, var(--accent-2) 85%, #ffffff) !important;
    box-shadow: none !important;
  }
}

/* === Unified selection scaling for selection cards (container-based) === */
/* Scale the whole card in grids (steps 2-5), not individual media */
.grid .card { transform-origin: center; }
.grid .card.selected { transform: scale(1.03); z-index: 1; }

/* Disable per-image scaling on selection cards to avoid double-scaling */
.grid .card.selected button img,
.grid .card.selected button picture,
.grid .card.selected button video { transform: none !important; }

/* Ethnicity cards: do not scale inner wrapper; rely on container scaling */
.content #ethnicityGroup .card.selected .eth-img-wrap { transform: none !important; }
/* Preserve centering for middle image */
.content #ethnicityGroup .card.selected button img.eth-img-center { transform: translateX(-50%) !important; }

/* Borders: cards (default + selected) â€” align with ca6a */
.card,
.style-card{
  border-color: var(--accent-2) !important; /* default border uses primary accent */
  border-width: 2px !important; /* thinner default */
  box-sizing: border-box; /* ensure borders are included, avoid clipping */
}
.card.selected,
.style-card.selected{
  border-color: var(--accent-1) !important; /* selected uses secondary accent */
  border-width: 3px !important; /* keep size stable (no shrink) */
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent-1) 35%, transparent),
    0 8px 24px color-mix(in srgb, var(--accent-1) 25%, transparent) !important;
}

/* Checkmarks: match ca6a theme gradient */
.check,
.style-check{
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2)) !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-2) 35%, transparent) !important;
}

/* Progress stepper: solid accent per ca6a */
.progress-stepper .step.done,
.progress-stepper .step.current{
  background: var(--accent-2) !important;
}

/* === ca6r: Heading style aligned to ca6a (Montserrat) === */
h1.section-title{
  color: #fff;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 30px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 120%;
  text-shadow: 2px 2px 4px #0000004d;
  text-transform: uppercase;
}
/* Mobile portrait: smaller H1 */
@media (orientation: portrait) and (max-width: 540px){
  h1.section-title{ font-size: 24px; }
}

/* Step 1 main title: force accent color for the inline colored phrase */
#title span[style*="color"]{ color: var(--accent-2) !important; }

/* === Selection Dimming Effect (ca6f) === */
/* When a grid has a selection, dim non-selected cards smoothly */
.style-grid.dim-others .style-card:not(.selected),
.grid.dim-others .card:not(.selected){
  filter: brightness(0.55) saturate(0.9);
  opacity: 0.9;
  transition: filter .25s ease, opacity .25s ease;
}
.style-grid.dim-others .style-card.selected,
.grid.dim-others .card.selected{
  filter: none;
  opacity: 1;
}

/* iOS Safari portrait (including iPhone 16 Pro Max): adjust style badge sizing/spacing */
@supports (-webkit-touch-callout: none){
  @media (orientation: portrait){
    .style-badge{
      font-size: 14px;
      padding: 6px 10px 8px; /* add bottom breathing room */
    }
    .card .badge{
      font-size: 14px;
      padding: 6px 10px 9px; /* more bottom space over card border */
    }
  }
}

/* === Age selector (replaces age cards) === */
#if0
#endif
.age-selector{
  border: 3px solid var(--accent-2);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  padding: 12px 12px 18px; /* top space handled by grid row with age-display */
  position: relative;
  touch-action: pan-y; /* allow vertical scroll while interacting */
  display: grid;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 10px; /* row-gap col-gap */
}
.age-selector { row-gap: 16px; }
@media (max-width:540px){ .age-selector { row-gap: 18px; } }
.age-row{
  display: grid;
  grid-template-columns: min-content 1fr min-content;
  align-items: center;
  gap: 8px;
}
.age-row .age-min,
.age-row .age-max{
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  font-weight: 600;
}
.age-display{
  grid-column: 1 / -1; grid-row: 1;
  justify-self: center; align-self: start;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 3px solid var(--accent-2);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  box-sizing: border-box;
  display: block;
  width: calc((100% - 20px) / 3); /* one card width (3 cols, 10px gaps) */
  max-width: calc((100% - 20px) / 3);
  text-align: center;
  margin-left: auto; margin-right: auto; /* iPhone centering */
  margin-bottom: 20px; /* explicit visual gap to age-row */
}
#ageRange{
  grid-column: 2;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px; /* larger track for easier interaction */
  border-radius: 999px;
  background: linear-gradient(var(--accent-2), var(--accent-2)) left/var(--fill, 0%) 100% no-repeat,
              rgba(255,255,255,0.15);
  outline: none;
  /* Allow native slider interaction alongside wrapper drag */
  pointer-events: auto;
}
#ageRange::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 28px; height: 28px; /* larger thumb */
  border-radius: 50%;
  background: var(--accent-2-thumb, #d81b42); /* slightly darker red for contrast */
  border: none;
  box-shadow: none;
  cursor: pointer;
}
#ageRange::-moz-range-track{
  height: 14px; border-radius: 999px; background: rgba(255,255,255,0.15);
}
#ageRange::-moz-range-progress{
  height: 14px; border-radius: 999px; background: var(--accent-2);
}
#ageRange::-moz-range-thumb{
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-2-thumb, #d81b42); /* slightly darker red for contrast */
  border: none;
  box-shadow: none;
  cursor: pointer;
}

/* Constrain slider width to match grids on desktop/landscape */
@media (min-width: 768px){
  .content .age-selector{ width: 100%; max-width: 36rem; margin-left: auto; margin-right: auto; }
}
@media (orientation: landscape){
  .content .age-selector{ width: 100%; max-width: 35.5rem; margin-left: auto; margin-right: auto; }
}

/* Larger labels and display on bigger screens */
@media (min-width: 768px){
  .age-row .age-min, .age-row .age-max{ font-size: 18px; }
  .age-display{ font-size: 14px; padding: 8px 14px; }
}
@media (min-width: 1200px){
  .age-row .age-min, .age-row .age-max{ font-size: 20px; }
  .age-display{ font-size: 16px; padding: 10px 16px; }
}

/* Make checkmark glyphs white (incl. iPhone Safari) */
.check,
.style-check{
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  filter: none !important;
  mix-blend-mode: normal;
  opacity: 1 !important;
}

/* === ca6r: Selection cards size + layout tweaks === */
/* 1) Slightly smaller selection cards overall on small portrait while keeping aspect ratio */
@media (max-width: 540px){
  .content .grid { width: 100%; max-width: 24rem; margin-left: auto; margin-right: auto; }
}

/* 2) Desktop and mobile landscape: single row, uniform card sizes, no scroll */
/* Style cards (.style-grid) remain unchanged */
@media (orientation: landscape){
  .content .grid { width: 100%; max-width: var(--cards-row-width, 46rem); margin-left: auto; margin-right: auto; }
  .grid.grid-3 { display: flex !important; flex-wrap: nowrap; justify-content: center; gap: 10px; overflow-x: hidden; align-items: center; }
  /* Make selection cards a bit smaller so borders fit */
  .grid.grid-3 .card { flex: 0 0 calc((min(96vw, var(--cards-row-width, 46rem)) - 60px) / 7); }
}
@media (min-width: 768px){
  .content .grid { width: 100%; max-width: var(--cards-row-width, 46rem); margin-left: auto; margin-right: auto; }
  .grid.grid-3 { display: flex !important; flex-wrap: nowrap; justify-content: center; gap: 12px; overflow-x: hidden; align-items: center; }
  .grid.grid-3 .card { flex: 0 0 calc((min(96vw, var(--cards-row-width, 46rem)) - 72px) / 7); }
}

/* Widens the content only on steps 2â€“5 via JS-applied class to keep style step unchanged */
@media (min-width: 768px){
  .content.content--wide-cards { width: min(96vw, 66rem); --cards-row-width: 66rem; }
}

/* Avoid clipping of card borders in wide cards steps (2â€“5) */
.content.content--wide-cards{ overflow: visible; }
.content.content--wide-cards .grid{ padding-top: 4px; padding-bottom: 4px; overflow: visible; }
/* Ensure all step grids have safe padding to show borders */
.group .grid{ padding-top: 4px; padding-bottom: 4px; overflow: visible; }

/* === Desktop (>=1024px) typography and spacing tweaks === */
@media (min-width: 1024px){
  /* Larger H1s on desktop */
  h1.section-title, .section-title { font-size: clamp(24px, 2.64vw, 31px); letter-spacing: -0.5px; }
  /* Step 2â€“5: more breathing room between headings and cards */
  .group .step-heading { margin-bottom: 16px; }
  .group .grid, .group .age-selector { margin-top: 6px; margin-bottom: 24px; }
  .group + .group { margin-top: 24px; }
  /* Step 1 and 6: even more spacing under H1 */
  #title.section-title { margin-bottom: 28px; }
  .section-title.step-heading + .summary-wrap { margin-top: 28px; }
}

/* === Landscape (short height) adjustments: smaller H1 + smaller cards === */
@media (orientation: landscape) and (max-height: 540px){
  /* H1s slightly smaller to avoid crowding */
  h1.section-title, .section-title { font-size: clamp(18px, 2.3vw, 22px); }
  /* Reduce selection card width a bit while keeping 3/4 ratio */
  .grid.grid-3 .card { flex: 0 0 calc((min(96vw, var(--cards-row-width, 46rem)) - 50px) / 7); }
}

/* === Mobile portrait Step 1: more space under the main title === */
@media (orientation: portrait) and (max-width: 540px){
  #title.section-title { margin-bottom: 16px; }
}
/* (auth-layer footer styles moved to auth/style_auth.css) */
/* === STEP 2 Ethnicity: mobile portrait stacked full-width rectangles === */
@media (max-width: 540px) and (orientation: portrait) {
  /* Stack ethnicity cards in one column and fill container width */
  .content #ethnicityGroup .grid.grid-3 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Make cards rectangular (not 3:4), full-width within the grid */
  .content #ethnicityGroup .grid.grid-3 .card {
    width: 100% !important;
    height: 170px !important; /* From shared example */
    aspect-ratio: auto !important;
  }

  /* Ethnicity images wrapper: fills card area (sits under dim/badge) */
  .content #ethnicityGroup .grid.grid-3 .card button .eth-img-wrap{
    position: absolute; inset: 0; z-index: 0;
  }

  /* Unify all three images (center/left/right) to the same vertical size: fill full card height */
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-center,
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-left,
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-right {
    object-fit: contain !important;
    inset: 0 !important; /* use full card height; badge overlays */
    height: 100% !important;
    width: auto !important;
  }
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-center {
    object-position: center center !important;
    left: 50% !important; right: auto !important;
    transform: translateX(-50%);
    z-index: 1 !important;
  }
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-left {
    object-position: left center !important;
    left: 10% !important; right: auto !important; /* bring closer to center */
    z-index: 0 !important;
  }
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-right {
    object-position: right center !important;
    right: 10% !important; left: auto !important; /* bring closer to center */
    z-index: 0 !important;
  }

  /* Fallback background: use contain to mirror unified sizing */
  .content #ethnicityGroup .grid.grid-3 .card button {
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
}

/* === STEP 2 Ethnicity: desktop/landscape stacked full-width rectangles === */
@media (orientation: landscape), (min-width: 541px) {
  /* Stack ethnicity cards in one column and fill container width on larger screens too */
  .content #ethnicityGroup .grid.grid-3 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    /* Make buttons at least ~30% narrower than earlier 36rem width */
    max-width: calc(36rem * 0.7) !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Rectangular, edge-to-edge within the grid (same as mobile portrait) */
  .content #ethnicityGroup .grid.grid-3 .card {
    width: 100% !important;
    height: 170px !important;
    aspect-ratio: auto !important;
  }

  /* Match mobile portrait layering: absolute images, center in front of sides */
  .content #ethnicityGroup .grid.grid-3 .card button {
    display: block !important;
  }
  .content #ethnicityGroup .grid.grid-3 .card button .eth-img-wrap{
    position: absolute; inset: 0; z-index: 0;
  }
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-left,
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-center,
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-right {
    position: absolute !important;
    inset: 0 !important; /* fill full card height */
    width: auto !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 0 !important; /* keep under dim/check/badge */
    transition: none !important; /* prevent per-image transform jitter on select */
  }
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-center {
    left: 50% !important; right: auto !important;
    transform: translateX(-50%);
  }
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-left {
    left: 8% !important; right: auto !important;
  }
  .content #ethnicityGroup .grid.grid-3 .card button img.eth-img-right {
    right: 8% !important; left: auto !important;
  }
}