/* TypingTutor.Online — smart returning-user homepage v17.8.25 */
.smart-homepage {
    padding: 18px 0 20px;
}

.smart-homepage[hidden] {
    display: none !important;
}

.smart-homepage-inner {
    position: relative;
    box-sizing: border-box;
    width: min(
        var(--tto-workspace-max, 1500px),
        calc(100% - (2 * var(--tto-workspace-gutter, 24px)))
    );
    max-width: var(--tto-workspace-max, 1500px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.9fr);
    gap: clamp(20px, 3vw, 42px);
    align-items: center;
    padding: clamp(24px, 3vw, 38px);
    border: 1px solid #dbe6f7;
    border-radius: 26px;
    background:
        radial-gradient(circle at 94% 12%, rgba(23, 105, 255, 0.12), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 62%, #f1f6ff 100%);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.smart-homepage-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #1769ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.smart-homepage-copy h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 3.4vw, 3.35rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.smart-homepage-lead {
    max-width: 760px;
    margin: 14px 0 0;
    color: #475569;
    font-size: clamp(1rem, 1.25vw, 1.15rem);
    line-height: 1.65;
}

.smart-homepage-lesson-name {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 650;
}

.smart-homepage-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 11px;
    margin-top: 21px;
}

.smart-homepage-primary,
.smart-homepage-secondary {
    box-sizing: border-box;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border-radius: 14px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.smart-homepage-primary {
    border: 1px solid #1769ff;
    background: linear-gradient(135deg, #1769ff, #2d7dff);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(23, 105, 255, 0.2);
}

.smart-homepage-primary:hover,
.smart-homepage-primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(23, 105, 255, 0.26);
}

.smart-homepage-secondary {
    border: 1px solid #cbd9f0;
    background: rgba(255, 255, 255, 0.82);
    color: #1e3a5f;
}

.smart-homepage-secondary:hover,
.smart-homepage-secondary:focus-visible {
    border-color: #9dbdff;
    background: #ffffff;
}

.smart-homepage-primary:focus-visible,
.smart-homepage-secondary:focus-visible {
    outline: 3px solid rgba(23, 105, 255, 0.2);
    outline-offset: 2px;
}

.smart-homepage-summary {
    display: grid;
    gap: 10px;
}

.smart-homepage-summary[hidden],
.smart-homepage-new-summary[hidden],
.smart-homepage-lesson-name[hidden] {
    display: none !important;
}

.smart-homepage-metric {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 74px;
    padding: 13px 15px;
    border: 1px solid #dbe6f7;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.84);
}

.smart-homepage-metric-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #edf4ff;
    font-size: 1.15rem;
}

.smart-homepage-metric strong,
.smart-homepage-metric span {
    display: block;
}

.smart-homepage-metric strong {
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.35;
}

.smart-homepage-metric div > span {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.smart-homepage-goal-track {
    grid-column: 1 / -1;
    height: 7px;
    margin-top: -3px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf7;
}

.smart-homepage-goal-track span {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #1769ff;
    transition: width 0.28s ease;
}

.smart-homepage-new-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 5px 0;
}

.smart-homepage-new-summary > span {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 52px;
    padding: 10px 13px;
    border: 1px solid #dbe6f7;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.78);
    color: #334155;
    font-size: 0.94rem;
    font-weight: 650;
}

.smart-homepage-new-summary b {
    min-width: 28px;
    color: #1769ff;
    font-size: 1.05rem;
    text-align: center;
}

html[data-theme="dark"] .smart-homepage-inner {
    border-color: rgba(125, 167, 255, 0.3);
    background:
        radial-gradient(circle at 94% 12%, rgba(59, 130, 246, 0.18), transparent 32%),
        linear-gradient(135deg, #101827 0%, #0f172a 60%, #111e35 100%);
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.28);
}

html[data-theme="dark"] .smart-homepage-copy h1,
html[data-theme="dark"] .smart-homepage-metric strong {
    color: #f8fafc;
}

html[data-theme="dark"] .smart-homepage-lead,
html[data-theme="dark"] .smart-homepage-lesson-name,
html[data-theme="dark"] .smart-homepage-metric div > span {
    color: #cbd5e1;
}

html[data-theme="dark"] .smart-homepage-kicker,
html[data-theme="dark"] .smart-homepage-metric-icon {
    background: rgba(23, 105, 255, 0.18);
    color: #a9c7ff;
}

html[data-theme="dark"] .smart-homepage-metric,
html[data-theme="dark"] .smart-homepage-new-summary > span,
html[data-theme="dark"] .smart-homepage-secondary {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
}

html[data-theme="dark"] .smart-homepage-goal-track {
    background: rgba(148, 163, 184, 0.22);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .smart-homepage-inner {
        border-color: rgba(125, 167, 255, 0.3);
        background:
            radial-gradient(circle at 94% 12%, rgba(59, 130, 246, 0.18), transparent 32%),
            linear-gradient(135deg, #101827 0%, #0f172a 60%, #111e35 100%);
    }

    html[data-theme="system"] .smart-homepage-copy h1,
    html[data-theme="system"] .smart-homepage-metric strong {
        color: #f8fafc;
    }

    html[data-theme="system"] .smart-homepage-lead,
    html[data-theme="system"] .smart-homepage-lesson-name,
    html[data-theme="system"] .smart-homepage-metric div > span {
        color: #cbd5e1;
    }

    html[data-theme="system"] .smart-homepage-kicker,
    html[data-theme="system"] .smart-homepage-metric-icon {
        background: rgba(23, 105, 255, 0.18);
        color: #a9c7ff;
    }

    html[data-theme="system"] .smart-homepage-metric,
    html[data-theme="system"] .smart-homepage-new-summary > span,
    html[data-theme="system"] .smart-homepage-secondary {
        border-color: rgba(148, 163, 184, 0.24);
        background: rgba(15, 23, 42, 0.7);
        color: #e2e8f0;
    }
}

@media (max-width: 980px) {
    .smart-homepage-inner {
        grid-template-columns: 1fr;
    }

    .smart-homepage-summary,
    .smart-homepage-new-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .smart-homepage-metric,
    .smart-homepage-new-summary > span {
        min-height: 82px;
    }
}

@media (max-width: 760px) {
    .smart-homepage {
        padding-top: 12px;
    }

    .smart-homepage-inner {
        width: calc(100% - 24px);
        padding: 21px 17px;
        border-radius: 21px;
    }

    .smart-homepage-summary,
    .smart-homepage-new-summary {
        grid-template-columns: 1fr;
    }

    .smart-homepage-actions {
        align-items: stretch;
    }

    .smart-homepage-primary,
    .smart-homepage-secondary {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .smart-homepage-primary,
    .smart-homepage-secondary,
    .smart-homepage-goal-track span {
        transition: none !important;
    }
}

/* Certificate + milestone motivation */
.smart-homepage-certificate {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid #d7e3f6;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
}

.smart-homepage-certificate-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #fff7e6;
    font-size: 1.35rem;
}

.smart-homepage-certificate-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.smart-homepage-certificate-kicker {
    display: block;
    margin-bottom: 2px;
    color: #7c5a0a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.smart-homepage-certificate-copy strong {
    display: block;
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.35;
}

.smart-homepage-certificate-copy > span:not(.smart-homepage-certificate-kicker) {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.4;
}

.smart-homepage-certificate-track {
    height: 8px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf7;
}

.smart-homepage-certificate-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1769ff, #4f8cff);
    transition: width 0.28s ease;
}

.smart-homepage-certificate-action {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #c7d7f1;
    border-radius: 13px;
    background: #ffffff;
    color: #174ea6;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.smart-homepage-certificate-action:hover,
.smart-homepage-certificate-action:focus-visible {
    border-color: #8eb3f5;
    background: #f7faff;
}

.smart-homepage-certificate-action:focus-visible {
    outline: 3px solid rgba(23, 105, 255, 0.2);
    outline-offset: 2px;
}

html[data-theme="dark"] .smart-homepage-certificate {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.62);
}

html[data-theme="dark"] .smart-homepage-certificate-icon {
    background: rgba(245, 158, 11, 0.14);
}

html[data-theme="dark"] .smart-homepage-certificate-kicker {
    color: #f8cf72;
}

html[data-theme="dark"] .smart-homepage-certificate-copy strong {
    color: #f8fafc;
}

html[data-theme="dark"] .smart-homepage-certificate-copy > span:not(.smart-homepage-certificate-kicker) {
    color: #cbd5e1;
}

html[data-theme="dark"] .smart-homepage-certificate-track {
    background: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .smart-homepage-certificate-action {
    border-color: rgba(125, 167, 255, 0.34);
    background: rgba(23, 105, 255, 0.12);
    color: #cfe0ff;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .smart-homepage-certificate {
        border-color: rgba(148, 163, 184, 0.24);
        background: rgba(15, 23, 42, 0.62);
    }

    html[data-theme="system"] .smart-homepage-certificate-icon {
        background: rgba(245, 158, 11, 0.14);
    }

    html[data-theme="system"] .smart-homepage-certificate-kicker {
        color: #f8cf72;
    }

    html[data-theme="system"] .smart-homepage-certificate-copy strong {
        color: #f8fafc;
    }

    html[data-theme="system"] .smart-homepage-certificate-copy > span:not(.smart-homepage-certificate-kicker) {
        color: #cbd5e1;
    }

    html[data-theme="system"] .smart-homepage-certificate-track {
        background: rgba(148, 163, 184, 0.22);
    }

    html[data-theme="system"] .smart-homepage-certificate-action {
        border-color: rgba(125, 167, 255, 0.34);
        background: rgba(23, 105, 255, 0.12);
        color: #cfe0ff;
    }
}

@media (max-width: 760px) {
    .smart-homepage-certificate {
        grid-template-columns: 44px minmax(0, 1fr);
        padding: 14px;
    }

    .smart-homepage-certificate-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .smart-homepage-certificate-action {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .smart-homepage-certificate-track span {
        transition: none !important;
    }
}


/* ==========================================================
   Returning learner welcome — v17.8.25
   Large floating course summary inspired by the smart homepage.
   It overlays the tutor instead of pushing the lesson downward.
========================================================== */
.returning-welcome-toast {
    position: fixed;
    z-index: 1200;
    top: 92px;
    left: 50%;
    width: min(1180px, calc(100% - 36px));
    transform: translate(-50%, -10px);
    opacity: 0;
    pointer-events: none;
}

.returning-welcome-toast[hidden] {
    display: none !important;
}

.returning-welcome-toast.is-visible {
    animation: returningWelcomeIn 240ms ease-out forwards;
}

.returning-welcome-toast.is-leaving {
    animation: returningWelcomeOut 300ms ease-in forwards;
}

.returning-welcome-toast-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(23, 105, 255, 0.2);
    border-radius: 26px;
    background:
        radial-gradient(circle at 92% 8%, rgba(91, 146, 255, 0.22), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.985), rgba(243, 248, 255, 0.985));
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: auto;
}

.returning-welcome-toast-main {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 46px;
    align-items: center;
    padding: 34px 38px;
}

.returning-welcome-toast-copy {
    min-width: 0;
}

.returning-welcome-toast-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #1769ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.returning-welcome-toast-copy h2 {
    margin: 14px 0 0;
    color: #0b1327;
    font-size: clamp(2.4rem, 4.2vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.returning-welcome-toast-lesson-line {
    margin: 20px 0 0;
    color: #52627a;
    font-size: 1.08rem;
}

.returning-welcome-toast-lesson-line strong {
    color: inherit;
}

.returning-welcome-toast-lesson-name {
    display: block;
    margin-top: 10px;
    color: #5a6b85;
    font-size: 1rem;
    line-height: 1.45;
}

.returning-welcome-toast-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.returning-welcome-toast-primary,
.returning-welcome-toast-secondary {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    border-radius: 13px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.returning-welcome-toast-primary {
    border: 1px solid #1769ff;
    background: linear-gradient(135deg, #1769ff, #2d7dff);
    color: #fff;
    box-shadow: 0 10px 24px rgba(23, 105, 255, 0.22);
}

.returning-welcome-toast-secondary {
    border: 1px solid #c9d9f4;
    background: rgba(255, 255, 255, 0.8);
    color: #1e3356;
}

.returning-welcome-toast-primary:hover,
.returning-welcome-toast-primary:focus-visible,
.returning-welcome-toast-secondary:hover,
.returning-welcome-toast-secondary:focus-visible {
    transform: translateY(-1px);
}

.returning-welcome-toast-primary:focus-visible,
.returning-welcome-toast-secondary:focus-visible {
    outline: 3px solid rgba(23, 105, 255, 0.25);
    outline-offset: 2px;
}

.returning-welcome-toast-stats {
    display: grid;
    gap: 12px;
}

.returning-welcome-stat-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(168, 194, 238, 0.62);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.84);
}

.returning-welcome-stat-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #edf4ff;
    font-size: 1.3rem;
}

.returning-welcome-stat-copy {
    min-width: 0;
}

.returning-welcome-stat-copy strong,
.returning-welcome-stat-copy span {
    display: block;
}

.returning-welcome-stat-copy strong {
    overflow-wrap: anywhere;
    color: #111b31;
    font-size: 0.98rem;
    line-height: 1.35;
}

.returning-welcome-stat-copy > span {
    margin-top: 3px;
    color: #71809a;
    font-size: 0.88rem;
    line-height: 1.35;
}

.returning-welcome-daily-track {
    height: 5px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e9f4;
}

.returning-welcome-daily-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #1769ff;
    transition: width 240ms ease;
}

.returning-welcome-toast-close {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: #5c6b82;
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.returning-welcome-toast-close:hover {
    background: #ffffff;
    color: #1769ff;
    border-color: rgba(23, 105, 255, 0.32);
}

.returning-welcome-toast-close:focus-visible {
    outline: 3px solid rgba(23, 105, 255, 0.28);
    outline-offset: 2px;
}

@keyframes returningWelcomeIn {
    from { opacity: 0; transform: translate(-50%, -10px) scale(0.99); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes returningWelcomeOut {
    from { opacity: 1; transform: translate(-50%, 0) scale(1); }
    to { opacity: 0; transform: translate(-50%, -7px) scale(0.995); }
}

/* Returning learners keep certificate motivation below the tutor. */
.returning-certificate-milestone {
    width: min(1500px, calc(100% - 32px));
    margin: 22px auto 4px;
}

.returning-certificate-milestone[hidden] {
    display: none !important;
}

.returning-certificate-card {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

html[data-theme="dark"] .returning-welcome-toast-card {
    border-color: rgba(125, 167, 255, 0.26);
    background:
        radial-gradient(circle at 92% 8%, rgba(42, 103, 224, 0.24), transparent 38%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.985), rgba(20, 31, 55, 0.985));
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.5);
}

html[data-theme="dark"] .returning-welcome-toast-kicker {
    background: rgba(23, 105, 255, 0.18);
    color: #8bb4ff;
}

html[data-theme="dark"] .returning-welcome-toast-copy h2,
html[data-theme="dark"] .returning-welcome-stat-copy strong {
    color: #f8fafc;
}

html[data-theme="dark"] .returning-welcome-toast-lesson-line,
html[data-theme="dark"] .returning-welcome-toast-lesson-name,
html[data-theme="dark"] .returning-welcome-stat-copy > span {
    color: #cbd5e1;
}

html[data-theme="dark"] .returning-welcome-stat-card,
html[data-theme="dark"] .returning-welcome-toast-secondary,
html[data-theme="dark"] .returning-welcome-toast-close {
    background: rgba(15, 23, 42, 0.76);
    border-color: rgba(148, 163, 184, 0.26);
    color: #e2e8f0;
}

html[data-theme="dark"] .returning-welcome-stat-icon {
    background: rgba(23, 105, 255, 0.18);
}

html[data-theme="dark"] .returning-welcome-daily-track {
    background: rgba(148, 163, 184, 0.2);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .returning-welcome-toast-card {
        border-color: rgba(125, 167, 255, 0.26);
        background:
            radial-gradient(circle at 92% 8%, rgba(42, 103, 224, 0.24), transparent 38%),
            linear-gradient(135deg, rgba(15, 23, 42, 0.985), rgba(20, 31, 55, 0.985));
        box-shadow: 0 26px 60px rgba(2, 6, 23, 0.5);
    }

    html[data-theme="system"] .returning-welcome-toast-kicker {
        background: rgba(23, 105, 255, 0.18);
        color: #8bb4ff;
    }

    html[data-theme="system"] .returning-welcome-toast-copy h2,
    html[data-theme="system"] .returning-welcome-stat-copy strong {
        color: #f8fafc;
    }

    html[data-theme="system"] .returning-welcome-toast-lesson-line,
    html[data-theme="system"] .returning-welcome-toast-lesson-name,
    html[data-theme="system"] .returning-welcome-stat-copy > span {
        color: #cbd5e1;
    }

    html[data-theme="system"] .returning-welcome-stat-card,
    html[data-theme="system"] .returning-welcome-toast-secondary,
    html[data-theme="system"] .returning-welcome-toast-close {
        background: rgba(15, 23, 42, 0.76);
        border-color: rgba(148, 163, 184, 0.26);
        color: #e2e8f0;
    }

    html[data-theme="system"] .returning-welcome-stat-icon {
        background: rgba(23, 105, 255, 0.18);
    }

    html[data-theme="system"] .returning-welcome-daily-track {
        background: rgba(148, 163, 184, 0.2);
    }
}

@media (max-width: 900px) {
    .returning-welcome-toast {
        top: 82px;
        width: calc(100% - 24px);
    }

    .returning-welcome-toast-main {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 28px 24px 24px;
    }

    .returning-welcome-toast-copy h2 {
        font-size: clamp(2.1rem, 8vw, 3.2rem);
    }

    .returning-welcome-toast-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .returning-welcome-stat-card {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

@media (max-width: 640px) {
    .returning-welcome-toast {
        top: 70px;
        width: calc(100% - 16px);
    }

    .returning-welcome-toast-card {
        border-radius: 20px;
    }

    .returning-welcome-toast-main {
        gap: 18px;
        padding: 22px 16px 18px;
    }

    .returning-welcome-toast-copy h2 {
        margin-top: 10px;
        font-size: 2.15rem;
    }

    .returning-welcome-toast-lesson-line {
        margin-top: 14px;
    }

    .returning-welcome-toast-actions {
        gap: 9px;
        margin-top: 18px;
    }

    .returning-welcome-toast-primary,
    .returning-welcome-toast-secondary {
        flex: 1 1 100%;
        min-height: 46px;
    }

    .returning-welcome-toast-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .returning-welcome-stat-card {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 11px;
        padding: 11px 12px;
        border-radius: 14px;
    }

    .returning-welcome-stat-icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .returning-welcome-toast-close {
        top: 10px;
        right: 10px;
    }

    .returning-certificate-milestone {
        width: calc(100% - 24px);
        margin-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .returning-welcome-toast.is-visible,
    .returning-welcome-toast.is-leaving {
        animation: none !important;
        transform: translate(-50%, 0);
    }

    .returning-welcome-toast.is-visible {
        opacity: 1;
    }

    .returning-welcome-toast.is-leaving {
        opacity: 0;
    }

    .returning-welcome-daily-track span {
        transition: none !important;
    }
}


/* =========================================================
   v17.8.31 — dismissible first-time introduction
========================================================= */
.smart-homepage-dismiss {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cddbf8;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    font: inherit;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.smart-homepage-dismiss:hover {
    background: #ffffff;
    border-color: #9dbdff;
    color: #1769ff;
    transform: translateY(-1px);
}

.smart-homepage-dismiss:focus-visible {
    outline: 3px solid rgba(23, 105, 255, 0.24);
    outline-offset: 2px;
}

html[data-theme="dark"] .smart-homepage-dismiss {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.32);
    color: #cbd5e1;
}

html[data-theme="dark"] .smart-homepage-dismiss:hover {
    background: #111827;
    border-color: rgba(96, 165, 250, 0.72);
    color: #93c5fd;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .smart-homepage-dismiss {
        background: rgba(15, 23, 42, 0.9);
        border-color: rgba(148, 163, 184, 0.32);
        color: #cbd5e1;
    }
}

@media (max-width: 760px) {
    .smart-homepage-dismiss {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .smart-homepage-copy {
        padding-right: 34px;
    }
}
