.home-page {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.home-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-topbar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px 0;
}

.home-topbar__menu-spacer {
    flex: none;
    width: 40px;
    height: 40px;
}

.home-topbar__brand {
    flex: 1;
}

.home-topbar__settings {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-muted);
}

.home-profile-card {
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    padding: 18px;
}

.home-profile-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.home-profile-card__avatar {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-unlock-chip-bg);
    color: var(--color-accent-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
}

.home-profile-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-profile-card__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.home-profile-card__name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text-strong);
}

.home-profile-card__score {
    flex: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-subtle);
}

.home-profile-card__fill {
    animation: home-profile-card-fill 1.1s ease forwards;
}

@keyframes home-profile-card-fill {
    from { width: 0%; }
    to { width: var(--fill-target, 0%); }
}

.home-profile-card__hint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.home-profile-card__hint {
    font-size: 12px;
    color: var(--color-text-subtle);
}

.home-profile-card__streaks {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-muted);
}

.home-profile-card__streak {
    position: relative;
    display: inline-flex;
}

.home-profile-card__streak-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.home-profile-card__streak-bubble {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    transform: translateY(-4px);
    background: var(--color-text-strong);
    color: var(--color-surface);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    z-index: 2;
}

.home-profile-card__streak-bubble.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.home-profile-card__streak-icon {
    flex: none;
}

/* The mascot icon itself (glass/face, all its states) lives in mascot.css, shared with the
   quiz result page - these four rules are the home page grid card's own copy/CTA styling
   around it, specific to this page, so they stay here rather than moving too. */
.home-bulb-card__headline {
    position: relative;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: var(--color-text-strong);
}

.home-bulb-card__subtext {
    position: relative;
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-muted);
}

.home-bulb-card__cta {
    position: relative;
    width: 100%;
    height: 56px;
    border-radius: 18px;
    font-size: 18px;
    box-shadow: 0 10px 24px -6px color-mix(in oklab, var(--color-accent) 45%, transparent);
}

.home-bulb-card__review {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--color-accent);
    text-decoration: none;
}

.home-bulb-card__review:hover,
.home-bulb-card__review:focus-visible {
    color: var(--color-accent-hover);
}

.home-weekly-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: color-mix(in oklab, var(--color-surface) 60%, var(--color-bg));
    border: 1px dashed var(--color-border);
    border-radius: 26px;
    padding: 20px 22px;
    color: var(--color-text-muted);
    box-sizing: border-box;
}

.home-weekly-card__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.home-weekly-card__chevron {
    flex: none;
}

.home-weekly-card__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 17px;
    color: var(--color-text-strong);
}

.home-weekly-card__subtitle {
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text-muted);
}

.home-weekly-card__hint {
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-accent);
}

.home-weekly-card--active {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    text-decoration: none;
}

.home-weekly-card__chip {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--color-unlock-chip-bg);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-unlock-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 26px;
    padding: 20px 22px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.home-unlock-card::before {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: var(--color-halo);
    opacity: .3;
}

.home-unlock-card__chip {
    position: relative;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--color-unlock-chip-bg);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-unlock-card__text {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.home-unlock-card__eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.home-unlock-card__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 17px;
    color: var(--color-text-strong);
}

.home-unlock-card__subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
}

@media (min-width: 1024px) {
    .home-page {
        padding: 32px;
    }

    .home-topbar {
        display: none;
    }

    .home-shell {
        max-width: 800px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-content: start;
        gap: 20px;
    }

    .home-topbar,
    .home-profile-card,
    .home-bulb-card {
        grid-column: 1 / -1;
    }

    .home-profile-card {
        padding: 14px 28px;
        border-radius: 20px;
    }

    .home-profile-card__avatar {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .home-bulb-card {
        padding: 44px 24px 40px;
    }

    .home-bulb-card__headline {
        font-size: 28px;
    }

    .home-bulb-card__subtext {
        font-size: 14px;
    }

    .home-bulb-card__cta {
        height: 60px;
        font-size: 19px;
    }

    .home-weekly-card,
    .home-unlock-card {
        padding: 24px 26px;
    }

    .home-weekly-card__title,
    .home-unlock-card__title {
        font-size: 18px;
    }

    .home-weekly-card__subtitle,
    .home-unlock-card__subtitle {
        font-size: 14px;
    }
}
