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

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
      color: #0f172a;
    }

    /* Landing / loader only — must not own layout after B2B/B2C chat mounts. */
    body:not(.qika-fullscreen-page) {
      height: 100vh;
      height: -webkit-fill-available;
      overflow: hidden;
      background: #f8fafc;
      padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    body:not(.qika-fullscreen-page) #qika-fullscreen-container {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      background: #f8fafc;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      overflow: hidden;
    }

    /* Loading State Styles */
    .loading {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      flex-direction: column;
      gap: 16px;
      color: #64748b;
    }

    .loading-spinner {
      width: 40px;
      height: 40px;
      border: 4px solid #e2e8f0;
      border-top-color: #4B5FFF;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

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

    /* Landing Page Styles */
    .landing-wrapper {
      display: none; /* Controlled by JS */
      width: 100%;
      height: 100%;
      position: relative;
      flex-direction: row;
    }

    .split-left {
      flex: 0 0 70%;
      background-image: url('https://cdn.qika.io/website/video_wf/images/sample.jpg');
      background-size: contain;
      background-position: center;
      background-repeat: no-repeat;
      background-origin: content-box;
      padding: 48px;
      background-color: #f8fafc;
      position: relative;
    }

    .split-right {
      flex: 0 0 30%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: radial-gradient(circle at 50% 40%, #f1f5f9 0%, #f8fafc 70%, #ffffff 100%);
    }

    /* Hidden by default on desktop */
    .mobile-story-hero,
    .mobile-sheet-backdrop,
    .mobile-sheet-bar,
    .mobile-peek-trigger {
      display: none !important;
    }

    /* ── Mobile & Small Screens: Concept 1 Story-First Canvas with Bottom Sheet Auth ── */
    @media (max-width: 900px) {
      .landing-wrapper {
        flex-direction: column;
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
      }

      /* Story Canvas: occupies full height with clean light theme gradient */
      .split-left {
        flex: 1 1 auto;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
        background: radial-gradient(circle at 50% 0%, #ede9fe 0%, #f1f5f9 45%, #f8fafc 100%);
        background-color: #f8fafc;
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        z-index: 1;
        overflow: hidden;
      }

      .split-left::before {
        content: '';
        position: absolute;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 320px;
        height: 320px;
        background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(99, 102, 241, 0.06) 50%, transparent 70%);
        filter: blur(40px);
        pointer-events: none;
        z-index: 0;
      }

      /* Story Hero Content (Mobile only) */
      .mobile-story-hero {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 100%;
        height: 100%;
        padding: max(16px, env(safe-area-inset-top)) 18px 110px; /* bottom padding reserves clearance for bottom peek bar */
        box-sizing: border-box;
        position: relative;
        z-index: 1;
      }

      .mobile-story-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
      }

      .mobile-brand-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #ffffff;
        padding: 6px 14px 6px 10px;
        border-radius: 24px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
      }

      .mobile-brand-badge img {
        width: 22px;
        height: 22px;
        object-fit: contain;
      }

      .mobile-brand-badge span {
        font-family: 'Outfit', sans-serif;
        font-size: 13.5px;
        font-weight: 800;
        color: #0f172a;
        letter-spacing: -0.2px;
      }

      /* Center Story Showcase: Real-Life Studio Cards */
      .mobile-story-showcase {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 440px;
        margin: 0 auto;
        padding: 6px 0;
      }

      .mobile-preview-card {
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 16px;
        padding: 14px 16px;
        display: flex;
        align-items: flex-start;
        gap: 12px;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
      }

      .preview-card-icon-wrap {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 1px;
      }

      .icon-purple {
        background: #f5f3ff;
        border: 1px solid #ddd6fe;
        color: #7c3aed;
      }

      .icon-indigo {
        background: #eef2ff;
        border: 1px solid #c7d2fe;
        color: #4f46e5;
      }

      .preview-card-body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        text-align: left;
      }

      .preview-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: wrap;
      }

      .preview-card-title {
        font-family: 'Outfit', sans-serif;
        font-size: 14.5px;
        font-weight: 700;
        color: #0f172a;
        letter-spacing: -0.2px;
      }

      .preview-card-chip {
        font-size: 10px;
        font-weight: 700;
        padding: 3px 8px;
        border-radius: 10px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
      }

      .chip-purple {
        background: #f5f3ff;
        color: #6d28d9;
        border: 1px solid #ddd6fe;
      }

      .chip-indigo {
        background: #eef2ff;
        color: #4338ca;
        border: 1px solid #c7d2fe;
      }

      .preview-card-desc {
        font-size: 12.5px;
        color: #475569;
        line-height: 1.45;
        margin: 0;
      }

      .mobile-story-footer {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        text-align: left;
      }

      .mobile-story-headline {
        font-family: 'Outfit', sans-serif;
        font-size: 21px;
        font-weight: 800;
        color: #0f172a;
        line-height: 1.25;
        margin: 0;
        letter-spacing: -0.3px;
      }

      .mobile-story-tagline {
        font-size: 13px;
        color: #64748b;
        line-height: 1.45;
        margin: 0;
      }

      /* Mobile Sheet Backdrop */
      .mobile-sheet-backdrop {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 90;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
      }

      .mobile-sheet-backdrop.active {
        opacity: 1;
        pointer-events: auto;
      }

      /* Mobile Bottom Sheet Auth Container */
      .split-right {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        width: 100%;
        flex: none;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.22);
        padding: 0;
        max-height: 94px; /* Peek height */
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
      }

      /* Mobile Sheet Top Drag Bar */
      .mobile-sheet-bar {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 10px 16px 2px;
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
      }

      .mobile-drag-handle {
        width: 40px;
        height: 5px;
        border-radius: 3px;
        background: #cbd5e1;
        margin: 0 auto;
        transition: background 0.2s ease;
      }

      .mobile-sheet-close-btn {
        display: none;
        position: absolute;
        right: 16px;
        top: 8px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        border: none;
        background: #f1f5f9;
        color: #64748b;
        font-size: 15px;
        font-weight: 700;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.15s ease;
      }

      .mobile-sheet-close-btn:hover {
        background: #e2e8f0;
        color: #0f172a;
      }

      /* Collapsed Peek Trigger */
      .mobile-peek-trigger {
        display: block !important;
        padding: 6px 18px max(14px, env(safe-area-inset-bottom));
        cursor: pointer;
        width: 100%;
        box-sizing: border-box;
      }

      .mobile-peek-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
      }

      .mobile-peek-text {
        display: flex;
        flex-direction: column;
        gap: 2px;
        text-align: left;
      }

      .mobile-peek-title {
        font-family: 'Outfit', sans-serif;
        font-size: 14.5px;
        font-weight: 800;
        color: #0f172a;
        line-height: 1.2;
      }

      .mobile-peek-sub {
        font-size: 11.5px;
        color: #64748b;
        line-height: 1.2;
      }

      .mobile-peek-btn {
        background: linear-gradient(135deg, #4B5FFF 0%, #6366F1 100%);
        color: #ffffff;
        border: none;
        border-radius: 12px;
        padding: 9px 16px;
        font-size: 13px;
        font-weight: 700;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        box-shadow: 0 4px 14px rgba(75, 95, 255, 0.35);
        flex-shrink: 0;
      }

      /* In peek mode: hide inner cards */
      .split-right:not(.expanded) .landing-card {
        display: none !important;
      }

      /* ── Expanded State ── */
      .split-right.expanded {
        max-height: 86vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
      }

      .split-right.expanded .mobile-peek-trigger {
        display: none !important;
      }

      .split-right.expanded .mobile-sheet-bar {
        justify-content: space-between;
        padding: 10px 16px 8px;
      }

      .split-right.expanded .mobile-sheet-close-btn {
        display: flex;
      }

      .split-right.expanded .landing-card {
        display: block;
        width: 100%;
        max-width: 440px;
        margin: 0 auto;
        padding: 8px 12px 24px;
        box-shadow: none;
        border: none;
        background: transparent;
      }

      .split-right.expanded .landing-card.activation-state,
      .split-right.expanded .landing-card.otp-state {
        display: none; /* Managed by togglePanel JS */
      }

      .split-right.expanded .logo-container {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
        border-radius: 14px;
      }

      .split-right.expanded .logo-container img {
        width: 28px;
        height: 28px;
      }

      .split-right.expanded h1 {
        font-size: 22px;
        margin-bottom: 8px;
      }

      .split-right.expanded .subtitle {
        font-size: 13px;
        line-height: 1.45;
        margin-bottom: 18px;
      }

      .split-right.expanded .b2b-link-container {
        margin-top: 20px;
        padding-top: 16px;
      }
    }

    .landing-card {
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(15, 23, 42, 0.08);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-radius: 24px;
      padding: 40px;
      max-width: 480px;
      width: 100%;
      text-align: center;
      box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
      transform: translateY(0);
      transition: transform 0.3s ease, border-color 0.3s ease;
    }

    .landing-card:hover {
      border-color: rgba(75, 95, 255, 0.28);
    }

    .logo-container {
      margin-bottom: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, rgba(75, 95, 255, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
      width: 64px;
      height: 64px;
      border-radius: 18px;
      border: 1px solid rgba(75, 95, 255, 0.2);
    }

    .logo-container img {
      width: 36px;
      height: 36px;
    }

    .tagline {
      font-family: 'Outfit', sans-serif;
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 2px;
      background: linear-gradient(90deg, #4B5FFF, #8B5CF6);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 12px;
    }

    h1 {
      font-family: 'Outfit', sans-serif;
      font-size: 32px;
      font-weight: 800;
      letter-spacing: -0.5px;
      color: #0f172a;
      margin-bottom: 16px;
      line-height: 1.2;
    }

    .subtitle {
      font-size: 15px;
      color: #64748b;
      line-height: 1.6;
      margin-bottom: 32px;
    }

    /* Form Fields */
    .form-group {
      position: relative;
      margin-bottom: 16px;
      text-align: left;
    }

    .input-field {
      width: 100%;
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.12);
      border-radius: 12px;
      padding: 14px 16px;
      color: #0f172a;
      font-size: 15px;
      font-family: 'Inter', sans-serif;
      transition: all 0.2s ease;
      outline: none;
    }

    .input-field:focus {
      border-color: #4B5FFF;
      background: #ffffff;
      box-shadow: 0 0 0 4px rgba(75, 95, 255, 0.12);
    }

    .input-field::placeholder {
      color: #94a3b8;
    }

    .error-message {
      color: #dc2626;
      font-size: 12px;
      margin-top: 6px;
      display: none;
      padding-left: 4px;
    }

    .btn-submit {
      width: 100%;
      background: linear-gradient(135deg, #4B5FFF 0%, #6366F1 100%);
      color: #ffffff;
      border: none;
      border-radius: 12px;
      padding: 14px 20px;
      font-size: 15px;
      font-weight: 600;
      font-family: 'Inter', sans-serif;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 4px 12px rgba(75, 95, 255, 0.25);
    }

    .btn-submit:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(75, 95, 255, 0.35);
    }

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

    /* Success Card State */
    .success-state {
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .success-icon {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.25);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 20px;
      color: #059669;
      font-size: 24px;
    }

    .success-title {
      font-family: 'Outfit', sans-serif;
      font-size: 24px;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 12px;
    }

    /* B2B Activation Flow */
    .b2b-link-container {
      margin-top: 32px;
      border-top: 1px solid rgba(15, 23, 42, 0.08);
      padding-top: 24px;
    }

    .b2b-link {
      font-size: 13px;
      color: #64748b;
      text-decoration: none;
      cursor: pointer;
      transition: color 0.2s ease;
      background: none;
      border: none;
      font-family: 'Inter', sans-serif;
    }

    .b2b-link:hover {
      color: #334155;
    }

    .b2b-link strong {
      color: #4B5FFF;
      font-weight: 600;
    }

    .b2b-link:hover strong {
      color: #4338ca;
    }

    .auth-tabs {
      display: flex;
      gap: 4px;
      background: #f1f5f9;
      border: 1px solid rgba(15, 23, 42, 0.06);
      border-radius: 12px;
      padding: 4px;
      margin: 0 0 14px;
    }

    .auth-tab {
      flex: 1;
      border: none;
      background: transparent;
      color: #64748b;
      padding: 10px 12px;
      border-radius: 10px;
      font-weight: 600;
      font-size: 14px;
      font-family: 'Inter', sans-serif;
      cursor: pointer;
    }

    .auth-tab.active {
      background: #ffffff;
      color: #0f172a;
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    }

    .channel-tabs {
      display: flex;
      gap: 2px;
      width: fit-content;
      max-width: 100%;
      background: #f1f5f9;
      border: 1px solid rgba(15, 23, 42, 0.06);
      border-radius: 9px;
      padding: 2px;
      margin: 0 0 14px;
    }

    .channel-tab {
      border: none;
      background: transparent;
      color: #94a3b8;
      padding: 6px 14px;
      border-radius: 7px;
      font-weight: 500;
      font-size: 12px;
      font-family: 'Inter', sans-serif;
      cursor: pointer;
      letter-spacing: 0.01em;
      transition: color 0.15s ease, background 0.15s ease;
    }

    .channel-tab:hover {
      color: #64748b;
    }

    .channel-tab.active {
      background: #ffffff;
      color: #334155;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    }

    .phone-field {
      display: flex;
      align-items: stretch;
      gap: 0;
      border: 1px solid rgba(15, 23, 42, 0.12);
      border-radius: 12px;
      background: #ffffff;
      overflow: hidden;
      transition: all 0.2s ease;
    }

    .phone-field:focus-within {
      border-color: #4B5FFF;
      background: #ffffff;
      box-shadow: 0 0 0 4px rgba(75, 95, 255, 0.12);
    }

    .country-code-wrap {
      position: relative;
      display: flex;
      align-items: stretch;
      flex-shrink: 0;
      border-right: 1px solid rgba(15, 23, 42, 0.08);
      background: #f8fafc;
    }

    .country-code-wrap::after {
      content: '';
      position: absolute;
      right: 10px;
      top: 50%;
      width: 6px;
      height: 6px;
      border-right: 1.5px solid #64748b;
      border-bottom: 1.5px solid #64748b;
      transform: translateY(-65%) rotate(45deg);
      pointer-events: none;
    }

    .country-code-select {
      appearance: none;
      -webkit-appearance: none;
      border: none;
      background: transparent;
      color: #334155;
      font-size: 13px;
      font-weight: 600;
      font-family: 'Inter', sans-serif;
      padding: 0 28px 0 12px;
      min-width: 96px;
      cursor: pointer;
      outline: none;
    }

    .country-code-select option {
      color: #111827;
      background: #ffffff;
    }

    .phone-input {
      border: none !important;
      background: transparent !important;
      box-shadow: none !important;
      border-radius: 0 !important;
      padding-left: 12px;
      flex: 1;
      min-width: 0;
    }

    .phone-input:focus {
      border: none !important;
      background: transparent !important;
      box-shadow: none !important;
    }

    .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;
    }

    #identifier-error {
      margin-bottom: 12px;
    }

    .auth-switch {
      margin-top: 14px;
      font-size: 13px;
      color: #64748b;
    }

    .auth-switch button {
      background: none;
      border: none;
      color: #4B5FFF;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      font-size: 13px;
      padding: 0;
    }

    .otp-resend {
      display: block;
      width: 100%;
      margin: 0 0 16px;
      padding: 0;
      border: none;
      background: none;
      color: #4B5FFF;
      font-size: 13px;
      font-weight: 600;
      font-family: 'Inter', sans-serif;
      cursor: pointer;
      text-align: center;
    }

    .otp-resend:disabled {
      color: #94a3b8;
      cursor: default;
      font-weight: 500;
    }

    .otp-state .btn-submit {
      width: 60%;
    }

    /* Activation Panel */
    .activation-state {
      display: none;
    }

    .btn-group {
      display: flex;
      gap: 12px;
    }

    .btn-secondary {
      background: #f1f5f9;
      color: #0f172a;
      border: 1px solid rgba(15, 23, 42, 0.1);
      border-radius: 12px;
      padding: 14px 20px;
      font-size: 15px;
      font-weight: 600;
      font-family: 'Inter', sans-serif;
      cursor: pointer;
      transition: all 0.2s ease;
      width: 40%;
    }

    .btn-secondary:hover {
      background: #e2e8f0;
    }

    .activation-state .btn-submit {
      width: 60%;
    }

    .otp-boxes {
      display: flex;
      gap: 8px;
      justify-content: center;
      margin: 8px 0 16px;
    }

    .otp-box {
      width: 44px;
      height: 48px;
      text-align: center;
      font-size: 20px;
      font-weight: 700;
      border-radius: 10px;
      border: 1px solid rgba(15, 23, 42, 0.12);
      background: #ffffff;
      color: #0f172a;
      outline: none;
    }

    .otp-box:focus {
      border-color: #4B5FFF;
      box-shadow: 0 0 0 4px rgba(75, 95, 255, 0.12);
    }

    .otp-state {
      display: none;
    }
