/* Quiz Page Styles */

html, body {
    overscroll-behavior-y: none; /* prevent pull-to-refresh on mobile */
}

:root {
    --quiz-color-text-secondary: #6B6D70;
    --quiz-color-text-light: #8E8E93;
}

/* Layout */

.quiz-container {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

.quiz-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--sm-color-grey-01);
    margin-bottom: 0.75rem;
}

.quiz-container .quiz-page-title {
    font-size: 1.5rem; /* font-size: calc(1.275rem + .3vw); */
    font-weight: 600;
    color: var(--sm-color-grey-01);
    line-height: 1.3;
    /*letter-spacing: -0.025em;*/
    margin-bottom: 0.75rem;
    text-align: center;
}

.quiz-container .quiz-page-subtitle {
    font-size: 0.9rem;
    color: var(--quiz-color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
}

.quiz-container .card-page {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.quiz-container .btn {
    padding: 0.875rem 4rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.875rem;
}

.quiz-container .btn.btn-primary {
    box-shadow: 0 4px 16px rgba(119, 95, 240, 0.25);
    transition: all 0.2s ease;
}

.quiz-container .btn.btn-primary:disabled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.quiz-container .form-control {
    padding: 0.675rem 1.25rem;
    font-size: 1rem;
    border-radius: 0.875rem;
    background-color: #FFFFFF;
    border: 1px solid var(--bs-border-color);
    transition: all 0.2s ease;
}

.quiz-container .form-control:focus {
    background-color: #FFFFFF;
    border-color: var(--sm-color-purple);
    box-shadow: 0 0 0 .25rem rgba(124, 58, 237, 0.08);
}

/* Badge (Apple Watch indicator) */

.quiz-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(119, 95, 240, 0.08);
    border: 1px solid rgba(119, 95, 240, 0.18);
    color: #7C6CF0;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 9999px;
    margin: 0 auto 16px;
    text-align: center;
    width: fit-content;
}

/* Trust line (below timer) */

.quiz-trust-line {
    font-size: 12px;
    color: #AEAEB2;
    text-align: center;
    margin-bottom: 14px;
}

/* Pitch — Social proof */

.quiz-pitch-social-proof {
    text-align: center;
    font-size: 12px;
    color: #AEAEB2;
    font-weight: 500;
    margin-bottom: 14px;
}

.quiz-pitch-stars {
    color: #F59E0B;
    letter-spacing: 1px;
    font-size: 11px;
}

/* Pitch — Heading (tighter spacing to timer) */

.quiz-container .quiz-pitch-title {
    font-weight: 700;
}

/* Pitch — Timer (green) */

.quiz-pitch-time {
    text-align: center;
    font-size: 13px;
    color: #059669;
    font-weight: 600;
    margin-bottom: 18px;
}

/* Pitch — Benefits list */

.quiz-pitch-benefits {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.quiz-pitch-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(6px);
}

.quiz-pitch-benefit:last-child {
    border-bottom: none;
}

/* Animation triggers after collapse transition completes */
.quiz-pitch-animate .quiz-pitch-benefit {
    animation: quizBenefitIn 0.35s ease forwards;
}

.quiz-pitch-animate .quiz-pitch-benefit:nth-child(1) {
    animation-delay: 0.08s;
}

.quiz-pitch-animate .quiz-pitch-benefit:nth-child(2) {
    animation-delay: 0.2s;
}

.quiz-pitch-animate .quiz-pitch-benefit:nth-child(3) {
    animation-delay: 0.32s;
}

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

.quiz-pitch-benefit-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.quiz-pitch-benefit-text {
    font-size: 14px;
    color: #1C1C1E;
    line-height: 1.4;
}

/* Pitch — Actions */

.quiz-pitch-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
    margin-bottom: 16px;
}

.btn-pitch-start {
    font-weight: 600;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-pitch-no-device {
    display: block;
    text-align: center;
    color: var(--quiz-color-text-light);
    font-size: 13px;
    margin-top: 10px;
    padding: 10px 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 150ms;
}

@media (hover: hover) and (pointer: fine) {
    .btn-pitch-no-device:hover {
        color: var(--sm-color-grey-01);
    }
}

/* App icon */

.quiz-goal-icon-wrap {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
}

.quiz-goal-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(119, 95, 240, 0.25);
}

/* Time indicator (below goal cards) */

.quiz-goal-time {
    font-size: 12px;
    color: #AEAEB2;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.quiz-goal-time svg {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

.quiz-container .quiz-goal-title {
    font-weight: 700;
}

.quiz-goal-subtitle {
}

/* Progress + Back Navigation */

.quiz-nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

#quiz-user-name .quiz-nav-bar {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 0;
}

.quiz-nav-bar .quiz-progress {
    flex: 1;
    margin-bottom: 0;
}

.quiz-back-btn {
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 28px;
    background: none;
    border: none;
    color: var(--sm-color-grey-02);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    margin-left: -8px; /* align flush with card edge */
    transition: color 0.15s ease;
    line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
    .quiz-back-btn:hover {
        color: var(--sm-color-purple);
    }
}

.quiz-progress {
    height: 4px;
    background: var(--sm-color-outline-grey);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sm-color-purple), #A78BFA);
    box-shadow: 0 0 8px rgba(119, 95, 240, 0.35);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0;
}

.quiz-step-label {
    display: none;
}

/* Question */

.quiz-container .quiz-question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sm-color-grey-01);
    margin-bottom: 1.75rem;
    line-height: 1.3;
}

.quiz-question-subtitle {
    font-size: 0.875rem;
    color: var(--quiz-color-text-secondary);
    margin-top: -1rem;
    margin-bottom: 1.25rem;
}

/* ── Goal Setting Cards ────────────────────────────────────────────── */

.quiz-goal-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.quiz-goal-card {
    background: white;
    border: 2px solid var(--sm-color-outline-grey);
    border-radius: 1rem;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

@media (hover: hover) and (pointer: fine) {
    .quiz-goal-card:hover {
        border-color: var(--sm-color-purple);
        transform: scale(1.02);
        box-shadow: 0 4px 16px rgba(119, 95, 240, 0.12);
    }
}

.quiz-goal-card.selected {
    border-color: var(--sm-color-purple);
    background: var(--sm-color-background-purple);
}

.quiz-goal-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.quiz-goal-info {
    flex: 1;
}

.quiz-goal-item-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--sm-color-grey-01);
    margin-bottom: 0.25rem;
}

.quiz-goal-item-desc {
    font-size: 13px;
    font-weight: 400;
    color: var(--quiz-color-text-light);
    line-height: 1.4;
}

.quiz-goal-chevron {
    color: #C7C7CC;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: color 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .quiz-goal-card:hover .quiz-goal-chevron {
        color: var(--sm-color-purple);
        transform: translateX(2px);
    }
}

.quiz-goal-card.selected .quiz-goal-chevron {
    color: var(--sm-color-purple);
    transform: translateX(2px);
}

/* ── Option Cards ──────────────────────────────────────────────────── */

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.quiz-option {
    background: white;
    border: 2px solid var(--sm-color-outline-grey);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem 1.25rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    position: relative;
}

@media (hover: hover) and (pointer: fine) {
    .quiz-option:hover {
        border-color: var(--sm-color-purple);
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(119, 95, 240, 0.1);
    }
}

.quiz-option.selected {
    border-color: var(--sm-color-purple);
    background: var(--sm-color-background-purple);
}

/* Single select — chevron */
.quiz-option-chevron {
    color: #C7C7CC;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-left: auto;
    transition: color 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .quiz-option:hover .quiz-option-chevron {
        color: var(--sm-color-purple);
        transform: translateX(2px);
    }
}

.quiz-option.selected .quiz-option-chevron {
    color: var(--sm-color-purple);
    transform: translateX(2px);
}

/* Multi select — checkbox indicator */
.quiz-option-multi::before {
    content: '';
    width: 22px;
    height: 22px;
    border: 2px solid var(--sm-color-outline-grey);
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-option-multi.selected::before {
    background: var(--sm-color-purple);
    border-color: var(--sm-color-purple);
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    line-height: 18px;
}

.quiz-option-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.quiz-option-text {
    font-size: 1rem;
    color: var(--sm-color-grey-01);
    font-weight: 500;
    line-height: 1.4;
}

/* ── Education Page (Screen 6) ─────────────────────────────────── */

.quiz-education-progress {
    margin-bottom: 1.5rem;
}

.quiz-education-body {
    padding: 0;
}

.quiz-container .quiz-education-title {
}

/* Cycle diagram — glowing ring nodes with SVG arrows */
.quiz-cycle {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 260px;
    margin: 3.5rem auto 4rem;
}

.quiz-cycle-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Node — column layout: ring on top, label below */
.quiz-cycle-node {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 2;
    opacity: 0;
}

.quiz-cycle-node--top {
    top: 5%;
    left: 50%;
}

.quiz-cycle-node--right {
    top: 50%;
    left: 95%;
}

.quiz-cycle-node--bottom {
    top: 95%;
    left: 50%;
}

.quiz-cycle-node--left {
    top: 50%;
    left: 5%;
}

/* Glowing ring with gradient border */
.quiz-cycle-ring {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    position: relative;
    background: #fff;
    flex-shrink: 0;
}

.quiz-cycle-ring::before {
    content: '';
    position: absolute;
    inset: -2.5px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, var(--ring-from), var(--ring-to));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.quiz-cycle-ring::after {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ring-from), var(--ring-to));
    opacity: 0.12;
    filter: blur(8px);
    z-index: -1;
}

/* Ring colors — bright palette per position */
.quiz-cycle-node--top {
    --ring-from: #FF6B6B;
    --ring-to: #F06595;
}

.quiz-cycle-node--right {
    --ring-from: #FFA94D;
    --ring-to: #FFD43B;
}

.quiz-cycle-node--bottom {
    --ring-from: #748FFC;
    --ring-to: #91A7FF;
}

.quiz-cycle-node--left {
    --ring-from: #69DB7C;
    --ring-to: #51CF66;
}

.quiz-cycle-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sm-color-grey-02, #48484A);
    text-align: center;
    max-width: 85px;
}

/* SVG arrow overlay */
.quiz-cycle-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.quiz-cycle-arrow {
    fill: none;
    stroke: rgba(119, 95, 240, 0.3);
    stroke-width: 2;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.quiz-cycle-arrowhead {
    fill: rgba(119, 95, 240, 0.5);
}

/* Entrance animations */
.quiz-education-animate .quiz-cycle-node {
    animation: quiz-cycle-node-in 0.4s ease-out forwards;
}

.quiz-education-animate .quiz-cycle-node--top {
    animation-delay: 0.1s;
}

.quiz-education-animate .quiz-cycle-node--right {
    animation-delay: 0.3s;
}

.quiz-education-animate .quiz-cycle-node--bottom {
    animation-delay: 0.5s;
}

.quiz-education-animate .quiz-cycle-node--left {
    animation-delay: 0.7s;
}

@keyframes quiz-cycle-node-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.quiz-education-animate .quiz-cycle-arrow {
    animation: quiz-cycle-arrow-draw 0.6s ease-out forwards;
}

.quiz-education-animate .quiz-cycle-arrow:nth-child(1) {
    animation-delay: 0.2s;
}

.quiz-education-animate .quiz-cycle-arrow:nth-child(3) {
    animation-delay: 0.4s;
}

.quiz-education-animate .quiz-cycle-arrow:nth-child(5) {
    animation-delay: 0.6s;
}

.quiz-education-animate .quiz-cycle-arrow:nth-child(7) {
    animation-delay: 0.8s;
}

@keyframes quiz-cycle-arrow-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Fact card  */
.quiz-education-fact {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--sm-color-background-purple, #F7F5FE);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 1rem;
    border: 1px solid rgba(119, 95, 240, 0.1);
    opacity: 0;
}

.quiz-education-fact-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sm-color-purple), #9B85F5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(119, 95, 240, 0.25);
}

.quiz-education-fact-text {
    font-size: 0.84rem;
    font-weight: 500;
    color: #4F4768;
    line-height: 1.5;
}

.quiz-education-fact-text b {
    font-weight: 600;
    color: var(--sm-color-purple);
}

.quiz-education-animate .quiz-education-fact {
    animation: quiz-education-fade-in 0.5s ease-out 1s forwards;
}

/* Bridge card */
.quiz-education-bridge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F3FAF6;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(34, 197, 94, 0.14);
    opacity: 0;
}

.quiz-education-bridge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3BBE76, #22A861);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.quiz-education-bridge-text {
    font-size: 0.84rem;
    font-weight: 500;
    color: #315B43;
    line-height: 1.5;
}

.quiz-education-animate .quiz-education-bridge {
    animation: quiz-education-fade-in 0.5s ease-out 1.15s forwards;
}

@keyframes quiz-education-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* ── Feature Showcase (Screen 9) ─────────────────────────────── */

.quiz-feature-progress {
    margin-bottom: 1.5rem;
}

.quiz-container .quiz-feature-title {
}

.quiz-feature-subtitle {
}

.quiz-feature-mockup {
    max-width: 280px;
    margin: 0 auto 1.5rem;
}

.quiz-feature-mockup img {
    width: 100%;
    height: auto;
    aspect-ratio: 560 / 905; /* reserve space before lazy-load — prevents layout jump */
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(12px);
}

.quiz-feature-animate .quiz-feature-mockup img {
    animation: quiz-feature-reveal 0.6s ease-out 0.2s forwards;
}

@keyframes quiz-feature-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .quiz-cycle {
        max-width: 320px;
    }
}


/* ── Email Step ───────────────────────────────────────────────────── */

.quiz-container .quiz-email-title,
.quiz-container .quiz-email-confirm-title {
}

.quiz-email-title .user-name {
    color: var(--sm-color-purple);
}

.quiz-email-subtitle {
}

.quiz-step-icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 12px;
}

.quiz-email-trust-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--quiz-color-text-secondary);
    margin-top: 0.5rem;
}

/* ── Email Confirm ────────────────────────────────────────────────── */

.quiz-email-confirm-display {
    background: #F7F7F9;
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    color: var(--sm-color-purple);
    margin-bottom: 1.5rem;
    width: 100%;
    text-align: center;
    word-break: break-all;
}

.btn-edit-email {
    color: var(--quiz-color-text-secondary);
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    padding: 0.3rem 0 !important;
}

/* ── Ready: Your plan is almost ready ─────────────────────────────── */

#quiz-ready {
    max-width: 550px;
}

@keyframes quiz-ready-badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.15);
        opacity: 1;
    }

    80% {
        transform: scale(0.95);
    }

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



.quiz-ready-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0B8A57;
    background: #D7F2E4;
    border: 1px solid #B4E4CB;
    margin-bottom: 1.25rem;
    animation: quiz-ready-badge-pop 0.5s ease-out 0.3s both;
}

.quiz-ready-badge i {
    font-size: 0.7rem;
}

.quiz-container .quiz-ready-title {
}

.quiz-ready-title .user-name {
    color: var(--sm-color-purple);
}

.quiz-ready-subtitle {
}

.quiz-ready-bullets {
    text-align: left;
    margin: 0 auto 1.5rem;
    max-width: 380px;
}

.quiz-ready-bullet {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(6px);
}

.quiz-ready-animate .quiz-ready-bullet {
    animation: quiz-ready-bullet-fitIn 0.35s ease forwards;
}

@keyframes quiz-ready-bullet-fitIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-ready-animate .quiz-ready-bullet:nth-child(1) {
    animation-delay: 0.08s;
}

.quiz-ready-animate .quiz-ready-bullet:nth-child(2) {
    animation-delay: 0.2s;
}

.quiz-ready-animate .quiz-ready-bullet:nth-child(3) {
    animation-delay: 0.32s;
}

.quiz-ready-animate .quiz-ready-bullet:nth-child(4) {
    animation-delay: 0.44s;
}

.quiz-ready-bullet-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.quiz-ready-bullet-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.4;
}

.quiz-ready-bullet-title {
    color: var(--sm-color-grey-01);
    font-weight: 500;
    font-size: 16px;
}

.quiz-ready-bullet-desc {
    color: var(--quiz-color-text-light);
    font-size: 13px;
}

.quiz-ready-footer {
    font-size: 0.8rem;
    color: var(--quiz-color-text-secondary);
    margin-bottom: 1.5rem;
    padding: 0 30px;

    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    text-align: left;
}

.quiz-ready-footer i {
    color: #0B8A57;
    font-size: 0.8rem;
    opacity: 0.8;
}

.quiz-ready-auth {
    max-width: 400px;
    margin: 0 auto;
}

.quiz-ready-privacy {
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--quiz-color-text-secondary);
    opacity: 0.7;
    text-align: center;
}

.quiz-ready-privacy i {
    font-size: 0.65rem;
    margin-right: 2px;
}

/* ── Calculating Animation ─────────────────────────────────────────── */

.quiz-calculating-content {
    text-align: center;
    padding: 1rem 0 1rem;
}

.quiz-calculating-icon {
    font-size: 64px;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Progress bar */

.quiz-calculating-progress {
    max-width: 300px;
    margin: 1.5rem auto 0;
}

.quiz-calculating-progress-bar {
    width: 100%;
    height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    overflow: hidden;
}

.quiz-calculating-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--sm-color-purple);
    border-radius: 2px;
    transition: width 1.8s ease;
}

.quiz-calculating-stage-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--quiz-color-text-secondary);
    margin-top: 1rem;
    min-height: 2.8em;
    line-height: 1.4;
    transition: opacity 0.3s;
}

.quiz-loading-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
}

.quiz-loading-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sm-color-purple);
    animation: quizBounce 1.4s infinite ease-in-out;
}

.quiz-loading-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.quiz-loading-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes quizBounce {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

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

/* Dynamic zone — shared container for tag badges (phases 1-2) and mini-testimonial (phase 3) */

.quiz-calculating-dynamic {
    margin-top: 1.25rem;
    min-height: 3rem;
    transition: opacity 0.25s ease;
}

.quiz-calculating-dynamic--exit {
    opacity: 0;
    pointer-events: none;
}

/* Tag badges — individual colors from TagRegistry */

.quiz-calculating-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.quiz-calculating-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 20px;
    opacity: 0;
    transform: translateY(8px);
}

.quiz-calculating-tag i {
    font-size: 0.72rem;
}

.quiz-calculating-tag.animate {
    animation: quiz-tag-in 0.4s ease-out forwards;
}

@keyframes quiz-tag-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mini-testimonial — compact, no stars, italic */

.quiz-calculating-mini-review {
    background: #F7F7F9;
    border: 1px solid rgba(72, 72, 74, 0.08);
    border-radius: 0.875rem;
    padding: 1rem 1.125rem;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
}

.quiz-calculating-mini-review.animate {
    animation: quiz-tag-in 0.4s ease-out forwards;
}

.quiz-calculating-mini-review__text {
    font-size: 0.84rem;
    font-style: italic;
    color: var(--quiz-color-text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.quiz-calculating-mini-review__author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--quiz-color-text-light);
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .quiz-container .quiz-question-text {
        font-size: 1.25rem;
    }

    .quiz-option {
        padding: 1rem 1.25rem;
        gap: 0.8rem;
    }

    .quiz-option.selected:not(.quiz-option-multi)::after {
        right: 1rem;
    }

    .quiz-option.quiz-option-multi::before {
        width: 18px;
        height: 18px;
        font-size: 12px;
    }

    .quiz-option-icon {
        font-size: 1.5rem;
    }

    .quiz-option-text {
        font-size: 0.9rem;
    }

    .quiz-goal-card {
        padding: 1rem 1.25rem;
        gap: 0.8rem;
    }

    .quiz-goal-icon {
        font-size: 2rem;
    }

    .quiz-goal-item-title {
        font-size: 1.05rem;
    }
}

/* Terms */

.quiz-terms {
    font-size: 11.5px;
    color: #AEAEB2;
    line-height: 1.6;
    text-align: center;
}

.quiz-terms .link {
    color: var(--sm-color-purple);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* =========================================
   Shared Utils
   ========================================= */

.quiz-goal-icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7c3aed, #6c5ce7);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.35), 0 0 0 4px rgba(124, 58, 237, 0.08);
    animation: quiz-badge-pop 0.5s ease-out 0.2s both;
    position: relative;
}

/* Subtle shimmer sweep across badge */
.quiz-goal-icon-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
    animation: quiz-badge-shimmer 2.5s ease-in-out 0.8s;
}

@keyframes quiz-badge-shimmer {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }
}

.quiz-goal-icon-badge i {
    font-size: 1.35rem;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

@keyframes quiz-badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.12);
        opacity: 1;
    }

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

/* Trust footer — subtle App Store seal (shared across screens) */

.quiz-trust-footer {
    text-align: center;
    margin-bottom: 1.5rem;
}

.quiz-trust-footer-rating {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--quiz-color-text-secondary);
    letter-spacing: 0.02em;
}

.quiz-trust-footer-label {
    font-size: 0.75rem;
    color: var(--quiz-color-text-light);
    margin-top: 0.15rem;
}

/* ── Testimonial Page (Screen 4) ─────────────────────────────────── */

/* Card + footer start hidden, animate on show */
#quiz-testimonial .quiz-testimonial-card,
#quiz-testimonial .quiz-trust-footer {
    opacity: 0;
    transform: translateY(12px);
}

#quiz-testimonial.quiz-testimonial-animate .quiz-testimonial-card {
    animation: quiz-testimonial-reveal 0.5s cubic-bezier(0.22, 1.25, 0.36, 1) 0.1s forwards;
}

#quiz-testimonial.quiz-testimonial-animate .quiz-trust-footer {
    animation: quiz-testimonial-reveal 0.3s ease-out 0.4s forwards;
}

@keyframes quiz-testimonial-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Testimonial card layout — used by the in-quiz testimonial screen */

.quiz-testimonial-card {
    background: #F7F7F9;
    border: 1px solid rgba(72, 72, 74, 0.08);
    border-radius: 0.875rem;
    padding: 1rem 1.125rem;
    margin-bottom: 0.625rem;
}

.quiz-testimonial-card__stars {
    color: #F59E0B;
    font-size: 13px;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.quiz-testimonial-card__text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--quiz-color-text-secondary);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.quiz-testimonial-card__author {
    font-size: 0.8rem;
    font-weight: 600;
    color: #9CA3AF;
}

/* Next button sticky wrapper */

.quiz-btn-next-sentinel {
    height: 1px;
    pointer-events: none;
}

.quiz-btn-next-wrapper {
    position: sticky;
    bottom: 0;
    z-index: 10;
    pointer-events: none;

    margin: -12px -1rem -12px -1rem;
    padding: 12px 1rem calc(12px + env(safe-area-inset-bottom));

    background: transparent;
    transition:
            background-color 180ms ease,
            backdrop-filter 180ms ease,
            opacity 200ms ease 150ms,
            transform 200ms ease 150ms;
    opacity: 1;
}

.quiz-container.collapsing .quiz-btn-next-wrapper {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease;
}

.quiz-btn-next-wrapper .btn:not([disabled]):not(.disabled),
.quiz-btn-next-wrapper .btn-next:not([disabled]):not(.disabled) {
    pointer-events: auto;
}

/* Default — works correctly everywhere except real iOS Safari */
.quiz-btn-next-wrapper.is-stuck {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* iOS Safari: skip backdrop-filter entirely */
.is-safari-ios .quiz-btn-next-wrapper.is-stuck {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.is-safari-ios .quiz-btn-next-wrapper.is-stuck .btn-next {
    box-shadow:
            0 0 0 4px rgba(255, 255, 255, 0.55),
            0 0 0 10px rgba(255, 255, 255, 0.25);
}

.quiz-btn-next-wrapper .btn-next {
    opacity: 1;
}

.quiz-btn-next-wrapper.is-stuck .btn-next {
    opacity: 0.9;
}

