.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.lesson-main {
    max-width: 1200px;
    margin: auto;
    padding: 30px 36px 40px;
}

.lesson-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: none;
    min-height: 48px;
    padding: 10px 18px;
    border: 1px solid #d7dfcf;
    border-radius: 999px;
    background: var(--paper);
    color: var(--green);
    font-weight: 750;
    font-size: 15px;
    text-decoration: none;
    transition: background-color 150ms, border-color 150ms;
}

.back-link:hover {
    border-color: #a9bba2;
    background: var(--mint);
}

.back-link .icon {
    width: 19px;
    height: 19px;
}

.lesson-context {
    margin-left: auto;
    color: var(--green);
    font-size: 16px;
    font-weight: 650;
    text-align: right;
    word-break: keep-all;
}

.step-list {
    display: flex;
    gap: 8px;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e1e5d7;
}

.step-dot.is-active {
    background: var(--green);
}

.step-dot[aria-current="step"] {
    box-shadow: 0 0 0 4px var(--mint);
}

.letter-content {
    align-items: center;
    text-align: center;
}

.word-heading {
    margin: 14px 0 36px;
    font-size: clamp(34px, 4vw, 48px);
    letter-spacing: -1.5px;
    line-height: 1.2;
}

.letter-content .start-button {
    align-self: center;
    min-width: 164px;
}

.practice-stage {
    padding: 30px 32px 20px;
    border: 1px solid #dedfcd;
    border-radius: 29px;
    background: var(--paper);
    box-shadow: 0 12px 36px #354d3208;
}

.practice-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 26px;
}

.small-letter {
    display: grid;
    place-items: center;
    width: 58px;
    height: 66px;
    border-radius: 17px;
    background: var(--mint);
    color: var(--green);
    font-size: 44px;
    font-weight: 750;
    line-height: 1;
}

.practice-heading h1 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -1.2px;
    line-height: 1.4;
}

.choice-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.choice-card {
    position: relative;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 3px solid #e4e5d6;
    border-radius: 22px;
    background: #f3f0d9;
    cursor: pointer;
    transition: transform 140ms, border-color 140ms;
}

.letter-choice {
    display: grid;
    place-items: center;
    min-height: 270px;
    padding: 32px;
    background: #edf1e5;
    color: var(--green);
    font-size: 148px;
    font-weight: 650;
    line-height: 1;
}

.completed-letters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 240px;
    border-radius: 42% 42% 38% 38%;
    background: var(--mint);
    color: var(--green);
    font-size: 98px;
    font-weight: 750;
    line-height: 1;
}

.choice-card img {
    display: block;
    width: 100%;
    height: clamp(220px, 27vw, 310px);
    object-fit: cover;
    object-position: 12% center;
}

.choice-card:hover:not(:disabled) {
    border-color: #a8bea0;
    transform: translateY(-4px);
}

.choice-card:active:not(:disabled) {
    transform: translateY(0);
}

.choice-card:disabled {
    cursor: default;
    opacity: 1;
}

.choice-card.is-retry {
    border-color: #bf8555;
}

.choice-card.is-correct {
    border-color: var(--green);
    animation: answer-pop 360ms ease-out;
}

.choice-marker {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--green);
    color: var(--paper);
    font-size: 27px;
    line-height: 1;
}

.is-retry .choice-marker {
    background: #ad754a;
}

.choice-marker .icon {
    width: 25px;
    height: 25px;
    stroke-width: 2.5;
}

.answer-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 24px;
    text-align: center;
}

.retry-message {
    margin: 0;
    color: #875e3d;
    font-weight: 650;
    font-size: 17px;
}

.correct-feedback {
    display: flex;
    align-items: center;
    gap: 15px;
}

.correct-feedback p {
    margin: 0 24px 0 0;
    color: var(--green);
    font-weight: 750;
    font-size: 20px;
}

.success-star {
    display: grid;
    place-items: center;
    color: #bc9240;
    animation: answer-pop 450ms ease-out;
}

.success-star .icon {
    width: 32px;
    height: 32px;
    fill: #f4d989;
}

.completion-stage {
    padding: 30px 24px 36px;
    border: 1px solid #dedfcd;
    border-radius: 29px;
    background: var(--paper);
    text-align: center;
    box-shadow: 0 12px 36px #354d3208;
}

.completion-picture {
    position: relative;
    width: 260px;
    max-width: 100%;
    margin: 0 auto 23px;
}

.completion-picture img {
    display: block;
    width: 100%;
    height: 240px;
    border-radius: 42% 42% 38% 38%;
    object-fit: cover;
    object-position: 8% center;
}

.completion-star {
    position: absolute;
    right: -10px;
    bottom: 0;
    display: grid;
    place-items: center;
    width: 75px;
    height: 75px;
    border: 5px solid var(--paper);
    border-radius: 50%;
    background: #f9edc0;
    color: #a98232;
    animation: answer-pop 450ms ease-out;
}

.completion-star .icon {
    width: 38px;
    height: 38px;
    fill: #eecb65;
}

.completion-stage h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -1px;
}

.completed-word {
    margin: 9px 0 28px;
    color: var(--muted);
    font-size: 23px;
    font-weight: 600;
}

.completion-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 14px 24px;
    border: 1px solid #cbd5c4;
    border-radius: 15px;
    color: var(--green);
    background: var(--paper);
    text-decoration: none;
    font-size: 16px;
    font-weight: 750;
}

.secondary-button:hover {
    background: var(--mint);
}

@keyframes answer-pop {
    0% { transform: scale(0.94); }
    65% { transform: scale(1.035); }
    100% { transform: scale(1); }
}

@media (max-width: 900px) {
    .lesson-main {
        padding: 26px;
    }

    .practice-stage {
        padding: 26px 22px 18px;
    }

    .choice-grid {
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .lesson-main {
        padding: 20px 18px 28px;
    }

    .lesson-navigation {
        gap: 12px;
        margin-bottom: 20px;
    }

    .lesson-context {
        font-size: 14px;
    }

    .back-link {
        padding: 10px 15px;
        font-size: 14px;
    }

    .lesson-stage .stage-picture img {
        height: 260px;
    }

    .letter-content {
        padding: 20px 24px 26px;
    }

    .word-heading {
        margin: 10px 0 24px;
        font-size: 34px;
    }

    .practice-stage {
        padding: 22px 14px 16px;
        border-radius: 23px;
    }

    .practice-heading {
        gap: 12px;
        margin-bottom: 22px;
    }

    .small-letter {
        width: 42px;
        height: 50px;
        border-radius: 13px;
        font-size: 32px;
    }

    .practice-heading h1 {
        font-size: 23px;
    }

    .choice-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .letter-choice-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .letter-choice {
        min-height: 155px;
        padding: 24px 4px;
        font-size: 72px;
    }

    .letter-choice-grid .choice-marker {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
        font-size: 22px;
    }

    .letter-choice-grid .choice-marker .icon {
        width: 20px;
        height: 20px;
    }

    .choice-card {
        border-radius: 16px;
    }

    .choice-card img {
        height: 175px;
        object-position: 28% 46%;
    }

    .answer-feedback {
        padding: 0 0 18px;
    }

    .correct-feedback {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .correct-feedback p {
        margin: 0;
    }

    .correct-feedback .start-button {
        width: 100%;
        margin-top: 4px;
    }

    .completion-stage {
        padding: 26px 18px 30px;
        border-radius: 23px;
    }

    .completion-picture {
        width: 220px;
    }

    .completion-picture img {
        height: 210px;
    }

    .completion-stage h1 {
        font-size: 30px;
    }

    .completion-actions > a {
        flex: 1;
        min-width: 0;
        padding: 14px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .choice-card, .success-star, .completion-star {
        animation: none;
        transition: none;
    }

    .choice-card:hover:not(:disabled) {
        transform: none;
    }
}
