    :root {
      color-scheme: light;
      --primary: #0066FF;
      --primary-dark: #0052CC;
      --primary-light: #0066FF;
      --primary-cta: #0066FF;
      --accent: #6A7EA8;
      --background: #FFFFFF;
      --surface: #F2F4F7;
      --text: #1A1C1E;
      --text-secondary: #6A7EA8;
      --border: #D8DBE2;
      --success: #10b981;
      --error: #ef4444;
    }
    html, body {
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
      background: #FFFFFF;
      color: #1A1C1E;
      margin: 0;
      padding: 0;
      min-height: 100dvh;
      height: auto;
      width: 100%;
      overflow-x: hidden;
      overflow-y: auto;
      box-sizing: border-box;
      overscroll-behavior-y: none;
      overscroll-behavior: none;
    }
    *, *::before, *::after {
      box-sizing: border-box;
    }
    
    /* ============================================
       PROGRESS INDICATORS
       ============================================ */
    .progress-bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: #D8DBE2;
      z-index: 1000;
    }
    .progress-fill {
      height: 100%;
      background: #0066FF;
      transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      border-radius: 0 3px 3px 0;
      box-shadow: 0 0 10px rgba(0, 102, 255, 0.3);
    }
    
    .progress-dots {
      position: fixed;
      top: 16px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 8px;
      z-index: 999;
      padding: 8px 16px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(12px);
      border-radius: 999px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    .progress-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #D8DBE2;
      transition: width 0.18s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), border-radius 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1);
    }
    .progress-dot.active {
      background: #0066FF;
      width: 28px;
      border-radius: 999px;
      box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.08);
    }
    .progress-dot.completed {
      background: #10b981;
    }
    .screen {
      width: 100%;
      overflow-x: hidden;
      background: #FFFFFF;
    }
    .layout {
      width: 100%;
      max-width: 100%;
      padding: 0;
      margin: 0;
      overflow-x: hidden;
      box-sizing: border-box;
      background: #FFFFFF;
    }
    .screen .layout > .step {
      width: 100%;
      overflow-x: hidden;
      background: #FFFFFF;
    }
    .step {
      display: none;
    }
    .step.active {
      display: block;
    }
    /* Welcome step - centered card */
    #step-0 {
      padding: 20px;
      margin: 0;
      background: #F8F9FA;
      width: 100%;
      box-sizing: border-box;
    }
    /* Welcome only: flex center (other steps stay display:block for body scroll) */
    #step-0.active {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      justify-content: safe center;
      overflow: visible;
    }
    /* Desktop: full viewport height for welcome */
    @media (min-width: 768px) {
      #step-0,
      #step-0.active {
        min-height: 100dvh;
      }
    }
    /* Mobile: full-screen welcome layout */
    @media (max-width: 767px) {
      #step-0.active {
        min-height: 100dvh;
        padding: 24px 16px;
        background: #FFFFFF;
      }
      /* Base step-0 styling (when not active) - no display property to maintain visibility control */
      #step-0 {
        min-height: 100svh;
        padding: 24px 16px;
        background: #FFFFFF;
      }
      /* Ensure layout stretches full width only for step-0 */
      #step-0 .step-layout {
        width: 100%;
        max-width: 100%;
      }
      /* Visually remove the card container only for step-0 on mobile */
      #step-0 .step-card {
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
      }
      #step-0 .step-card-inner {
        padding: 0;
      }
    }
    /* Hide progress dots on welcome page */
    #step-0.active ~ .progress-dots {
      display: none;
    }

    /* Welcome — viewport centering (exclude from generic .step.active layout; matches enterprise) */
    .screen .layout > #step-0.active {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      justify-content: safe center;
      min-height: 100dvh;
      width: 100%;
      box-sizing: border-box;
    }

    .screen:has(#step-0.active) {
      background: #F8F9FA;
    }

    @media (max-width: 767px) {
      .layout:has(#step-0.active) {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100dvh;
        min-height: 100svh;
      }
      .screen:has(#step-0.active) {
        background: #FFFFFF;
      }
    }

    @media (min-width: 1024px) {
      .layout:has(#step-0.active) {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100dvh;
        padding: 0;
      }
      .layout:has(#step-0.active) > #step-0.active {
        min-height: auto;
      }
      .screen:has(#step-0.active) {
        background: #ffffff;
      }
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border-radius: 999px;
      padding: 12px 16px;
      font-weight: 600;
      transition: background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1), border-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.18s cubic-bezier(0.33, 1, 0.68, 1);
      text-align: center;
      cursor: pointer;
    }
    .btn-primary {
      background: #0066FF;
      color: #fff;
      box-shadow: 0 2px 8px rgba(0, 102, 255, 0.22);
    }
    .btn-primary:hover:not(:disabled) { 
      background: #0052CC;
      box-shadow: 0 4px 14px rgba(0, 102, 255, 0.28);
    }
    .btn-primary:active:not(:disabled) {
      transform: scale(0.98);
      box-shadow: 0 1px 4px rgba(0, 102, 255, 0.2);
    }
    .btn-dark {
      background: #0f172a;
      color: #fff;
    }
    .btn-outline {
      border: 1.5px solid #D8DBE2;
      color: #1A1C1E;
      background: #FFFFFF;
    }
    .btn-ghost {
      border: 1px solid transparent;
      background: #FFFFFF;
      color: #1A1C1E;
    }
    .card {
      background: #FFFFFF;
      border-radius: 24px;
      padding: 24px;
      border: 1px solid #D8DBE2;
      box-shadow: 0 2px 8px rgba(10, 40, 75, 0.08);
    }
    .field {
      display: grid;
      gap: 8px;
    }
    .field label {
      font-size: 14px;
      font-weight: 600;
      color: #1A1C1E;
    }
    .input {
      width: 100%;
      border: 1px solid #D8DBE2;
      border-radius: 16px;
      padding: 14px 16px;
      font-size: 16px;
      background-color: #FFFFFF;
      transition: border-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1);
    }
    .input:hover:not(:focus):not(.invalid) {
      border-color: #c5cad6;
    }
    .input:focus {
      border-color: #0066FF;
      outline: none;
      background-color: #FFFFFF;
      box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    }
    .input.valid {
      border-color: #10b981 !important;
      padding-right: 48px !important;
      background-color: #f0fdf4 !important;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
      background-repeat: no-repeat !important;
      background-position: right 16px center !important;
      background-size: 20px 20px !important;
    }
    .input.valid:focus {
      border-color: #10b981 !important;
      background-color: #f0fdf4 !important;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
      background-repeat: no-repeat !important;
      background-position: right 16px center !important;
      background-size: 20px 20px !important;
    }
    .input.invalid {
      border-color: #f97316;
      box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
    }
    .error-text {
      color: #dc2626;
      font-size: 14px;
    }
    .top-bar {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }
    .top-bar button {
      width: 40px;
      height: 40px;
      border-radius: 20px;
      border: 1px solid #D8DBE2;
      background: #FFFFFF;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .welcome {
      background: #FFFFFF;
      border-radius: 24px;
      border: 1px solid #D8DBE2;
      padding: 48px 24px 40px;
      box-shadow: 0 4px 20px rgba(10, 40, 75, 0.12);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      margin: 0 auto;
      width: calc(100% - 40px);
      max-width: 420px;
      gap: 24px;
    }
    /* Smaller mobile breakpoints - scoped to step-0 only */
    @media (max-width: 430px) {
      #step-0,
      #step-0.active {
        padding: 20px 16px;
      }
      #step-0 .welcome {
      max-width: 100%;
        gap: 14px;
      }
      #step-0 .welcome h1 {
        font-size: 24px;
        line-height: 1.25;
      }
      #step-0 .welcome-image-wrapper img {
        max-width: 190px;
      }
    }
    @media (max-width: 390px) {
      #step-0,
      #step-0.active {
        padding: 16px 12px;
      }
      #step-0 .welcome {
      gap: 12px;
    }
      #step-0 .welcome h1 {
        font-size: 20px;
        line-height: 1.25;
      }
      #step-0 .welcome-image-wrapper img {
        max-width: 170px;
      }
      #step-0 .welcome-btn,
      #step-0 #btnStart {
        padding: 14px 24px;
        font-size: 16px;
      }
    }
    /* Mobile welcome adjustments (max-width: 767px) */
    @media (max-width: 767px) {
      #step-0 .welcome {
        /* Use the whole width, no card look */
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        padding: 0;
        gap: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
      }
      #step-0 .welcome h1 {
        font-size: 24px;
        line-height: 1.25;
        text-align: center;
        margin-bottom: 4px;
      }
      #step-0 .welcome p {
        font-size: 14px;
        line-height: 1.5;
        text-align: center;
        margin: 0 0 8px;
      }
      #step-0 .welcome-image-wrapper {
        margin: 8px 0 12px;
      justify-content: center;
        align-items: center;
      }
      #step-0 .welcome-image-wrapper img {
        max-width: 210px;
        width: 100%;
        height: auto;
      }
      #step-0 .welcome-btn,
      #step-0 #btnStart {
        width: 100%;
        max-width: 260px;
      }
    }
    @media (min-width: 768px) {
      #step-0 {
        padding: 40px;
      }
      .welcome {
        padding: 56px 40px 48px;
        max-width: 480px;
        gap: 24px;
      }
    }
    .welcome h1 {
      font-size: 24px;
      font-weight: 700;
      line-height: 1.2;
      margin: 0;
      padding: 0;
      text-align: center;
      width: 100%;
    }
    @media (min-width: 768px) {
      .welcome h1 {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 0;
      }
    }
    .welcome h1 span {
      background: linear-gradient(135deg, #0066ff, #0052cc);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      display: inline-block;
      margin-top: 4px;
    }
    .welcome-image-wrapper {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0;
    }
    .welcome-image-wrapper img {
      width: 100%;
      max-width: 240px;
      height: auto;
      object-fit: contain;
    }
    @media (min-width: 768px) {
      .welcome-image-wrapper {
        margin: 8px 0;
      }
      .welcome-image-wrapper img {
        max-width: 200px;
      }
    }
    .welcome-btn {
      padding: 16px 32px;
      font-size: 16px;
      font-weight: 700;
      border-radius: 9999px;
      background: #0066FF;
      color: #fff;
      border: none;
      cursor: pointer;
      transition: background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.18s cubic-bezier(0.33, 1, 0.68, 1);
      box-shadow: 0 2px 8px rgba(10, 40, 75, 0.15);
      width: 100%;
      max-width: 280px;
    }
    @media (min-width: 768px) {
      .welcome-btn {
        padding: 14px 32px;
        font-size: 16px;
        max-width: 280px;
        margin-top: 4px;
      }
    }
    .welcome-btn:hover {
      background: #0052CC;
      box-shadow: 0 4px 12px rgba(10, 40, 75, 0.2);
    }
    .welcome-btn:active {
      transform: scale(0.98);
    }
    .preview-card {
      border-radius: 24px;
      padding: 40px;
      margin-bottom: 32px;
      color: #fff;
      background: var(--preview-bg-color, #026ce0);
      box-shadow: 0 2px 8px rgba(10, 40, 75, 0.15);
      transition: background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
      position: relative;
    }
    .preview-inner {
      border-radius: 22px;
      border: 1px solid rgba(255,255,255,0.25);
      background: rgba(255,255,255,0.12);
      backdrop-filter: blur(16px);
      padding: 20px;
      min-height: auto;
      overflow: visible;
    }
    .preview-inner .space-y-3 {
      overflow: visible;
    }
    .preview-inner .space-y-3 > div {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 24px;
      overflow: visible;
    }
    .preview-inner svg {
      flex-shrink: 0;
      width: 18px;
      height: 18px;
      margin-left: 0;
      overflow: visible;
    }
    .color-picker-btn {
      width: 100%;
      height: 56px;
      border-radius: 16px;
      border: 2px solid #D8DBE2;
      background: #FFFFFF;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 16px;
      cursor: pointer;
      transition: border-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
      box-shadow: 0 2px 8px rgba(10, 40, 75, 0.08);
    }
    .color-picker-btn:hover {
      border-color: #0066FF;
      box-shadow: 0 2px 8px rgba(10, 40, 75, 0.1);
    }
    .color-picker-btn:active {
      transform: scale(0.98);
    }
    .color-picker-preview {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      display: block;
      border: 2px solid #D8DBE2;
      flex-shrink: 0;
    }
    .color-picker-value {
      font-size: 14px;
      font-weight: 600;
      color: #1A1C1E;
      font-family: inherit;
    }
    .color-input-hidden {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
      pointer-events: none;
    }
    /* Rich Color Picker Popup */
    .color-picker-popup {
      position: fixed;
      z-index: 1000;
      background: #FFFFFF;
      border-radius: 20px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.1);
      padding: 20px;
      min-width: 280px;
      max-width: 320px;
      display: none;
    }
    .color-picker-close-btn {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 32px;
      height: 32px;
      border: none;
      background: #000000;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s ease, opacity 0.2s ease;
      z-index: 1001;
      padding: 0;
      color: #FFFFFF;
    }
    .color-picker-close-btn:hover {
      background: #333333;
      opacity: 0.9;
    }
    .color-picker-close-btn:active {
      background: #1a1a1a;
      opacity: 0.8;
    }
    .color-picker-close-btn svg {
      width: 18px;
      height: 18px;
      stroke-width: 2.5;
      stroke: #FFFFFF;
    }
    .color-picker-popup.show {
      display: block;
    }
    .color-picker-saturation {
      width: 100%;
      height: 200px;
      border-radius: 12px;
      position: relative;
      cursor: crosshair;
      margin-bottom: 16px;
      background: linear-gradient(to right, #fff, transparent);
      overflow: hidden;
    }
    .color-picker-saturation::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(to bottom, transparent, #000);
    }
    .color-picker-saturation-indicator {
      position: absolute;
      width: 20px;
      height: 20px;
      border: 3px solid #fff;
      border-radius: 50%;
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
      transform: translate(-50%, -50%);
      pointer-events: none;
      z-index: 10;
    }
    .color-picker-hue {
      width: 100%;
      height: 24px;
      border-radius: 12px;
      cursor: pointer;
      margin-bottom: 16px;
      position: relative;
      background: linear-gradient(to right, 
        #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000
      );
    }
    .color-picker-hue-indicator {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 4px;
      height: 28px;
      background: #FFFFFF;
      border: 2px solid rgba(0, 0, 0, 0.3);
      border-radius: 2px;
      box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
      pointer-events: none;
    }
    .color-picker-inputs {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      margin-bottom: 12px;
    }
    .color-picker-input-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .color-picker-input-group label {
      font-size: 12px;
      font-weight: 600;
      color: #6A7EA8;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .color-picker-input-group input {
      width: 100%;
      padding: 8px;
      border: 1.5px solid #e2e8f0;
      border-radius: 8px;
      /* 16px so iOS Safari does not zoom when tapping the R/G/B numeric inputs. */
      font-size: 16px;
      font-weight: 600;
      font-family: inherit;
      text-align: center;
      transition: border-color 0.2s;
    }
    .color-picker-input-group input:focus {
      outline: none;
      border-color: #0066FF;
      box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    }
    .color-picker-hex {
      width: 100%;
      padding: 10px;
      border: 1.5px solid #D8DBE2;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      font-family: inherit;
      text-align: center;
      text-transform: uppercase;
      transition: border-color 0.2s;
      background: #FFFFFF;
    }
    .color-picker-hex:focus {
      outline: none;
      border-color: #0066FF;
      box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    }
    .color-picker-popup-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 999;
      background: transparent;
      display: none;
    }
    .color-picker-popup-overlay.show {
      display: block;
    }
    @media (max-width: 640px) {
      .color-picker-popup {
        min-width: 260px;
        max-width: 280px;
        padding: 16px;
      }
      .color-picker-saturation {
        height: 180px;
      }
    }
    .logo-chip {
      max-width: 160px;
      max-height: 80px;
      border-radius: 8px;
      background: transparent;
      display: grid;
      place-items: center;
      overflow: hidden;
    }
    .logo-chip img {
      max-width: 160px;
      max-height: 80px;
      width: auto;
      height: auto;
      object-fit: contain;
    }
    .logo-dropzone {
      border: 2px dashed #D8DBE2;
      border-radius: 20px;
      padding: 30px 20px;
      background: #F2F4F7;
      background: #F2F4F7;
      text-align: center;
      display: grid;
      gap: 10px;
    }
    .logo-dropzone span {
      font-size: 14px;
      color: #6A7EA8;
    }
    .logo-remove-btn {
      margin-top: 8px;
      font-size: 14px;
      color: #6A7EA8;
      background: none;
      border: none;
      cursor: pointer;
      text-decoration: underline;
      padding: 0;
    }
    .logo-remove-btn:hover {
      color: #475569;
    }
    /* Success Step Styles */
    .success-icon {
      width: 80px;
      height: 80px;
      margin: 0 auto;
      border-radius: 9999px;
      background: linear-gradient(to bottom, #dbeafe, #bfdbfe);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    }
    .success-icon svg {
      width: 36px;
      height: 36px;
      color: #0066FF;
    }
    .wallet-button {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: opacity 0.15s ease;
      border: none;
      padding: 0;
      background: transparent;
      height: 56px;
      border-radius: 9999px;
    }
    .wallet-button:hover {
      opacity: 0.9;
    }
    .wallet-button:active {
      opacity: 0.8;
    }
    .wallet-button img {
      height: 100%;
      width: auto;
      max-width: 100%;
      display: block;
      object-fit: contain;
    }
    .wallet-button-apple {
      background: transparent;
    }
    .wallet-button-apple:hover {
      background: transparent;
    }
    .wallet-button-passmate {
      background: transparent;
      border: none;
    }
    .wallet-button-passmate:hover {
      background: transparent;
      border: none;
    }
    .wallet-buttons-container {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: center;
    }
    .wallet-buttons-container .step-btn-back {
      flex: 1;
      height: 56px;
    }
    .share-card {
      border-radius: 16px;
      border: none;
      padding: 12px 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: #fff;
      font-weight: 600;
      font-size: 16px;
      text-decoration: none;
      transition: opacity 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
      height: 48px;
    }
    .share-card:hover {
      opacity: 0.9;
      transform: translateY(-1px);
    }
    .share-card:active {
      transform: scale(0.98);
    }
    .share-card-whatsapp {
      background: #25D366;
    }
    .share-card-linkedin {
      background: #0077B5;
    }
    .share-card-email {
      background: #6A7EA8;
      color: #fff;
    }
    /* Card Preview Styles - Base canvas: 375 × 627 px, reduced by 20% = 375 × 501.6 px */
    /* Success page - proper responsive layout */
    /* Only customize layout when active – .step.active already sets display:flex */
    #step-6.step-layout.active {
      flex-direction: column;
    }
    @media (max-width: 767px) {
      #step-6.step-layout.active {
        padding-top: 0;
      }
      
      #step-6 .step-card {
        padding-top: 40px;
        padding-bottom: 16px;
      }
    }
    @media (min-width: 768px) {
      #step-6.step-layout.active {
        min-height: 100dvh;
        justify-content: center;
      }
      
      #step-6 .step-card {
        padding: 48px;
      }
    }
    @media (min-width: 768px) {
      #step-6 .step-card {
        padding-top: 32px !important;
        padding-bottom: 40px !important;
      }
    }
    .auth-split-right {
      display: none;
    }
    .auth-btn-google {
      background: #fff;
      color: #333;
      border: 1.5px solid #ddd;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }
    .auth-btn-apple {
      background: #000;
      color: #fff;
      border: 1px solid #000;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin-bottom: 12px;
    }
    .auth-btn-apple:hover {
      background: #1a1a1a;
    }
    .auth-divider {
      position: relative;
      text-align: center;
      margin: 16px 0;
    }
    .auth-divider::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 1px;
      background: #E0E0E0;
    }
    .auth-divider span {
      position: relative;
      background: #fff;
      padding: 0 12px;
      color: #888;
      font-size: 13px;
    }
    .auth-terms-text {
      margin-top: 16px;
      font-size: 12px;
      color: #888;
      text-align: center;
      line-height: 1.5;
    }
    .auth-terms-text a {
      color: #0066FF;
      text-decoration: none;
    }
    .auth-terms-text a:hover {
      text-decoration: underline;
    }
    @media (min-width: 1024px) {
      /* Full-bleed two columns (match .layout steps 1–5 / 7); overrides #authSection.active padding/bg/max-width */
      #authSection.auth-split.active {
        box-sizing: border-box;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        min-height: 100dvh;
        height: 100dvh;
        align-items: stretch;
        overflow: hidden;
        background: transparent;
      }
      #authSection.auth-split.active .auth-split-left {
        box-sizing: border-box;
        padding: 48px 56px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-self: stretch;
        min-height: 0;
        background: #ffffff;
      }
      #authSection.auth-split.active .auth-split-right {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: stretch;
        min-height: 0;
        background: #bfe4fa;
        border-left: none;
        position: relative;
        padding: 24px 40px;
      }
      #authSection.auth-split.active .auth-preview-panel {
        position: sticky;
        top: 0;
        width: 100%;
        min-height: 100dvh;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
    /* Success card preview - responsive sizing */
    .success-card-preview {
      margin-top: 24px;
      display: flex;
      justify-content: center;
      width: 100%;
    }
    .business-card-preview {
      width: 100%;
      max-width: 340px;
    }
    .business-card-preview-inner {
      width: 100%;
      max-width: 340px;
      aspect-ratio: 375 / 501.6;
      border-radius: 20px;
      padding: 0 14px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      background-color: #026ce0;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: flex-start;
      box-sizing: border-box;
      position: relative;
    }
    @media (max-width: 430px) {
      .business-card-preview {
        max-width: calc(100vw - 80px);
      }
      
      .business-card-preview-inner {
        max-width: calc(100vw - 80px);
        border-radius: 18px;
        padding: 0 12px;
      }
    }
    @media (max-width: 374px) {
      .business-card-preview {
        max-width: calc(100vw - 64px);
      }
      
      .business-card-preview-inner {
        max-width: calc(100vw - 64px);
      }
    }
    @media (min-width: 768px) {
      .business-card-preview {
        max-width: 375px;
      }
      
      .business-card-preview-inner {
        max-width: 375px;
        border-radius: 24px;
        padding: 0 16px;
      }
    }
    /* Wallet button responsive */
    .wallet-buttons-container {
      margin-top: 16px;
      width: 100%;
      max-width: 340px;
      margin-left: auto;
      margin-right: auto;
    }
    @media (max-width: 430px) {
      .wallet-buttons-container {
        max-width: 100%;
      }
    }
    /* Success icon and title */
    .success-icon {
      width: 72px;
      height: 72px;
    }
    @media (max-width: 430px) {
      .success-icon {
        width: 64px;
        height: 64px;
      }
    }
    .step-content-header {
      margin-bottom: 16px;
    }
    @media (max-width: 430px) {
      .step-content-header {
        margin-bottom: 16px;
      }
    }
    /* Step title on success page */
    #step-6 .step-title-large {
      font-size: 24px;
    }
    @media (max-width: 430px) {
      #step-6 .step-title-large {
        font-size: 24px;
      }
    }
    @media (min-width: 768px) {
      #step-6 .step-title-large {
        font-size: 24px;
      }
    }
    /* Header area: y ≈ 16px from top, height ≈ 70px */
    .card-preview-header {
      display: flex;
      align-items: center;
      width: 100%;
      padding-top: 16px;
      height: 70px;
      margin-bottom: 14px;
      text-align: left;
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .card-preview-logo-wrapper {
      border-radius: 8px;
      overflow: hidden;
      margin-right: 10px;
      background: rgba(255, 255, 255, 0.2);
      display: flex;
      align-items: center;
      justify-content: flex-start;
      position: relative;
      box-sizing: border-box;
    }
    .card-preview-logo-wrapper:not(.has-logo) {
      width: 50px;
      height: 50px;
      min-width: 50px;
      max-width: 50px;
      flex-shrink: 0;
      justify-content: center;
      background: rgba(255, 255, 255, 0.18);
      border: 1px solid rgba(255, 255, 255, 0.16);
    }
    .card-preview-logo-wrapper.has-logo {
      /* pkpass-style strip: up to 160×50 so wide logos stay readable */
      width: min(160px, 100%);
      max-width: 160px;
      height: 50px;
      min-width: 48px;
      flex-shrink: 1;
      background: transparent;
      border-color: transparent;
    }
    .card-preview-logo-wrapper:not(.has-logo)::after {
      content: "Logo";
      font-size: 12px;
      font-weight: 700;
      color: #ffffff;
      letter-spacing: -0.02em;
      text-transform: none;
      line-height: 1;
      text-align: center;
      padding: 0 4px;
    }
    .card-preview-logo-wrapper.has-logo::after {
      display: none;
    }
    .card-preview-logo {
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: left top;
    }
    .card-preview-header-texts {
      flex: 0 1 auto;
      text-align: left;
      display: flex;
      align-items: center;
    }
    /* Primary field: fullName (large, top) - matches pkpass primaryFields */
    .card-preview-main {
      display: flex;
      flex-direction: column;
      width: 100%;
      padding-top: 8px;
      margin-bottom: 14px;
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .card-preview-name-block {
      width: 100%;
      text-align: left;
    }
    .card-preview-label {
      font-size: 12px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      opacity: 0.8;
      color: rgba(229, 240, 255, 0.9);
      margin-bottom: 4px;
      line-height: 1.2;
    }
    .card-preview-name {
      font-size: 24px;
      font-weight: 700;
      color: #ffffff;
      line-height: 1.2;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      min-width: 0;
    }
    /* Secondary fields row: title only — matches pkpass secondaryFields */
    .business-card-preview-inner .card-preview-secondary-block:has(.card-preview-company) {
      display: none !important;
    }
    .card-preview-secondary-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      width: 100%;
      padding-top: 10px;
      /* Room between long email/phone lines and TITLE/COMPANY (was 16px; felt cramped). */
      gap: clamp(18px, 5vw, 28px);
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .card-preview-secondary-block {
      flex: 1;
      min-width: 0;
      text-align: left;
    }
    /* Right column: stretch so .card-preview-field is always the full column width.
       That way TITLE/COMPANY labels and values share the same left edge across BOTH rows
       (two separate wrappers no longer shrink-wrap to different widths). */
    .card-preview-secondary-block:last-child {
      flex: 0 0 40%;
      max-width: 40%;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }
    /* Stack label + value; stretch children to column width so overflow measurement works
       for font fitting (otherwise the value box grows to text width and never “overflows”). */
    .card-preview-field {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      align-self: stretch;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      text-align: left;
    }
    .card-preview-phone {
      font-size: 16px;
      color: #ffffff;
      line-height: 1.4;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      min-width: 0;
      width: 100%;
    }
    .card-preview-title {
      font-size: 16px;
      font-weight: 400;
      color: #ffffff;
      text-align: left;
      line-height: 1.3;
      white-space: nowrap;
      overflow: hidden;
      min-width: 0;
      width: 100%;
    }
    /* Auxiliary fields row: email (left), phone (right) - matches pkpass auxiliaryFields */
    .card-preview-auxiliary-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      width: 100%;
      padding-top: 10px;
      margin-bottom: 20px;
      gap: clamp(18px, 5vw, 28px);
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .card-preview-auxiliary-block {
      flex: 1;
      min-width: 0;
      text-align: left;
    }
    /* Right column: same full-width stretch as secondary row (align TITLE vs COMPANY). */
    .card-preview-auxiliary-block:last-child {
      flex: 0 0 40%;
      max-width: 40%;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }
    .card-preview-email {
      font-size: 16px;
      color: #ffffff;
      line-height: 1.4;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      min-width: 0;
      width: 100%;
      box-sizing: border-box;
      letter-spacing: normal;
    }
    .card-preview-company {
      font-size: 16px;
      font-weight: 400;
      color: #ffffff;
      text-align: left;
      line-height: 1.3;
      white-space: nowrap;
      overflow: hidden;
      min-width: 0;
      width: 100%;
    }
    /* QR area: centered, 120-140px square, 24-32px from bottom */
    .card-preview-qr-wrapper {
      margin-top: auto;
      margin-bottom: 28px;
      display: flex;
      flex-direction: column;
      align-items: center;
      flex-shrink: 0;
      width: 100%;
      box-sizing: border-box;
    }
    .card-preview-qr-placeholder {
      width: 130px;
      height: 130px;
      border-radius: 8px;
      background: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10px;
    }
    .card-preview-qr {
      width: 100%;
      height: 100%;
      object-fit: contain;
      border-radius: 4px;
    }
    .card-preview-qr-caption {
      margin-top: 6px;
      font-size: 12px;
      color: #ffffff;
      text-align: center;
    }
    .country-select-wrapper {
      position: relative;
    }
    .country-search {
      width: 100%;
      border: 1px solid #D8DBE2;
      border-radius: 16px;
      padding: 10px 14px;
      font-size: 16px;
      background: #FFFFFF;
      margin-bottom: 8px;
    }
    .country-search:focus {
      border-color: #0066FF;
      outline: none;
      box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    }
    .country-dropdown {
      position: fixed;
      max-height: 256px;
      overflow-y: auto;
      background: #FFFFFF;
      border: 1px solid #D8DBE2;
      border-radius: 16px;
      z-index: 9999;
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
      display: none;
      width: 0;
      min-width: 128px;
    }
    .country-dropdown.show {
      display: block;
    }
    .country-option {
      padding: 12px 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      transition: background 0.15s ease;
    }
    .country-option:hover {
      background: #F2F4F7;
    }
    .country-option.selected {
      background: #F2F4F7;
      font-weight: 600;
    }
    .country-select-display {
      width: 100%;
      border: 1px solid #D8DBE2;
      border-radius: 16px;
      padding: 14px 12px;
      font-size: 14px;
      background: #FFFFFF;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: border 0.2s ease, box-shadow 0.2s ease;
      min-width: 0;
    }
    .country-select-display > span {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
    }
    .country-select-display > svg {
      flex-shrink: 0;
      margin-left: 8px;
    }
    .country-select-display:focus {
      border-color: #0066FF;
      outline: none;
      box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    }
    .country-select-display.invalid {
      border-color: #f97316;
      box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
    }
    /* ============================================
       STEP LAYOUTS - FULL PAGE RESPONSIVE
       ============================================ */
    /* Base step styles */
    /* Layout helper for steps – DO NOT control visibility here */
    /* Visibility is controlled by .step { display: none; } and .step.active { display: flex; } */
    .step-layout {
      width: 100%;
      overflow-x: hidden;
      box-sizing: border-box;
      background: #FFFFFF;
      flex-direction: column;
    }
    /* Z-INDEX LAYERS (keep consistent across components)
       10    content accents (icons, dividers)
       50    sticky step-header
       100   sticky step-buttons CTA
       999   progress indicators (dots, bar)
       1000  generic modal overlays (dashboard)
       9998  onboarding overlay backdrops (country, color)
       9999  onboarding overlays (country-modal, color-picker, auth)
       10000 subscription modal overlay
       10001 email verification overlay
       New overlays: use position: fixed, toggle body.modal-open, pick a layer here,
       handle their own env(safe-area-inset-*). Do not introduce nested overflow on .step. */
    /* MOBILE: Full-page layout (no cards, no containers) */
    @media (max-width: 767px) {
      /* overflow-x:hidden on .step forces overflow-y:auto — traps touch scroll on some Android
         (Samsung) inside the step instead of body; opening a picker reflows and "fixes" it. */
      .screen .layout > .step {
        width: 100%;
        background: #FFFFFF;
        transform: none;
        overflow: visible;
      }

      /* No min-height: content defines height so iOS/Android do not show blank tail
         below CTAs; body scrolls naturally. Welcome #step-0 keeps its own min-height. */
      .screen .layout > .step.active:not(#step-0) {
        display: block;
        transform: none;
      }

      /* .step and .step-layout are the same element; do not set display here
         or it overrides .step { display: none } and leaks inactive steps */
      .step-layout {
        width: 100%;
        background: #FFFFFF;
        flex-direction: column;
      }

      /* Step header - sticky at top */
      .step-header {
        position: sticky;
        top: 0;
        z-index: 50;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid #E8EBF0;
        padding: 16px 20px;
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
        padding-left: calc(20px + env(safe-area-inset-left, 0px));
        padding-right: calc(20px + env(safe-area-inset-right, 0px));
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        flex-shrink: 0;
      }
      .step-header-inner {
        width: 100%;
        max-width: 100%;
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0;
        padding: 0;
        justify-content: flex-start;
      }

      /* Step content - full width; document (body) owns scroll on mobile */
      .step-card {
        width: 100%;
        padding: 24px 20px 16px;
        padding-left: calc(20px + env(safe-area-inset-left, 0px));
        padding-right: calc(20px + env(safe-area-inset-right, 0px));
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        border: none;
        margin: 0;
        box-sizing: border-box;
      }

      .step-card-inner {
        width: 100%;
        max-width: 100%;
        background: transparent;
        box-shadow: none;
        padding: 0;
        margin: 0;
      }

      /* Step buttons - sticky at bottom (body-scroll container keeps CTA above iOS URL bar) */
      .step-buttons {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 20px;
        padding-left: calc(20px + env(safe-area-inset-left, 0px));
        padding-right: calc(20px + env(safe-area-inset-right, 0px));
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        background: #FFFFFF;
        border-top: 1px solid #E8EBF0;
        box-shadow: none;
        margin: 0;
        z-index: 100;
        display: flex;
        gap: 12px;
        box-sizing: border-box;
      }

      /* Success page - hide header on mobile */
      #step-6 .step-header {
        display: none;
      }

      #step-6 .step-card {
        padding-top: 40px;
        padding-bottom: 16px;
      }

      /* #step-8 / #authSection live outside .layout — mirror in-layout flex + overflow so
         body remains the scroll container (same Android overflow pairing issue as .layout > .step). */
      body > #step-8.active,
      body > #authSection.active {
        display: block;
        overflow: visible;
        width: 100%;
      }
    }
    /* TABLET: Centered card layout */
    @media (min-width: 768px) and (max-width: 1024px) {
      .screen .layout > .step.active:not(#step-0) {
        padding: 32px 28px;
        min-height: auto;
        background: #FFFFFF;
        justify-content: center;
      }
      
      .step-layout {
      width: 100%;
        max-width: 640px;
        flex-direction: column;
        margin: 0 auto;
      }
      
      .step-header {
        position: relative;
        background: transparent;
        backdrop-filter: none;
        border-bottom: none;
        padding: 0 0 24px 0;
        margin-bottom: 0;
        width: 100%;
      }
      
      .step-header-inner {
        max-width: 100%;
        margin: 0;
      }
      
      .step-card {
        width: 100%;
        background: #FFFFFF;
        border-radius: 24px;
        border: none;
        padding: 28px;
        box-shadow: none;
        margin: 0;
      }
      
      .step-card-inner {
        background: transparent;
        box-shadow: none;
        padding: 0;
      }
      
      .step-buttons {
        position: relative;
        bottom: auto;
        box-shadow: none;
        background: transparent;
        margin-top: 24px;
      }
    }
    /* DESKTOP: Centered card layout */
    @media (min-width: 1025px) {
      .screen .layout > .step.active:not(#step-0) {
        padding: 32px;
        min-height: auto;
        background: #FFFFFF;
        justify-content: center;
      }
      
      .step-layout {
        width: 100%;
        max-width: 720px;
        flex-direction: column;
        margin: 0 auto;
      }
      
      .step-header {
        position: relative;
        background: transparent;
        backdrop-filter: none;
        border-bottom: none;
        padding: 0 0 24px 0;
        margin-bottom: 0;
        width: 100%;
      }
      
      .step-header-inner {
        max-width: 100%;
        margin: 0;
      }
      
      .step-card {
        width: 100%;
        max-width: 600px;
        background: #FFFFFF;
        border-radius: 24px;
        border: none;
        padding: 32px;
        box-shadow: none;
        margin: 0 auto;
      }
      
      .step-card-inner {
        background: transparent;
        box-shadow: none;
        padding: 0;
      }
      
      .step-buttons {
        position: relative;
        bottom: auto;
        box-shadow: none;
        background: transparent;
        margin-top: 32px;
      }
    }
    /* Desktop card layout for steps 1-6 - proper width and centering */
    /* This comes after the general desktop rules to override them for steps 1-6 */
    @media (min-width: 1024px) {
      /* Override step-layout max-width for steps 1-6 */
      #step-1.step-layout,
      #step-2.step-layout,
      #step-3.step-layout,
      #step-4.step-layout,
      #step-5.step-layout,
      #step-6.step-layout {
        max-width: none !important;
        width: 100%;
        padding: 24px 32px;
        align-items: center;
        justify-content: center;
      }
      
      /* Set proper card width and centering for steps 1-6 */
      #step-1 .step-card,
      #step-2 .step-card,
      #step-3 .step-card,
      #step-4 .step-card,
      #step-5 .step-card,
      #step-6 .step-card {
        width: 100%;
        max-width: 880px !important;
        margin: 0 auto;
        border-radius: 24px;
        background: #FFFFFF;
        box-shadow: none;
        border: none;
        padding: 28px;
      }
      
      #step-1 .step-card-inner,
      #step-2 .step-card-inner,
      #step-3 .step-card-inner,
      #step-4 .step-card-inner,
      #step-5 .step-card-inner,
      #step-6 .step-card-inner {
        padding: 0;
        max-width: 100%;
      }
      
      /* Fix back button alignment - clearly on the left */
      #step-1 .step-header,
      #step-2 .step-header,
      #step-3 .step-header,
      #step-4 .step-header,
      #step-5 .step-header,
      #step-6 .step-header,
      #authSection .step-header {
        max-width: 960px;
        margin: 0 auto;
        padding: 0 0 16px 0;
      }
      
      #step-1 .step-header-inner,
      #step-2 .step-header-inner,
      #step-3 .step-header-inner,
      #step-4 .step-header-inner,
      #step-5 .step-header-inner,
      #step-6 .step-header-inner,
      #authSection .step-header-inner {
        justify-content: flex-start !important;
        max-width: 960px;
        margin: 0;
      }
      
      #step-1 .step-back-btn,
      #step-2 .step-back-btn,
      #step-3 .step-back-btn,
      #step-4 .step-back-btn,
      #step-5 .step-back-btn,
      #step-6 .step-back-btn,
      #authSection .step-back-btn {
        margin-right: 12px;
        flex-shrink: 0;
      }
    }
    .step-header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid #D8DBE2;
      padding: 12px 16px;
      width: 100%;
      box-sizing: border-box;
      margin: 0;
    }
    .step-header-inner {
      position: relative;
      width: 100%;
      max-width: 28rem;
      margin: 0 auto;
      display: flex;
      align-items: center;
      gap: 12px;
      box-sizing: border-box;
      padding: 0;
    }
    @media (min-width: 768px) {
      .step-header {
        position: relative;
        background: transparent;
        backdrop-filter: none;
        border-bottom: none;
        padding: 0 0 24px 0;
        margin-bottom: 24px;
      }
      
      .step-header-inner {
        max-width: 480px;
        margin: 0 auto;
      }
    }
    .step-back-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: #F2F4F7;
      border: 1px solid #D8DBE2;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), border-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
      font-size: 20px;
      color: #1A1C1E;
      flex-shrink: 0;
      padding: 0;
    }
    .step-back-btn:hover {
      background: rgba(0, 102, 255, 0.08);
      border-color: #D8DBE2;
    }
    .step-back-btn:active {
      transform: scale(0.98);
    }
    .step-back-btn svg {
      color: #1A1C1E;
    }
    .step-header-title {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      width: 60%;
      text-align: center;
      font-size: 20px;
      font-weight: 700;
      color: #1A1C1E;
      margin: 0;
      z-index: 1;
      display: none; /* Hide header title - now in content area */
    }
    .step-indicator {
      display: block;
      font-size: 12px;
      font-weight: 600;
      color: #0066FF;
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    @media (min-width: 768px) {
      .step-header-title {
        font-size: 24px;
      }
    }
    @media (min-width: 1025px) {
      .step-header-title {
        font-size: 24px;
      }
    }
    .step-buttons,
    .button-group {
      margin-top: 24px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    /* When only one button, make it full width */
    .step-buttons:has(.step-btn-primary:only-child) .step-btn-primary,
    .step-buttons .step-btn-primary:only-child {
      width: 100%;
      flex: 1;
    }
    /* Fallback for browsers without :has() support */
    .step-buttons .step-btn-primary:only-child {
      width: 100%;
    }
    .field-group {
      margin-bottom: 24px;
    }
    @media (max-width: 767px) {
      .field-group {
        margin-bottom: 20px;
      }
    }
    .step-btn-back {
      flex: 0 0 auto;
      height: 56px;
      width: 48px;
      height: 48px;
      padding: 0;
      border-radius: 50%;
      border: 1px solid #D8DBE2;
      background: #F2F4F7;
      color: #1A1C1E;
      font-weight: 600;
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), border-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
    }
    .step-btn-back:hover {
      background: #E8EBF0;
      border-color: #C8CCD4;
    }
    .step-btn-back:active {
      transform: scale(0.98);
    }
    .step-btn-primary {
      flex: 1;
      height: 60px;
      border-radius: 16px;
      background: #0066FF;
      color: #fff;
      font-weight: 700;
      font-size: 16px;
      border: none;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(0, 102, 255, 0.22);
      transition: background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.18s cubic-bezier(0.33, 1, 0.68, 1);
      min-width: 140px;
      padding: 0 32px;
    }
    .step-btn-primary:hover:not(:disabled) {
      background: #0052CC;
      box-shadow: 0 4px 14px rgba(0, 102, 255, 0.28);
    }
    .step-btn-primary:active:not(:disabled) {
      transform: scale(0.98);
      box-shadow: 0 1px 4px rgba(0, 102, 255, 0.2);
    }
    .step-btn-primary:disabled {
      opacity: 0.55;
      cursor: not-allowed;
      transform: none;
    }
    .step-btn-primary.loading {
      position: relative;
      color: transparent;
      pointer-events: none;
    }
    .step-btn-primary.loading::after {
      content: "";
      position: absolute;
      width: 20px;
      height: 20px;
      top: 50%;
      left: 50%;
      margin-left: -10px;
      margin-top: -10px;
      border: 3px solid rgba(255, 255, 255, 0.3);
      border-radius: 50%;
      border-top-color: #fff;
      animation: spin 1s linear infinite;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    /* Contact Step Specific Styles */
    .contact-form-card {
      border-radius: 24px;
      background: #FFFFFF;
      box-shadow: 0 18px 60px rgba(15, 23, 42, 0.06);
      padding: 20px;
    }
    @media (min-width: 640px) {
      .contact-form-card {
        padding: 20px;
      }
    }
    .contact-field {
      display: grid;
      gap: 8px;
      margin-bottom: 16px;
    }
    .contact-label,
    .field-label {
      font-size: 14px;
      font-weight: 500;
      color: #1A1C1E;
      margin-bottom: 0;
    }
    .contact-required {
      color: #ff4d4f;
      margin-left: 2px;
    }
    .contact-input {
      width: 100%;
      min-height: 44px;
      height: 64px;
      border-radius: 18px;
      border: 1px solid #D8DBE2;
      background-color: #FFFFFF;
      padding: 16px;
      font-size: 16px;
      color: #1A1C1E;
      transition: border-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1);
      font-family: inherit;
      appearance: none;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    .contact-input:hover:not(:focus):not(.invalid) {
      border-color: #c5cad6;
    }
    .contact-input[type="text"],
    .contact-input[type="email"],
    .contact-input[type="tel"] {
      height: 64px;
      padding: 0 20px;
    }
    .contact-input[type="text"].valid,
    .contact-input[type="email"].valid,
    .contact-input[type="tel"].valid {
      padding-right: 48px !important;
    }
    .contact-input::placeholder {
      color: #6A7EA8;
    }
    .contact-input:focus,
    input:focus,
    .field-input:focus {
      outline: none !important;
      border-color: #0066FF !important;
      border-width: 2px !important;
      background-color: #FFFFFF !important;
      box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    }
    .contact-input.valid:focus,
    input.valid:focus,
    .field-input.valid:focus {
      border-color: #10b981 !important;
      background-color: #f0fdf4 !important;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
      background-repeat: no-repeat !important;
      background-position: right 16px center !important;
      background-size: 20px 20px !important;
      box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    }
    .contact-input:disabled {
      background-color: #F2F4F7;
      color: #6A7EA8;
      cursor: not-allowed;
    }
    .contact-input.valid:disabled {
      background-color: #f0fdf4 !important;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
      background-repeat: no-repeat !important;
      background-position: right 16px center !important;
      background-size: 20px 20px !important;
    }
    textarea.contact-input {
      height: 100px;
      padding: 16px;
      resize: vertical;
      min-height: 100px;
      max-height: 300px;
    }
    /* Step 4 specific adjustments */
    #step-4 .contact-input[type="text"],
    #step-4 .contact-input[type="url"] {
      height: 56px;
    }
    
    /* Field Validation States - MUST work for all inputs */
    .contact-input.valid,
    input.valid,
    .field-input.valid {
      border-color: #10b981 !important;
      padding-right: 48px !important;
      background-color: #f0fdf4 !important;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
      background-repeat: no-repeat !important;
      background-position: right 16px center !important;
      background-size: 20px 20px !important;
      animation: fadeIn 0.18s ease-out;
    }
    /* Ensure valid state overrides input type specific padding */
    .contact-input[type="text"].valid,
    .contact-input[type="email"].valid,
    .contact-input[type="tel"].valid,
    input[type="text"].valid,
    input[type="email"].valid,
    input[type="tel"].valid {
      padding-right: 48px !important;
      background-color: #f0fdf4 !important;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
      background-repeat: no-repeat !important;
      background-position: right 16px center !important;
      background-size: 20px 20px !important;
    }
    .contact-input.invalid,
    input.invalid,
    .field-input.invalid {
      border-color: #ef4444 !important;
      background-color: #fef2f2 !important;
      /* Shake animation removed - validation only on submit */
    }
    
    /* Shake animation removed - validation only on submit */
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    /* Step Description */
    .step-description {
      font-size: 14px;
      color: #6A7EA8;
      line-height: 1.5;
      margin-bottom: 16px;
    }
    
    /* Step Content Header - Large Title & Subtitle */
    /* Step Content Header - Large Title & Subtitle */
    .step-content-header {
      margin-bottom: 16px;
      padding-top: 0;
      display: flex;
      flex-direction: column;
    }
    .step-content-header .step-indicator {
      order: -1;
      margin-bottom: 8px;
    }
    @media (max-width: 767px) {
      .step-content-header {
        margin-bottom: 16px;
      }
    }
    @media (min-width: 768px) {
      .step-content-header {
        margin-bottom: 24px;
      }
    }
    .step-title-large {
      font-size: 24px;
      font-weight: 700;
      line-height: 1.3;
      color: #1A1C1E;
      margin: 0 0 8px 0;
      letter-spacing: -0.02em;
    }
    @media (min-width: 768px) {
      .step-title-large {
        font-size: 24px;
      }
    }
    @media (max-width: 767px) {
      .step-title-large {
        font-size: 24px;
      }
    }
    .step-subtitle {
      font-size: 14px;
      color: #6A7EA8;
      line-height: 1.6;
      margin: 0;
      margin-top: 4px;
    }
    
    /* Skip Button */
    .button-group-skip {
      text-align: center;
      margin: 16px 0 16px;
    }
    .btn-skip {
      display: block;
      width: 100%;
      text-align: center;
      padding: 16px;
      margin-bottom: 16px;
      background: transparent;
      border: none;
      color: #0066FF;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: color 0.18s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.18s cubic-bezier(0.33, 1, 0.68, 1);
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .btn-skip:hover {
      background: #F2F4F7;
      border-radius: 12px;
      text-decoration: none;
    }
    .btn-skip::after {
      content: " →";
      display: inline;
    }
    .contact-input.invalid {
      border-color: #f97316;
      box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.14);
    }
    /* Phone input section - ensure proper width */
    #form-step2 .flex {
      display: flex;
      gap: 12px;
      width: 100%;
    }
    .contact-country-btn {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      height: 64px;
      min-height: 48px;
      padding: 0 10px 0 12px;
      border-radius: 18px;
      border: 1px solid #D8DBE2;
      background: #FFFFFF;
      font-size: 16px;
      color: #1A1C1E;
      cursor: pointer;
      transition: border-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
      flex-shrink: 0;
      width: 110px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      overflow: hidden;
      box-sizing: border-box;
    }
    #form-step2 .flex {
      gap: 8px;
      width: 100%;
      display: flex;
      align-items: stretch;
      overflow: hidden; /* Prevent clipping */
      box-sizing: border-box;
    }
    #form-step2 .flex .contact-input.flex-1 {
      flex: 1;
      min-width: 0;
      width: auto;
      height: 64px;
      font-size: 16px;
      overflow: hidden; /* Prevent text from clipping */
      box-sizing: border-box;
    }
    /* Mobile: Fix phone input clipping on validation */
    @media (max-width: 767px) {
      /* Ensure contact-field container doesn't clip */
      #form-step2 .contact-field {
        overflow: visible;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-right: 0;
        margin-right: 0;
      }
      #form-step2 .flex {
        overflow: visible; /* Allow container to show validation icon */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: stretch;
        gap: 8px;
      }
      #form-step2 .flex .contact-input.flex-1 {
        flex: 1 1 0%; /* Better flex behavior - allow to shrink */
        min-width: 0;
        width: 0; /* Start from 0 to allow flex to calculate properly */
        overflow: visible; /* Allow validation icon to show */
        box-sizing: border-box;
        /* Ensure validation icon space is always reserved */
        padding-right: 48px !important;
      }
      /* Ensure country button doesn't grow or shrink */
      #form-step2 .contact-country-btn {
        flex-shrink: 0;
        flex-grow: 0;
        width: 110px;
        min-width: 110px;
      }
    }
    /* Ensure phone input is wide enough */
    @media (max-width: 430px) {
      .contact-country-btn {
        width: 100px;
        padding: 0 8px 0 10px;
        gap: 6px;
        font-size: 14px;
      }
      #form-step2 .flex {
        gap: 6px;
      }
      #form-step2 .flex .contact-input.flex-1 {
        /* Font-size deliberately NOT redeclared here — the global mobile rule above
           keeps inputs at 16px to prevent iOS Safari tap-to-zoom. */
        padding: 0 14px;
        padding-right: 48px !important; /* Ensure validation icon space */
        max-width: none; /* Remove constraint to prevent clipping */
        overflow: visible;
      }
      #form-step2 .contact-country-btn {
        width: 100px;
        min-width: 100px;
        flex-shrink: 0;
        flex-grow: 0;
      }
    }
    @media (max-width: 374px) {
      #form-step2 .flex .contact-input.flex-1 {
        max-width: none; /* Remove constraint to prevent clipping */
        padding-right: 48px !important;
        overflow: visible;
      }
      #form-step2 .contact-country-btn {
        width: 90px;
        min-width: 90px;
        flex-shrink: 0;
        flex-grow: 0;
      }
      .contact-country-btn {
        width: 90px;
        padding: 0 6px 0 8px;
      }
      #phoneCountryText {
        font-size: 12px;
        min-width: 40px;
      }
      #phoneCountryFlag {
        font-size: 18px;
        margin-right: 4px !important;
      }
    }
    .contact-country-btn > span {
      flex: 0 0 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
    }
    #phoneCountryFlag {
      font-size: 20px;
      line-height: 1;
    }
    #phoneCountryText {
      font-weight: 600;
      letter-spacing: 0.3px;
      min-width: 40px;
      font-size: 16px;
    }
    /* Hide dropdown arrow icon in country selector button (for modal version) */
    /* Hide dropdown arrow icon in country selector button (for modal version) */
    .contact-country-btn > svg {
      display: none !important;
    }
    .contact-country-btn,
    .phone-country-btn {
      cursor: pointer;
      transition: border-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.18s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
    }
    .contact-country-btn:hover,
    .phone-country-btn:hover {
      background: #FFFFFF;
      border-color: #0066FF;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    .contact-country-btn:focus,
    .phone-country-btn:focus {
      outline: none;
      border-color: #0066FF;
      border-width: 2px;
      box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
      background: #FFFFFF;
    }
    .contact-country-btn.invalid {
      border-color: #f97316;
      box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.14);
    }
    .contact-error,
    .field-error {
      display: none;
      color: #ef4444;
      font-size: 14px;
      font-weight: 500;
      margin-top: 6px;
      padding-left: 4px;
    }
    .contact-error:not(.hidden),
    .field-error:not(.hidden) {
      display: block;
      animation: fadeIn 0.2s ease;
    }
    .privacy-terms-text {
      font-size: 12px;
      color: #6B7280;
      margin-top: 12px;
      margin-bottom: 8px;
      line-height: 1.4;
      text-align: left;
    }
    .privacy-terms-text a {
      color: #0066FF;
      text-decoration: underline;
    }
    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(-4px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    /* Country Modal Bottom Sheet */
    .country-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(15, 23, 42, 0.45);
      z-index: 9998;
      display: none;
      align-items: flex-end;
      justify-content: center;
      animation: fadeIn 0.2s ease;
      /* Prevent background scrolling when modal is open */
      overflow: hidden;
      overscroll-behavior: none;
      /* Use viewport units that account for browser chrome */
      height: 100dvh;
      max-height: 100dvh;
    }
    .country-modal-overlay.show {
      display: flex;
    }
    /* Prevent body scroll when modal is open — overflow only (no position:fixed).
       Fixed body lock causes iOS keyboard scroll-into-view snaps (pseudo-zoom). */
    html.modal-open,
    body.modal-open {
      overflow: hidden;
    }
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    .country-modal {
      position: relative;
      width: 100%;
      max-width: 100%;
      /* Use viewport height minus safe area insets */
      height: calc(100dvh - env(safe-area-inset-top));
      max-height: calc(100dvh - env(safe-area-inset-top));
      border-radius: 20px 20px 0 0;
      background: #FFFFFF;
      z-index: 9999;
      /* Use flexbox column layout */
      display: flex;
      flex-direction: column;
      /* Padding only on sides, bottom handled by safe-area */
      padding: 0 12px;
      padding-bottom: calc(12px + env(safe-area-inset-bottom));
      animation: slideUp 0.18s ease-out;
      box-shadow: 0 -10px 40px rgba(10, 40, 75, 0.12);
      /* Ensure modal doesn't scroll - only inner list scrolls */
      overflow: hidden;
      /* Anchor to viewport, not page */
      touch-action: none;
      /* Prevent clicks from passing through */
      pointer-events: auto;
    }
    @keyframes slideUp {
      from {
        transform: translateY(100%);
      }
      to {
        transform: translateY(0);
      }
    }
    /* Mobile card preview bottom sheet (Steps 1–5) */
    .preview-btn {
      display: none;
    }
    .preview-sheet-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(15, 23, 42, 0.45);
      z-index: 9998;
      display: none;
      align-items: flex-end;
      justify-content: center;
      overflow: hidden;
      overscroll-behavior: none;
      height: 100dvh;
      max-height: 100dvh;
    }
    .preview-sheet-overlay.show {
      display: flex;
    }
    .preview-sheet {
      position: relative;
      width: 100%;
      max-width: 480px;
      max-height: calc(100dvh - env(safe-area-inset-top, 0px));
      border-radius: 20px 20px 0 0;
      background: #FFFFFF;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      padding: 0 16px;
      padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
      animation: slideUp 0.18s ease-out;
      box-shadow: 0 -10px 40px rgba(10, 40, 75, 0.12);
      overflow: hidden;
      pointer-events: auto;
    }
    .preview-sheet-header {
      flex-shrink: 0;
      padding-top: 8px;
      padding-bottom: 8px;
    }
    .preview-sheet-drag-handle {
      width: 36px;
      height: 4px;
      background: #E2E8F0;
      border-radius: 2px;
      margin: 0 auto 10px;
    }
    .preview-sheet-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .preview-sheet-title {
      margin: 0;
      padding: 2px 0 0;
      font-size: 17px;
      font-weight: 700;
      color: #1A1C1E;
    }
    .preview-sheet-close {
      width: 36px;
      height: 36px;
      border: none;
      background: #F2F4F7;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: #1A1C1E;
    }
    .preview-sheet-body {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-y: contain;
      padding: 12px 0 8px;
      display: flex;
      justify-content: center;
      align-items: flex-start;
    }
    .preview-sheet-body .business-card-preview {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      max-width: 340px;
      margin: 0 auto;
    }
    .preview-sheet-body .business-card-preview-inner {
      width: 100%;
      max-width: 100%;
      margin: 0 auto;
      box-shadow: none;
      aspect-ratio: auto;
      height: auto;
      min-height: 0;
      padding-bottom: 16px;
    }
    .preview-sheet-body .card-preview-qr-wrapper {
      margin-bottom: 12px;
    }
    .preview-sheet-body .card-preview-qr-placeholder {
      width: 100px;
      height: 100px;
    }
    @media (max-width: 430px) {
      .preview-sheet-body .business-card-preview,
      .preview-sheet-body .business-card-preview-inner {
        max-width: 100%;
      }
      .preview-sheet-body .card-preview-qr-placeholder {
        width: 88px;
        height: 88px;
      }
      .preview-sheet-body .card-preview-qr-wrapper {
        margin-bottom: 8px;
      }
      .preview-sheet-body .card-preview-qr-caption {
        font-size: 11px;
        margin-top: 4px;
      }
    }
    @media (max-width: 767px) {
      .preview-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 36px;
        padding: 6px 12px;
        margin-left: auto;
        border-radius: 999px;
        background: #F2F4F7;
        border: 1px solid #D8DBE2;
        font-size: 14px;
        font-weight: 600;
        color: #1A1C1E;
        cursor: pointer;
        flex-shrink: 0;
      }
      .preview-btn svg {
        flex-shrink: 0;
      }
    }
    .country-modal-header {
      flex-shrink: 0;
      padding-top: 8px;
      padding-bottom: 8px;
      position: relative;
    }
    .country-modal-drag-handle {
      width: 36px;
      height: 4px;
      background: #E2E8F0;
      border-radius: 2px;
      margin: 0 auto 10px;
    }
    .country-modal-title-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .country-modal-title {
      margin: 0;
      padding: 2px 0 0;
      font-size: 17px;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: #0f172a;
      line-height: 1.25;
      flex: 1;
      min-width: 0;
    }
    .country-modal-close {
      position: relative;
      top: auto;
      right: auto;
      width: 36px;
      height: 36px;
      border: none;
      background: transparent;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      color: #64748b;
      transition: color 0.18s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.18s cubic-bezier(0.33, 1, 0.68, 1), transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
      padding: 0;
      flex-shrink: 0;
      margin-top: -2px;
    }
    .country-modal-close:hover,
    .country-modal-close:focus {
      background: #F2F4F7;
      color: #1A1C1E;
      outline: none;
    }
    .country-modal-close svg {
      width: 20px;
      height: 20px;
    }
    .country-modal-search-wrap {
      position: relative;
      width: 100%;
      flex-shrink: 0;
    }
    .country-modal-search-icon {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: #94a3b8;
      pointer-events: none;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .country-modal-search-icon svg {
      width: 18px;
      height: 18px;
    }
    .country-modal-search {
      width: 100%;
      height: 44px;
      border-radius: 9999px;
      font-size: 16px; /* Ensure 16px to prevent iOS zoom */
      border: 1px solid transparent;
      background: #f1f5f9;
      padding: 0 14px 0 42px;
      color: #0f172a;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
      flex-shrink: 0;
    }
    .country-modal-search::placeholder {
      color: #94a3b8;
    }
    .country-modal-search:focus {
      outline: none;
      border-color: #e2e8f0;
      box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
      background: #ffffff;
    }
    .country-modal-list {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 0;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      margin: 0 -4px;
      padding: 4px 4px 8px;
      min-height: 0;
    }
    /* Single scrollable list only (no “Popular countries” / sections) */
    .country-modal-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 11px 6px;
      min-height: 44px;
      box-sizing: border-box;
      cursor: pointer;
      transition: background-color 0.12s ease;
      font-size: 15px;
      line-height: 1.25;
      border-bottom: 1px solid #f1f5f9;
      border-radius: 0;
    }
    .country-modal-option:last-child {
      border-bottom: none;
    }
    .country-modal-option:hover {
      background: #f8fafc;
    }
    .country-modal-option:active {
      background: #f1f5f9;
    }
    .country-modal-option.is-selected {
      background: #eff6ff;
    }
    .country-modal-option-main {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
      flex: 1;
    }
    .country-modal-option .flag {
      font-size: 1.35rem;
      line-height: 1;
      flex-shrink: 0;
      width: 1.75rem;
      text-align: center;
    }
    .country-modal-option .name {
      flex: 1;
      min-width: 0;
      color: #0f172a;
      font-weight: 500;
      font-size: 15px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .country-modal-option .code {
      flex-shrink: 0;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      color: #64748b;
      font-size: 14px;
      text-align: right;
    }
    @keyframes countryModalDesktopIn {
      from {
        opacity: 0;
        transform: scale(0.97) translateY(6px);
      }
      to {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }
    /* Desktop / tablet: compact centered sheet (still modal overlay) */
    @media (min-width: 769px) {
      .country-modal-overlay {
        align-items: center;
        padding: 20px;
      }
      .country-modal {
        width: 100%;
        max-width: 400px;
        height: min(560px, calc(100dvh - 40px));
        max-height: min(560px, calc(100dvh - 40px));
        border-radius: 16px;
        padding: 0 14px;
        padding-bottom: 14px;
        box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
        animation: countryModalDesktopIn 0.2s ease-out;
      }
      .country-modal-drag-handle {
        display: none;
      }
      .country-modal-header {
        padding-top: 8px;
        padding-bottom: 8px;
      }
      .country-modal-title {
        font-size: 18px;
      }
    }
    /* Mobile-specific improvements */
    @media (max-width: 768px) {
      .country-modal {
        /* On mobile, use almost full screen height */
        height: calc(100dvh - env(safe-area-inset-top));
        max-height: calc(100dvh - env(safe-area-inset-top));
        bottom: 0;
      }
      .country-modal-list {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
      }
    }
    /* ============================================
       RESPONSIVE DESIGN - COMPLETE SYSTEM
       ============================================ */
    /* Prevent any overflow */
    * {
      box-sizing: border-box;
    }
    html {
      overflow-x: hidden;
      width: 100%;
      max-width: 100vw;
    }
    body {
      overflow-x: hidden;
      width: 100%;
      max-width: 100vw;
    }
    /* Mobile - Full Width Everything */
    @media (max-width: 767px) {
      /* Document height follows content only. Do NOT set min-height: 100vh/svh on html/body —
         that forces a full-viewport-tall scroll range when auth / step-8 content is short
         (blank white area below the last button on iOS). */
      html,
      body {
        height: auto;
        min-height: 0;
        overflow-x: clip;
        overflow-y: auto;
        position: static;
        overscroll-behavior: auto;
      }
      main,
      .screen,
      .layout {
        height: auto;
        min-height: 0;
        overflow: visible;
      }

      /* Ensure all containers are full width */
      .step-layout,
      .step-card,
      .step-card-inner,
      .contact-field,
      .field-group,
      .contact-input,
      input,
      textarea,
      select,
      button {
        max-width: 100%;
      }
      
      /* Minimum touch targets */
      .contact-input,
      .field-input,
      input[type="text"],
      input[type="email"],
      input[type="tel"] {
        min-height: 48px;
        height: 64px;
      }

      /* Scroll-into-view padding for sticky header/footer + keyboard */
      .contact-input:focus,
      .auth-input:focus,
      .country-modal-search:focus {
        scroll-margin-top: 80px;
        scroll-margin-bottom: 120px;
      }

      /* Unpin sticky chrome while soft keyboard is open */
      body.keyboard-open .step-header,
      body.keyboard-open .step-buttons {
        position: static;
      }

      body.keyboard-open .step-card,
      body.keyboard-open #authSection .step-card {
        padding-bottom: max(120px, var(--keyboard-inset, 0px));
      }
      
      /* Progress dots */
      .progress-dots {
        top: 16px;
        padding: 8px 14px;
        gap: 8px;
      }
      
      /* Color picker popup */
      .color-picker-popup {
        max-width: calc(100vw - 32px);
        left: 16px;
        right: 16px;
        margin: 0;
      }
      
      /* Preview card */
      .preview-card {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
      }
      
      /* Country modal */
      .country-modal {
        height: calc(100dvh - env(safe-area-inset-top, 0px));
        max-height: calc(100dvh - env(safe-area-inset-top, 0px));
      }
      
      .country-modal-list {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
      }
    }
    /* Extra small mobile */
    @media (max-width: 390px) {
      .step-card {
        padding: 20px 16px 16px;
      }
      
      .step-buttons {
        padding: 16px;
        padding-left: calc(16px + env(safe-area-inset-left, 0px));
        padding-right: calc(16px + env(safe-area-inset-right, 0px));
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        gap: 10px;
      }
      
      .progress-dots {
        padding: 6px 10px;
        gap: 6px;
      }
      
      .progress-dot {
        width: 8px;
        height: 8px;
      }
      
      .progress-dot.active {
        width: 24px;
      }
    }
    /* Small buttons on very small screens */
    @media (max-width: 374px) {
      .step-buttons {
        flex-direction: column;
        gap: 12px;
      }
      
      .step-btn-back,
      .step-btn-primary {
        width: 100%;
      }
      
      .step-btn-back {
        order: 2;
      }
      
      .step-btn-primary {
        order: 1;
      }
    }
    /* Tablet adjustments */
    @media (min-width: 768px) and (max-width: 1024px) {
      .progress-dots {
        top: 24px;
        padding: 10px 18px;
      }
    }
    /* Desktop adjustments */
    @media (min-width: 1025px) {
      .progress-dots {
        top: 32px;
        padding: 12px 20px;
      }
      
      /* Hover states */
      .contact-input:hover,
      .field-input:hover,
      input:hover {
        border-color: #C8CCD4;
      }
      
      .step-btn-primary:hover {
        background: #0052CC;
        transform: translateY(-2px);
      }
      
      .step-btn-back:hover {
        background: #E8EBF0;
        transform: translateX(-2px);
      }
    }

    /* Onboarding wrappers (step 5 & 7) — base matches previous inline flex layout */
    .onboarding-step5-inner {
      display: flex;
      flex-direction: column;
      gap: 32px;
      padding-bottom: 16px;
    }
    .onboarding-step5-desktop {
      display: flex;
      flex-direction: column;
      gap: 32px;
    }
    .onboarding-step7-inner {
      display: flex;
      flex-direction: column;
      gap: 32px;
      padding-bottom: 16px;
    }
    .onboarding-step7-desktop {
      display: flex;
      flex-direction: column;
      gap: 32px;
    }
    .onboarding-step7-card-label {
      text-align: center;
    }
    .onboarding-step7-success-preview {
      text-align: left;
    }
    .onboarding-step7-preview-wrap {
      padding: 8px;
    }
    .onboarding-step5-preview-pad {
      padding: 8px;
    }
    #step-5 .step-card {
      display: flex;
      flex-direction: column;
    }
    #step-5 .onboarding-step5-inner {
      gap: 20px;
      padding-bottom: 0;
    }
    #step-5 .onboarding-step5-desktop {
      gap: 20px;
    }
    #step-5 .onboarding-step5-desktop-controls {
      display: grid;
      gap: 14px;
    }
    #step-5 .step-content-header {
      margin-bottom: 12px;
    }
    #step-5 .step-title-large {
      margin-bottom: 6px;
    }
    #step-5 .step-subtitle {
      line-height: 1.45;
    }
    #step-5 .logo-dropzone {
      padding: 20px 16px;
      gap: 8px;
    }
    #step-5 .step-buttons {
      margin-top: 16px;
    }
    #step-5 .step-buttons .step-btn-primary,
    #step-5 .step-buttons .desktop-inline-back {
      min-height: 48px;
      height: 48px;
    }
    @media (max-width: 430px) {
      #step-5 .step-card {
        padding: 20px 16px 16px;
      }
      #step-5 .step-content-header {
        margin-bottom: 10px;
      }
      #step-5 .step-title-large {
        font-size: 22px;
        line-height: 1.15;
      }
      #step-5 .step-subtitle {
        font-size: 13px;
        line-height: 1.4;
      }
      #step-5 .onboarding-step5-inner,
      #step-5 .onboarding-step5-desktop,
      #step-5 .onboarding-step5-desktop-controls {
        gap: 12px;
      }
      #step-5 .logo-dropzone {
        padding: 16px 14px;
        min-height: 120px;
      }
    }
    @media (max-width: 767px) {
      #step-5 .onboarding-step5-inner,
      #step-5 .onboarding-step5-desktop {
        gap: 14px;
      }
      #step-5 .onboarding-step5-desktop-controls {
        gap: 10px;
      }
    }
    /* Step 4: Logo upload */
    #step-4 .step-card-inner {
      display: grid;
      gap: 16px;
    }
    #step-4 .step4-logo-hint {
      margin: 0;
      line-height: 1.5;
    }
    #step-4 .logo-dropzone {
      padding: 28px 20px;
      gap: 10px;
      min-height: 140px;
    }
    #step-4 .step-buttons {
      margin-top: 8px;
    }
    @media (max-width: 430px) {
      #step-4 .step-card {
        padding-bottom: 16px;
      }
      #step-4 .logo-dropzone {
        padding: 20px 14px;
        min-height: 120px;
      }
    }
