/* FTUE (First Time User Experience) Scoped Styles */
/* All styles are scoped under .ftue-page to prevent global CSS bleed */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.ftue-page {
    --ftue-accent-green: #00FA8E;
    --ftue-primary-black: #000000;
    min-height: 100vh;
    height: 100vh;
    background: #FCFCFD;
    /* neutral light background */
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
    /* Ensure FTUE starts at top of viewport, ignoring any body padding */
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: 0;
    left: 0;
    width: 100%;
}

/* Hide global nav and footer on FTUE pages only */
.ftue-page #homenav,
.ftue-page footer {
    display: none !important;
}

/* Remove any top offsets used for fixed nav on FTUE pages only */
.ftue-page {
    padding-top: 0 !important;
}

/* Back Button */
.ftue-page .back-button {
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 342px;
    width: calc(100% - 48px);
    z-index: 1000;
    pointer-events: none;
    text-align: left;
}

.ftue-page .back-button .btn {
    pointer-events: all;
}

.ftue-page .back-button .btn,
.ftue-page .back-button .btn-link {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: #000000 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    /* Add left padding to keep X away from edge */
    margin: 0 !important;
    font-size: 1.45rem !important;
    line-height: 28px !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    pointer-events: all;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline-block !important;
    text-decoration: none !important;
    vertical-align: baseline !important;
}

.ftue-page .back-button .btn:hover,
.ftue-page .back-button .btn-link:hover {
    background: transparent !important;
    background-color: transparent !important;
    opacity: 0.7;
    transform: none !important;
    text-decoration: none !important;
    border: none !important;
}

.ftue-page .signup-header-skip {
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 342px;
    width: calc(100% - 48px);
    z-index: 1000;
    pointer-events: none;
    text-align: right;
}

.ftue-page .signup-header-skip .btn,
.ftue-page .signup-header-skip .btn-link {
    pointer-events: all;
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    line-height: 28px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.ftue-page .signup-header-skip .btn:hover,
.ftue-page .signup-header-skip .btn-link:hover {
    background: transparent !important;
    opacity: 0.7;
    transform: none !important;
    text-decoration: none !important;
}

/* Progress Bar */
.ftue-page .progress-container {
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: transparent;
    padding: 0 0 0 48px;
    max-width: 342px;
    width: calc(100% - 48px);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    /* Ensure progress bar doesn't overlap content */
    pointer-events: none;
    height: 28px;
}

.ftue-page .progress {
    height: 12px;
    background-color: #E1E4E8;
    border-radius: 999px;
    overflow: hidden;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 10px;
}

.ftue-page .progress-bar {
    background: var(--ftue-primary-black);
    transition: width 0.5s ease;
}

.ftue-page .progress-text {
    font-size: 12px;
    color: #000000;
    text-align: right;
    margin-top: 0;
    font-weight: 500;
    white-space: nowrap;
    line-height: 28px;
    flex: 0 0 44px;
}

/* Step Container */
.ftue-page .step-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    margin: 0;
    /* Ensure container starts at top, ignoring body padding */
    position: relative;
    top: 0;
    width: 100%;
}

.ftue-page .step {
    width: 100%;
    max-width: 390px;
    min-height: 100vh;
    height: 100vh;
    flex-direction: column;
    /* Hide all steps by default except welcome */
    display: none;
}

.ftue-page .step.ftue-overlay-underlay {
    position: relative;
    z-index: 1;
}

/* Make welcome step visible immediately to prevent layout shift */
/* Use initial display: flex, but allow JS to override with display: none */
.ftue-page #step-welcome {
    display: flex;
}

/* Step Content */
.ftue-page .step-content {
    background: transparent !important;
    padding: 0 24px !important;
    text-align: center;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    /* Account for fixed button at bottom - use margin instead of padding to preserve centering */
    margin-bottom: 220px;
    /* Allow scrolling when content exceeds available space */
    overflow-y: auto;
    overflow-x: hidden;
    /* Ensure content area respects button space but can shrink */
    min-height: 0;
    max-height: calc(100vh - 220px);
}

/* Wrapper for content to enable vertical centering */
.ftue-page .step-content>* {
    flex-shrink: 0;
}

/* Add top padding to content that needs to avoid progress bar (not welcome step) */
.ftue-page .step:not(#step-welcome) .step-content {
    justify-content: flex-start;
    padding-top: 100px !important;
}

/* Welcome content block - copy first, media between copy and CTA. */
.ftue-page .welcome-content-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 390px;
    padding-top: 96px;
}

/* Welcome page specific background */
.ftue-page #step-welcome {
    background: #ffffff;
    max-width: 100%;
    width: 100%;
}

.ftue-page #step-welcome .step-content {
    max-width: 390px;
    margin: 0 auto;
    justify-content: flex-start;
    margin-bottom: 0;
    max-height: none;
    overflow: visible;
    padding-bottom: 180px !important;
}

/* All other steps keep default background */
.ftue-page .step:not(#step-welcome) {
    background: #FCFCFD;
}

/* Welcome image styling */
.ftue-page .welcome-image {
    max-width: 296px;
    width: 100%;
    height: auto;
    margin: 82px auto 0;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.ftue-page #step-welcome lottie-player.welcome-image {
    transform: scale(1.25);
    transform-origin: center center;
}

.ftue-page #step-welcome .step-title {
    color: #000000;
    margin-bottom: 8px;
}

.ftue-page .step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.ftue-page .step-subtitle {
    font-size: 1.0rem;
    color: #000000;
    margin-bottom: 2rem;
    line-height: 1.5;
    flex-shrink: 0;
}

/* Welcome page specific subtitle styling */
.ftue-page #step-welcome .step-subtitle {
    color: #000000;
    margin-bottom: 0;
}

/* Options Container */
.ftue-page .options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
    text-align: left;
    flex-shrink: 0;
    width: 100%;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.ftue-page .option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border: 2px solid rgba(221, 223, 229, 0.5);
    border-radius: 56px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    z-index: 10;
}

.ftue-page .option-item:hover {
    border-color: rgba(221, 223, 229, 1);
    background: rgba(0, 250, 142, 0.18);
}

.ftue-page .option-item.selected {
    border-color: var(--ftue-accent-green);
    background: var(--ftue-accent-green);
}

.ftue-page .option-item.selected:hover {
    border-color: var(--ftue-accent-green);
    background: var(--ftue-accent-green);
}

.ftue-page .option-item input[type="radio"] {
    display: none;
}

.ftue-page .option-item input[type="checkbox"] {
    width: 26px;
    height: 26px;
    margin-left: 16px;
    appearance: none;
    -webkit-appearance: none;
    background: url('/static/svgs/check_circle_unchecked.svg') center / 26px 26px no-repeat;
    border: 0;
    flex: 0 0 auto;
}

.ftue-page .option-item input[type="checkbox"]:checked {
    background-image: url('/static/svgs/check_circle_checked.svg');
    background-size: 16px 16px;
}

.ftue-page .option-item label {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #2d3748;
    flex: 1;
    margin: 0;
    text-align: center;
}

/* Subjects Container */
.ftue-page .subjects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 2rem;
    flex-shrink: 0;
    width: 100%;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    /* Prevent unwanted scrollbar */
    overflow: visible;
}

.ftue-page .subject-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border: 2px solid rgba(221, 223, 229, 0.5);
    border-radius: 56px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    z-index: 10;
}

.ftue-page .subject-item:hover {
    border-color: rgba(221, 223, 229, 1);
    background: white;
}

.ftue-page .subject-item.selected {
    border-color: var(--ftue-accent-green);
    background: var(--ftue-accent-green);
}

.ftue-page .subject-item.selected:hover {
    border-color: var(--ftue-accent-green);
    background: var(--ftue-accent-green);
}

.ftue-page .subject-item input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    cursor: pointer;
    align-self: center;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: url('/static/svgs/check_circle_unchecked.svg') center / 26px 26px no-repeat;
    position: relative;
}

.ftue-page .subject-item input[type="checkbox"]:checked {
    background-image: url('/static/svgs/check_circle_checked.svg');
    background-size: 16px 16px;
}

.ftue-page .subject-item label {
    display: none;
}

.ftue-page .subject-content {
    flex: 1;
    text-align: center;
    margin-right: 12px;
    margin-left: 28px;
}

.ftue-page .subject-name {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.ftue-page .subject-description {
    font-size: 0.85rem;
    font-weight: 400;
    color: #000000;
    line-height: 1.3;
}

/* Error Messages */
.ftue-page .error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

/* Step Actions */
.ftue-page .step-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: fixed;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 342px;
    z-index: 50;
    pointer-events: none;
    /* Prevent button from jumping - ensure it's positioned immediately */
    will-change: transform;
}

.ftue-page .step-actions>* {
    pointer-events: auto;
}

.ftue-page .step-actions .btn {
    width: 100% !important;
}

.ftue-page .btn {
    padding: 0 32px !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    border-radius: 56px !important;
    border: none !important;
    transition: all 0.3s ease !important;
    min-width: 0 !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: normal !important;
}

.ftue-page .btn-primary {
    background: var(--ftue-primary-black) !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: var(--ftue-primary-black) !important;
}

.ftue-page .btn-primary:hover {
    opacity: 0.9 !important;
    background: var(--ftue-primary-black) !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: var(--ftue-primary-black) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Welcome page specific button styling */
.ftue-page #step-welcome .btn-primary {
    background: var(--ftue-primary-black) !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: var(--ftue-primary-black) !important;
}

.ftue-page #step-welcome .btn-primary:hover {
    background: var(--ftue-primary-black) !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: var(--ftue-primary-black) !important;
}

.ftue-page .btn-lg {
    height: 60px !important;
    font-size: 1rem !important;
}

.ftue-page .skip-link {
    color: #718096;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.ftue-page .skip-link:hover {
    color: #667eea;
}

.ftue-page .login-link {
    margin-top: 1rem;
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 390px;
    text-align: center;
    z-index: 50;
    pointer-events: none;
}

.ftue-page .login-link>* {
    pointer-events: auto;
}

.ftue-page .login-link a {
    color: #718096;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.ftue-page .login-link a:hover {
    color: #4a5568;
    text-decoration: underline;
}

/* Info Box */
.ftue-page .info-box {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 2rem 0;
    font-size: 0.9rem;
    color: #4a5568;
}

/* Progress Items */
.ftue-page .progress-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 2rem 0;
}

.ftue-page .progress-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.ftue-page .progress-item.completed {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
}

.ftue-page .progress-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ftue-page .progress-spinner.completed {
    animation: none;
    border: 3px solid #38a169;
    background: #38a169;
    position: relative;
}

.ftue-page .progress-spinner.completed::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Selected Subjects List */
.ftue-page .selected-subjects {
    text-align: left;
    margin: 2rem 0;
}

.ftue-page .selected-subjects ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ftue-page .selected-subjects li {
    padding: 12px 20px;
    background: #f0f4ff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

/* Toast Notifications */
.ftue-page .toast-container {
    z-index: 9999;
}

.ftue-page .toast {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.ftue-page .toast .toast-header {
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ftue-page .step {
        max-width: 100%;
        width: 100%;
    }

    .ftue-page .step-content {
        padding: 0 24px 100px 24px !important;
        /* Mobile: button at bottom: 20px, button height: 60px, plus gap = ~100px */
    }

    .ftue-page .step-title {
        font-size: 1.75rem;
    }

    .ftue-page .step-subtitle {
        font-size: 0.95rem;
    }

    .ftue-page .subjects-container {
        grid-template-columns: 1fr;
    }

    .ftue-page .progress-container {
        padding: 0 0 0 48px;
    }
}

@media (max-width: 480px) {
    .ftue-page .step-container {
        min-height: 100dvh;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    .ftue-page .step {
        min-height: 100dvh;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    .ftue-page .step-content {
        padding: 0 24px !important;
        margin-bottom: 0;
        max-height: none;
        overflow: visible;
    }

    /* Welcome step has button at 80px, so needs more bottom margin */
    .ftue-page[data-step="1"] .step-content {
        margin-bottom: 0;
        max-height: none;
        overflow: visible;
        padding-bottom: 160px !important;
    }

    /* Other steps need top padding for progress bar */
    .ftue-page .step:not(#step-welcome) .step-content {
        justify-content: flex-start;
        padding-top: 100px !important;
    }

    .ftue-page .step-title {
        font-size: 1.75rem;
    }

    .ftue-page .step-actions {
        bottom: 20px;
        max-width: none;
        width: calc(100% - 48px);
    }

    .ftue-page .back-button,
    .ftue-page .progress-container {
        max-width: none;
        width: calc(100% - 48px);
    }

    /* Page 1 (welcome step) keeps higher position on mobile */
    .ftue-page[data-step="1"] .step-actions {
        bottom: 80px;
    }

    .ftue-page .login-link {
        bottom: 35px;
    }

    .ftue-page .btn {
        height: 60px;
        font-size: 1rem;
        min-width: 180px;
    }

    .ftue-page #step-social_proof .step-content {
        height: 100dvh;
        max-height: none;
        margin-bottom: 0;
        overflow: visible;
        justify-content: center;
        padding: 96px 24px 90px !important;
    }

    .ftue-page #step-social_proof .ftue-social-media {
        margin-top: 0;
    }
}

@media (max-width: 480px) and (max-height: 900px) {
    .ftue-page #step-welcome .welcome-content-block {
        padding-top: clamp(48px, 8dvh, 64px);
    }

    .ftue-page #step-welcome .welcome-image {
        max-width: 237px;
        max-height: 38dvh;
        margin-top: clamp(56px, 8dvh, 72px);
        object-fit: contain;
    }

    .ftue-page #step-skills_to_improve .step-content,
    .ftue-page #step-subjects .step-content,
    .ftue-page #step-education .step-content,
    .ftue-page #step-duration .step-content,
    .ftue-page #step-age .step-content,
    .ftue-page #step-summary .step-content {
        box-sizing: border-box;
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr);
        align-items: start;
        height: 100dvh;
        max-height: 100dvh;
        margin-bottom: 0;
        overflow: visible;
        padding: 82px 24px 20px !important;
    }

    .ftue-page #step-skills_to_improve .ftue-step-media,
    .ftue-page #step-subjects .ftue-step-media,
    .ftue-page #step-education .ftue-step-media,
    .ftue-page #step-summary .ftue-summary-media {
        display: none;
    }

    .ftue-page #step-duration .ftue-step-media,
    .ftue-page #step-age .ftue-step-media {
        display: block;
        margin-bottom: 12px;
    }

    .ftue-page #step-skills_to_improve .step-title,
    .ftue-page #step-subjects .step-title,
    .ftue-page #step-education .step-title,
    .ftue-page #step-duration .step-title,
    .ftue-page #step-age .step-title,
    .ftue-page #step-summary .step-title {
        font-size: clamp(1.55rem, 7vw, 1.9rem);
        line-height: 1.08;
        margin-bottom: 0.65rem;
    }

    .ftue-page #step-skills_to_improve .step-subtitle,
    .ftue-page #step-subjects .step-subtitle,
    .ftue-page #step-education .step-subtitle,
    .ftue-page #step-duration .step-subtitle,
    .ftue-page #step-age .step-subtitle,
    .ftue-page #step-summary .step-subtitle {
        font-size: 0.92rem;
        line-height: 1.35;
        margin-bottom: 1rem;
    }

    .ftue-page #step-skills_to_improve .options-container,
    .ftue-page #step-education .options-container,
    .ftue-page #step-summary .ftue-summary-scroll {
        min-height: 0;
        height: calc(100dvh - 82px - 104px - 9.5rem);
        max-height: calc(100dvh - 82px - 104px - 9.5rem);
        overflow-y: auto;
        overflow-x: hidden;
        margin-bottom: 0;
        padding-top: 2px;
        padding-bottom: 96px;
        width: 100%;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .ftue-page #step-duration .options-container,
    .ftue-page #step-age .options-container {
        min-height: 0;
        max-height: calc(100dvh - 82px - 104px - 9.5rem);
        overflow-y: auto;
        overflow-x: hidden;
        margin-bottom: 0;
        padding-top: 2px;
        padding-bottom: 18px;
        width: 100%;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .ftue-page #step-subjects .subjects-container {
        min-height: 0;
        max-height: calc(100dvh - 82px - 104px - 9.5rem);
        overflow-y: auto;
        overflow-x: hidden;
        margin-bottom: 0;
        padding-top: 2px;
        padding-bottom: 18px;
        width: 100%;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .ftue-page #step-skills_to_improve .options-container,
    .ftue-page #step-education .options-container,
    .ftue-page #step-duration .options-container,
    .ftue-page #step-age .options-container,
    .ftue-page #step-summary .ftue-summary-scroll {
        gap: 10px;
    }

    .ftue-page #step-subjects .subjects-container {
        gap: 12px;
    }

    .ftue-page #step-summary .step-actions {
        background: #FCFCFD;
        border-radius: 0;
        box-shadow: 0 -12px 16px 0 #FCFCFD;
        padding: 12px 24px calc(20px + env(safe-area-inset-bottom, 0px));
        width: 100%;
        left: 0;
        transform: none;
        bottom: 0;
    }

    .ftue-page #step-skills_to_improve .option-item,
    .ftue-page #step-education .option-item {
        min-height: 72px;
        padding: 12px 18px;
    }

    .ftue-page #step-duration .option-item,
    .ftue-page #step-age .option-item {
        min-height: 60px;
        height: 60px;
        padding: 0 18px;
    }

    .ftue-page #step-subjects .subject-item {
        min-height: 78px;
        padding: 12px 20px;
    }

    .ftue-page #step-social_proof .step-content {
        max-height: none;
        margin-bottom: 0;
        overflow: visible;
        justify-content: center;
        padding: 88px 24px 78px !important;
    }

    .ftue-page #step-social_proof .ftue-social-media {
        width: 92px;
        height: 94px;
        margin-top: 0;
        margin-bottom: -42px;
    }

    .ftue-page #step-social_proof .ftue-speech-bubble {
        max-width: 342px;
        padding: 52px 28px 46px;
        margin-top: 14px;
    }

    .ftue-page #step-social_proof .ftue-speech-bubble .step-title {
        font-size: 0.92rem;
        margin-bottom: 10px;
    }

    .ftue-page #step-social_proof .ftue-speech-bubble .step-subtitle {
        font-size: 1.08rem;
        line-height: 1.2;
    }

    .ftue-page #step-difficulty_response .step-content {
        max-height: none;
        margin-bottom: 0;
        overflow: visible;
    }
}

@media (max-width: 480px) and (max-height: 740px) {
    .ftue-page #step-skills_to_improve .step-content,
    .ftue-page #step-subjects .step-content,
    .ftue-page #step-education .step-content,
    .ftue-page #step-duration .step-content,
    .ftue-page #step-age .step-content,
    .ftue-page #step-summary .step-content {
        padding-top: 72px !important;
        padding-bottom: 20px !important;
    }

    .ftue-page #step-summary .step-content {
        padding-top: 42px !important;
    }

    .ftue-page #step-skills_to_improve .options-container,
    .ftue-page #step-education .options-container,
    .ftue-page #step-summary .ftue-summary-scroll {
        height: calc(100dvh - 72px - 94px - 9rem);
        max-height: calc(100dvh - 72px - 94px - 9rem);
    }

    .ftue-page #step-summary .ftue-summary-scroll {
        height: calc(100dvh - 42px - 94px - 9rem);
        max-height: calc(100dvh - 42px - 94px - 9rem);
    }

    .ftue-page #step-duration .options-container,
    .ftue-page #step-age .options-container {
        max-height: calc(100dvh - 72px - 94px - 9rem);
    }

    .ftue-page #step-subjects .subjects-container {
        max-height: calc(100dvh - 72px - 94px - 9rem);
    }

    .ftue-page #step-social_proof .step-content {
        padding-top: 74px !important;
        padding-bottom: 66px !important;
    }

    .ftue-page #step-social_proof .ftue-speech-bubble {
        padding: 46px 24px 40px;
    }

    .ftue-page #step-difficulty_response .step-content {
        max-height: none;
        margin-bottom: 0;
        overflow: visible;
    }

    .ftue-page #step-skills_to_improve .step-title,
    .ftue-page #step-subjects .step-title,
    .ftue-page #step-education .step-title,
    .ftue-page #step-duration .step-title,
    .ftue-page #step-age .step-title,
    .ftue-page #step-summary .step-title {
        font-size: clamp(1.45rem, 6.6vw, 1.75rem);
    }

    .ftue-page #step-duration .option-item,
    .ftue-page #step-age .option-item {
        min-height: 56px;
        height: 56px;
    }
}

/* FTUE V2 media and proof surfaces */
.ftue-page .ftue-step-media {
    display: block;
    object-fit: contain;
    margin: 0 auto 18px;
}

.ftue-page .ftue-step-media-sm {
    width: 60px;
    height: 60px;
}

.ftue-page .ftue-social-media {
    width: 112px;
    height: 115px;
    margin-bottom: -50px;
    position: relative;
    z-index: 1;
}

.ftue-page .ftue-response-media {
    width: 148px;
    height: 188px;
    align-self: flex-end;
    margin-right: 30px;
    margin-top: 0;
}

.ftue-page .ftue-speech-bubble {
    background: var(--ftue-accent-green);
    border-radius: 110px;
    padding: 34px 28px;
    max-width: 360px;
    position: relative;
    border: 5px solid #ffffff;
    z-index: 2;
}

.ftue-page .ftue-speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -34px;
    right: 76px;
    width: 0;
    height: 0;
    background: transparent;
    border-style: solid;
    border-width: 42px 12px 0 12px;
    border-color: var(--ftue-accent-green) transparent transparent transparent;
    transform: rotate(-7deg);
    transform-origin: top center;
}

.ftue-page .ftue-speech-bubble .step-title,
.ftue-page .ftue-speech-bubble .step-subtitle {
    color: #000000;
}

.ftue-page .ftue-markdown p {
    margin: 0;
}

.ftue-page .ftue-proof-byline {
    color: #72757A;
    font-size: 0.9rem;
    margin-top: 44px;
}

.ftue-page #step-social_proof .step-content {
    position: relative;
    justify-content: center;
    padding-top: 0 !important;
    overflow: visible;
}

.ftue-page #step-social_proof .ftue-social-media {
    position: absolute;
    top: calc(50% - 224px);
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
}

.ftue-page #step-social_proof .ftue-speech-bubble {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 342px;
    padding: 66px 32px 58px;
    margin-top: 0;
}

.ftue-page #step-social_proof .ftue-speech-bubble .step-title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 12px;
}

.ftue-page #step-social_proof .ftue-speech-bubble .step-subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0;
}

.ftue-page #step-social_proof .ftue-proof-byline {
    position: absolute;
    top: calc(50% + 164px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

@media (max-width: 480px) {
    .ftue-page #step-social_proof .step-content {
        height: 100dvh;
        max-height: none;
        margin-bottom: 0;
        overflow: visible;
        justify-content: center;
        padding: 0 24px !important;
    }

    .ftue-page #step-social_proof .ftue-social-media {
        top: calc(50% - 206px);
        margin-top: 0;
    }
}

@media (max-width: 480px) and (max-height: 900px) {
    .ftue-page #step-social_proof .step-content {
        padding: 0 24px !important;
    }

    .ftue-page #step-social_proof .ftue-social-media {
        width: 92px;
        height: 94px;
        top: calc(50% - 196px);
        margin-top: 0;
        margin-bottom: -42px;
    }

    .ftue-page #step-social_proof .ftue-speech-bubble {
        max-width: 342px;
        min-height: 242px;
        padding: 60px 28px 56px;
        margin-top: 0;
    }

    .ftue-page #step-social_proof .ftue-speech-bubble .step-title {
        font-size: 0.92rem;
        margin-bottom: 10px;
    }

    .ftue-page #step-social_proof .ftue-speech-bubble .step-subtitle {
        font-size: 1.08rem;
        line-height: 1.2;
    }

    .ftue-page #step-social_proof .ftue-proof-byline {
        top: calc(50% + 166px);
    }
}

@media (max-width: 480px) and (max-height: 740px) {
    .ftue-page #step-social_proof .step-content {
        padding: 0 24px !important;
    }

    .ftue-page #step-social_proof .ftue-speech-bubble {
        min-height: 230px;
        padding: 54px 24px 50px;
    }

    .ftue-page #step-social_proof .ftue-proof-byline {
        top: calc(50% + 158px);
    }
}

@media (max-width: 480px) {
    .ftue-page #step-difficulty .step-content,
    .ftue-page #step-social_proof .step-content,
    .ftue-page #step-difficulty_response .step-content,
    .ftue-page #step-user_engagement_request .step-content,
    .ftue-page #step-daily_plan_building .step-content,
    .ftue-page #step-daily_play_building .step-content {
        max-height: none;
        margin-bottom: 0;
        overflow: visible;
    }

    .ftue-page #step-difficulty .step-content {
        padding-bottom: 104px !important;
    }
}

.ftue-page #step-difficulty .step-content {
    padding-top: 130px !important;
}

.ftue-page #step-difficulty_response .step-content {
    position: relative;
    justify-content: flex-start;
    padding-top: 0 !important;
    overflow: visible;
}

.ftue-page #step-difficulty_response .ftue-response-bubble {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 342px;
    min-height: 220px;
    padding: 56px 34px 64px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ftue-page #step-difficulty_response .ftue-response-bubble::after {
    bottom: -29px;
    right: 118px;
    border-width: 30px 10px 0 10px;
    transform: rotate(0deg);
}

.ftue-page #step-difficulty_response .ftue-response-bubble .step-title {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.ftue-page #step-difficulty_response .ftue-response-bubble .step-subtitle {
    font-size: 1.08rem;
    line-height: 1.45;
    margin-bottom: 0;
}

.ftue-page #step-difficulty_response .ftue-response-media {
    position: absolute;
    top: calc(50% + 122px);
    right: 38px;
    z-index: 1;
}

@media (max-width: 480px) and (max-height: 740px) {
    .ftue-page #step-difficulty_response .ftue-response-media {
        width: 124px;
        height: 158px;
        top: calc(50% + 108px);
        right: 48px;
    }
}

.ftue-page .ftue-engagement-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 320px;
}

.ftue-page .ftue-engagement-actions .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #DADDE5 !important;
    color: #000000 !important;
}

.ftue-page #step-user_engagement_request {
    position: fixed;
    inset: 0;
    max-width: none;
    flex: none;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
}

.ftue-page #step-user_engagement_request .step-content {
    flex: 0 1 auto;
    width: 100%;
    max-width: 300px;
    max-height: none;
    margin: 0;
    padding: 22px 20px 14px !important;
    overflow: visible;
    background: #ffffff !important;
    border-radius: 24px !important;
    text-align: left;
    align-items: stretch;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22) !important;
}

.ftue-page #step-user_engagement_request .ftue-step-media {
    display: none;
}

.ftue-page #step-user_engagement_request .step-title {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 12px;
    color: #000000;
    font-weight: 700;
    text-align: left;
}

.ftue-page #step-user_engagement_request .step-subtitle {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 18px;
    color: #000000;
    text-align: left;
}

.ftue-page #step-user_engagement_request .ftue-engagement-actions {
    max-width: none;
    width: 100%;
    flex-direction: row-reverse;
    gap: 16px;
}

.ftue-page #step-user_engagement_request .ftue-engagement-actions .btn {
    height: 48px !important;
    min-width: 0 !important;
    width: 50% !important;
    padding: 0 16px !important;
    font-size: 1rem !important;
}

.ftue-page #step-user_engagement_request .ftue-engagement-actions .btn-secondary {
    background: #E9EAEC !important;
    border-color: #E9EAEC !important;
}

.ftue-page #step-daily_plan_building,
.ftue-page #step-daily_play_building {
    position: fixed;
    inset: 0;
    max-width: none;
    flex: none;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    z-index: 1900;
}

.ftue-page .ftue-building-backdrop {
    width: 100%;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ftue-page .ftue-building-card {
    width: 100%;
    max-width: 354px;
    background: #ffffff;
    border-radius: 32px;
    padding: 30px 24px 32px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.ftue-page .ftue-building-proof,
.ftue-page .ftue-summary-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--ftue-accent-green);
    border-radius: 56px;
    padding: 12px 16px;
    margin: 28px auto 0;
    max-width: 340px;
    color: #000000;
    font-weight: 600;
}

.ftue-page .ftue-summary-proof p {
    margin: 0;
}

.ftue-page .ftue-summary-proof {
    margin: 0 auto 24px;
}

@media (min-height: 901px) {
    .ftue-page #step-summary .step-content {
        justify-content: flex-start;
        padding-top: 88px !important;
        padding-bottom: 180px !important;
        margin-bottom: 0;
        max-height: none;
        overflow-y: auto;
    }
}

.ftue-page .ftue-summary-scroll {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ftue-page .ftue-summary-media {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto 28px;
}

.ftue-page #step-summary .step-title {
    font-size: 1.75rem;
    line-height: 1.18;
    color: #2d3748;
    margin-bottom: 8px;
    max-width: 342px;
}

.ftue-page #step-summary .step-subtitle {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 34px;
    max-width: 342px;
}

.ftue-page .ftue-summary-label {
    font-size: 1rem;
    line-height: 1.35;
    color: #000000;
    margin-bottom: 0;
}

.ftue-page #step-summary .selected-subjects {
    width: 100%;
    max-width: 342px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
    margin-bottom: 36px;
}

.ftue-page .ftue-summary-subject {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 34px;
    padding: 8px 42px;
    border: none;
    border-radius: 56px;
    background: #F3F1F1;
    color: #000000;
    font-weight: 700;
}

.ftue-page .ftue-summary-subject img {
    position: absolute;
    right: 28px;
    width: 16px;
    height: 16px;
}

.ftue-page .ftue-summary-duration {
    color: #000000;
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 342px;
}

.ftue-page .ftue-summary-duration strong {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 42px;
    border-radius: 56px;
    background: #F3F1F1;
    color: #000000;
    font-weight: 700;
    width: 100%;
    box-sizing: border-box;
}

.ftue-page #step-summary .ftue-summary-proof {
    width: 100%;
    max-width: 342px;
    border-radius: 18px;
    padding: 13px 16px;
    margin: 0 auto 28px;
    justify-content: flex-start;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.25;
}

.ftue-page #step-summary .ftue-summary-proof img {
    flex: 0 0 auto;
}

@media (min-height: 901px) {
    .ftue-page #step-summary .step-actions {
        bottom: 32px;
    }
}

.ftue-page .ftue-building-graphic {
    position: relative;
    width: 122px;
    height: 122px;
    margin: 0 auto 24px;
}

.ftue-page .ftue-building-rotation {
    display: block;
    width: 122px;
    height: 122px;
    animation: ftueRotate 1.8s linear infinite;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.ftue-page .ftue-building-ring {
    border: 10px solid #EDF0F5;
    border-top-color: var(--ftue-accent-green);
    border-radius: 50%;
}

.ftue-page .ftue-building-center {
    position: absolute;
    width: 60px;
    height: 60px;
    object-fit: contain;
    top: 31px;
    left: 31px;
    z-index: 2;
}

.ftue-page .ftue-building-card .step-title {
    font-size: 1.75rem;
    line-height: 1.18;
    margin: 0 0 18px;
    color: #2d3748;
}

.ftue-page .ftue-building-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #000000;
    font-size: 1rem;
    line-height: 1.35;
}

.ftue-page .ftue-building-status img {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

@keyframes ftueRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ftue-page #step-welcome .welcome-content-block > :not(.welcome-image),
.ftue-page #step-welcome .step-actions,
.ftue-page #step-welcome .login-link {
    opacity: 0;
    animation: ftueWelcomeReveal 0.35s ease 1.3s forwards;
}

.ftue-page #step-welcome .welcome-image {
    opacity: 0;
    animation: ftueWelcomeMedia 0.45s ease forwards;
}

@keyframes ftueWelcomeMedia {
    to { opacity: 1; }
}

@keyframes ftueWelcomeReveal {
    to { opacity: 1; }
}

/* =====================================================
   Daily Lessons Welcome Back Overlay Styles
   ===================================================== */

#daily-lessons-overlay.ftue-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#daily-lessons-overlay .ftue-overlay-card {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Welcome Back close control (Figma: 44×44 white circle, soft drop shadow) */
#daily-lessons-overlay .dl-overlay-close {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 0.75px solid rgba(255, 255, 255, 0.1);
    border-radius: 75px;
    background-color: #ffffff;
    box-shadow: 0 3px 30px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#daily-lessons-overlay .dl-overlay-close:hover {
    background-color: #ffffff;
    box-shadow: 0 3px 30px rgba(0, 0, 0, 0.2);
}

#daily-lessons-overlay .dl-overlay-close-icon {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, sans-serif;
    font-size: 27px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    color: #727272;
    text-align: center;
}

#daily-lessons-overlay .ftue-overlay-content {
    padding: 2rem;
    text-align: center;
}

#daily-lessons-overlay .ftue-overlay-title {
    font-size: 28px;
    font-weight: 700;
    color: #FF8A00;
    margin-bottom: 6px;
    line-height: 1.2;
}

#daily-lessons-overlay .ftue-overlay-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    font-weight: 400;
}

#daily-lessons-overlay .ftue-streak-circles {
    display: flex !important;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#daily-lessons-overlay .ftue-streak-circle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#daily-lessons-overlay .ftue-streak-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    color: #666;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
}

#daily-lessons-overlay .ftue-streak-day-label {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    line-height: 1;
}

#daily-lessons-overlay .ftue-streak-day-label.ftue-streak-today-label {
    color: #FF8A00;
}

#daily-lessons-overlay .ftue-streak-circle.ftue-streak-today {
    border-color: #FF8A00;
    background-color: #f8f9fa;
    color: #6c757d;
    box-shadow: none;
}

#daily-lessons-overlay .ftue-streak-circle.ftue-streak-completed {
    background-color: #28a745;
    border-color: #28a745;
    color: transparent;
    position: relative;
}

#daily-lessons-overlay .ftue-streak-circle.ftue-streak-completed::after {
    content: '✔\FE0E';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 900;
    color: white;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
}

/* Missed day: past day not played, not covered by rest day */
#daily-lessons-overlay .ftue-streak-circle.ftue-streak-missed {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    opacity: 0.7;
}

/* Dead-streak completed day: played but that streak broke */
#daily-lessons-overlay .ftue-streak-circle.ftue-streak-dead {
    background-color: #dc3545;
    border-color: #dc3545;
    color: transparent;
    opacity: 0.7;
    position: relative;
}

#daily-lessons-overlay .ftue-streak-circle.ftue-streak-dead::after {
    content: '✔\FE0E';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: 900;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1;
}

/* Rest day: snooze emoji rendered by JS, no border, sized to match circles */
#daily-lessons-overlay .ftue-streak-circle.ftue-streak-grace {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    overflow: visible;
}

/* Future day: darker gray disc, no border */
#daily-lessons-overlay .ftue-streak-circle.ftue-streak-future {
    background-color: #d5d8dc;
    border: none;
    color: transparent;
    opacity: 1;
}

/* Phase 6: Smaller title for completed streak */
.streak-title-completed {
    font-size: 1.6rem !important;
}

/* Phase 6: MP Bonus message styling and animation */
.mp-bonus-text {
    font-size: 1.5rem;
    font-weight: normal;
    color: #FF8A00;
    opacity: 0;
    transform: scale(0.5);
}

.mp-bonus-text.mp-bonus-animate {
    animation: mp-bonus-pop 1s ease-out forwards;
}

@keyframes mp-bonus-pop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }

    70% {
        transform: scale(0.95);
    }

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

/* dl-message element removed in Phase 1 5/19/26; body style kept for safety */
#daily-lessons-overlay .ftue-overlay-body {
    display: none;
}

#daily-lessons-overlay .ftue-overlay-buttons {
    display: flex !important;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#daily-lessons-overlay .ftue-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* =====================================================
   Today Page Styles
   ===================================================== */

/* Ensure Today page cards match All Cards styling */
.today-tile {
    cursor: pointer;
}

.today-tile:hover .today-card {
    transform: translateY(-2px);
}

/* Add more top padding for better spacing from navbar */
.container-marketing {
    padding-top: 1rem;
}

/* Override background image for Today page - use white background */
body.today {
    background: white !important;
}

/* Reduce navbar label spacing */
body.today .navbar-nav .nav-link span:last-child {
    margin-top: 0px !important;
}

/* Reduce vertical gap between rows to match horizontal gap */
.today-grid-container .col {
    margin-bottom: 0.25rem;
}

/* Mobile responsive: 2-across grid for Today page */
@media (max-width: 768px) {
    .today-grid-container .col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Loading overlay - centered on page */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    min-width: 140px;
}

#daily-lessons-overlay .ftue-btn-primary {
    background-color: #007bff;
    color: white;
}

#daily-lessons-overlay .ftue-btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

#daily-lessons-overlay .ftue-btn-secondary {
    background-color: #6c757d;
    color: white;
}

#daily-lessons-overlay .ftue-btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    #daily-lessons-overlay .ftue-overlay-content {
        padding: 1.5rem;
    }

    #daily-lessons-overlay .ftue-overlay-title {
        font-size: 24px;
        margin-bottom: 6px;
    }

    #daily-lessons-overlay .ftue-streak-circles {
        gap: 8px;
        margin-bottom: 1rem;
    }

    #daily-lessons-overlay .ftue-streak-circle {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }

    #daily-lessons-overlay .ftue-streak-day-label {
        font-size: 13px;
    }

    #daily-lessons-overlay .ftue-streak-circle.ftue-streak-completed::after {
        font-size: 16px;
    }

    #daily-lessons-overlay .ftue-overlay-buttons {
        flex-direction: column;
        align-items: center;
    }

    #daily-lessons-overlay .ftue-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* =====================================================
   FTUE Signup Step Scoped Overrides (Section 5c7)
   - Do NOT modify signup.html; style only when embedded in FTUE
   ===================================================== */

/* Hide the hard-coded signup heading when embedded in FTUE */
#step-signup .step-content #signupFormContainer h1:first-child,
#step-signup .step-content #signupFormContainer h2:first-child,
#step-signup .step-content #signupFormContainer .signup-title:first-child {
    display: none !important;
}

/* Also hide common H3 heading used by embedded signup */
#step-signup #signupFormContainer h3[align="center"],
#step-signup #signupFormContainer .row.pb-3 h3 {
    display: none !important;
}

/* Hide overlay-style titles/subtitles inside embedded overlay form */
#step-signup #signupFormContainer .levelup_title,
#step-signup #signupFormContainer .normtextlitesm.text-center {
    display: none !important;
}

/* Minimize vertical spacing above/below the signup fields */
#step-signup .step-content {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

#step-signup #signupFormContainer main {
    padding-top: 0 !important;
}

#step-signup #signupFormContainer .card,
#step-signup #signupFormContainer .panel,
#step-signup #signupFormContainer .container,
#step-signup #signupFormContainer .row:first-child {
    margin-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

/* Remove stray line breaks adding excess spacing */
#step-signup #signupFormContainer br {
    display: none !important;
}

/* Tighten common form-group spacings used in Bootstrap */
#step-signup #signupFormContainer .form-group,
#step-signup #signupFormContainer .mb-3,
#step-signup #signupFormContainer .mb-4 {
    margin-bottom: 0.5rem !important;
}

#step-signup #signupFormContainer .form-control {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

/* Add more spacing before buttons in signup */
#step-signup #signupFormContainer .text-center:has(.signup-button) {
    margin-top: 4rem !important;
}

/* Override FTUE button styles for signup buttons */
#step-signup #signupFormContainer .btn {
    margin-top: 0.5rem;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

#step-signup #signupFormContainer .signup-button,
#step-signup #signupFormContainer .signup-skip-button {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

@media (max-width: 480px) {
    .ftue-page #step-signup .step-content {
        box-sizing: border-box;
        height: 100dvh;
        max-height: 100dvh;
        margin-bottom: 0;
        overflow-y: auto;
        overflow-x: hidden;
        justify-content: flex-start;
        padding: 96px 24px 40px !important;
        -webkit-overflow-scrolling: touch;
    }

    .ftue-page #step-signup #signupFormContainer .text-center:has(.signup-button) {
        margin-top: 2rem !important;
    }
}

@media (max-width: 480px) and (max-height: 900px) {
    .ftue-page #step-summary .ftue-summary-media {
        display: none;
    }

    .ftue-page .step#step-summary .step-content {
        display: grid !important;
        grid-template-rows: auto auto minmax(0, 1fr);
        align-items: start;
        padding: 24px 24px 0 !important;
        overflow: hidden !important;
        overflow-y: hidden !important;
    }

    .ftue-page .step#step-summary .step-title {
        margin-top: 0;
    }

    .ftue-page .step#step-summary .step-subtitle {
        margin-bottom: 0.75rem;
    }

    .ftue-page #step-summary .ftue-summary-scroll {
        min-height: 0;
        height: calc(100dvh - 24px - 96px - 6rem);
        max-height: calc(100dvh - 24px - 96px - 6rem);
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 8px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}