/* =========================================================
   YEW — GRADE 4
   LESSON 12 — BIG FINAL REVIEW
   ========================================================= */


/* =========================================================
   1. RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    color: #302b3e;

    background:
        linear-gradient(
            180deg,
            #fcfbff 0%,
            #f8f6ff 50%,
            #fcfbff 100%
        );
}

button,
a {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

button {
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   2. BACKGROUND
   ========================================================= */

.background-shape {
    position: fixed;
    z-index: -3;

    border-radius: 50%;

    pointer-events: none;
}

.shape-one {
    width: 430px;
    height: 430px;

    top: 110px;
    left: -245px;

    background: rgba(216, 205, 255, 0.34);
}

.shape-two {
    width: 520px;
    height: 520px;

    top: 37%;
    right: -310px;

    background: rgba(229, 220, 255, 0.35);
}

.shape-three {
    width: 370px;
    height: 370px;

    bottom: -205px;
    left: 22%;

    background: rgba(244, 226, 165, 0.18);
}


/* =========================================================
   3. FLOATING SYMBOLS
   ========================================================= */

.floating-symbol {
    position: fixed;
    z-index: -2;

    color: rgba(112, 86, 183, 0.08);

    font-weight: 900;

    pointer-events: none;
    user-select: none;
}

.symbol-one {
    top: 22%;
    left: 5%;

    font-size: 55px;

    transform: rotate(-10deg);
}

.symbol-two {
    top: 18%;
    right: 6%;

    color: rgba(191, 151, 47, 0.10);

    font-size: 35px;

    transform: rotate(13deg);
}

.symbol-three {
    bottom: 15%;
    left: 6%;

    font-size: 31px;

    transform: rotate(8deg);
}

.symbol-four {
    right: 7%;
    bottom: 14%;

    font-size: 48px;

    transform: rotate(-8deg);
}


/* =========================================================
   4. HEADER
   ========================================================= */

.lesson-navigation {
    width: 100%;
    height: 70px;

    padding: 0 34px;

    position: sticky;
    top: 0;
    z-index: 100;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    background: rgba(255, 255, 255, 0.94);

    border-bottom:
        1px solid rgba(111, 88, 177, 0.10);

    backdrop-filter: blur(12px);
}

.lesson-brand {
    display: flex;
    align-items: center;

    gap: 14px;
}

.lesson-logo {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #8c75d8,
            #7258c1
        );

    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.7px;

    box-shadow:
        0 7px 17px rgba(104, 77, 177, 0.20);
}

.lesson-chapter {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.chapter-number {
    color: #8c80a6;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.25px;
}

.chapter-name {
    color: #332d45;

    font-size: 14px;
    font-weight: 750;
}


/* =========================================================
   5. HEADER STARS
   ========================================================= */

.header-stars {
    min-width: 77px;
    min-height: 36px;

    padding: 7px 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border:
        1px solid #eee3bd;

    border-radius: 999px;

    color: #725a21;

    background: #fffaf0;

    font-size: 14px;
    font-weight: 900;
}

.header-stars span {
    font-size: 17px;
}

.close-lesson-button {
    width: 39px;
    height: 39px;

    justify-self: end;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #7461ae;

    background: #f5f2fc;

    font-size: 17px;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.close-lesson-button:hover {
    background: #ebe5fa;

    transform: rotate(5deg);
}


/* =========================================================
   6. PROGRESS
   ========================================================= */

.lesson-progress-wrapper {
    width: min(920px, calc(100% - 40px));

    margin: 17px auto 0;

    display: flex;
    align-items: center;

    gap: 13px;
}

.lesson-progress-track {
    flex: 1;

    height: 7px;

    overflow: hidden;

    border-radius: 999px;

    background: #ebe7f3;
}

.lesson-progress-fill {
    width: 0%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #9b86de,
            #745ac4
        );

    transition: width 0.4s ease;
}

.lesson-progress-number {
    min-width: 38px;

    color: #877aa2;

    font-size: 11px;
    font-weight: 800;
}


/* =========================================================
   7. SCREENS
   ========================================================= */

.lesson-content {
    width: 100%;
}

.lesson-screen {
    display: none;

    width: 100%;

    padding: 32px 20px 75px;

    animation: screenFade 0.35s ease;
}

.lesson-screen.active-screen {
    display: block;
}

@keyframes screenFade {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   8. MAIN PANEL
   ========================================================= */

.lesson-panel {
    width: min(920px, 100%);

    margin: 0 auto;

    padding: 44px 52px 46px;

    text-align: center;

    border:
        1px solid rgba(116, 91, 183, 0.10);

    border-radius: 27px;

    background: rgba(255, 255, 255, 0.97);

    box-shadow:
        0 17px 50px rgba(67, 49, 112, 0.08);
}


/* =========================================================
   9. LABELS
   ========================================================= */

.screen-label,
.activity-progress,
.round-label {
    min-height: 29px;

    margin-bottom: 16px;

    padding: 0 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    color: #755ebd;

    background: #f0ebfc;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.3px;
}

.round-label {
    color: #69529f;

    background: #eee9f8;
}


/* =========================================================
   10. TYPOGRAPHY
   ========================================================= */

.lesson-panel h1 {
    margin-bottom: 14px;

    color: #302941;

    font-size: clamp(35px, 5vw, 53px);
    line-height: 1.05;
    letter-spacing: -1.5px;
}

.lesson-panel h2 {
    margin-bottom: 12px;

    color: #302941;

    font-size: clamp(25px, 4vw, 35px);
    line-height: 1.15;
    letter-spacing: -0.7px;
}

.lesson-panel h3 {
    color: #493b64;

    font-size: 18px;
}

.screen-introduction {
    max-width: 690px;

    margin: 0 auto 29px;

    color: #716a7d;

    font-size: 16px;
    line-height: 1.7;
}

.screen-introduction strong {
    color: #57457c;
}


/* =========================================================
   11. INTRO
   ========================================================= */

.intro-panel {
    padding-top: 51px;
}

.intro-trophy {
    width: 105px;
    height: 105px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 29px;

    background:
        linear-gradient(
            145deg,
            #fff9e9,
            #f8edc5
        );

    font-size: 53px;

    box-shadow:
        0 12px 28px rgba(156, 120, 36, 0.12);
}

.intro-stat-row {
    max-width: 630px;

    margin: 28px auto 20px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 11px;
}

.intro-stat {
    min-height: 105px;

    padding: 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    border:
        1px solid #ebe6f2;

    border-radius: 17px;

    background: #faf9fc;
}

.intro-stat strong {
    color: #604b86;

    font-size: 27px;
    font-weight: 900;
}

.intro-stat span {
    color: #92879c;

    font-size: 11px;
    font-weight: 700;
}

.intro-note {
    max-width: 650px;

    margin: 0 auto;

    padding: 15px 18px;

    display: flex;
    align-items: center;

    gap: 12px;

    text-align: left;

    border:
        1px solid #e8e1f5;

    border-radius: 16px;

    background: #f7f4fd;
}

.intro-note > span {
    flex: 0 0 auto;

    font-size: 22px;
}

.intro-note p {
    color: #6b6275;

    font-size: 13px;
    line-height: 1.6;
}

.intro-note strong {
    color: #59457c;
}


/* =========================================================
   12. MAIN BUTTON
   ========================================================= */

.main-action-button {
    min-width: 185px;
    min-height: 49px;

    margin-top: 26px;

    padding: 13px 23px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 11px;

    border: none;
    border-radius: 14px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #8b73d7,
            #7157bf
        );

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 9px 20px rgba(104, 76, 181, 0.20);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.main-action-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(104, 76, 181, 0.25);
}

.main-action-button:active {
    transform: translateY(0);
}

.main-action-button span {
    font-size: 17px;
}

.hidden-button {
    display: none !important;
}


/* =========================================================
   13. FINAL MAP
   ========================================================= */

.final-map {
    max-width: 790px;

    margin: 8px auto 10px;

    display: grid;
    grid-template-columns:
        1fr 22px
        1fr 22px
        1fr 22px
        1fr 22px
        1fr;

    align-items: center;

    gap: 5px;
}

.map-stage {
    min-height: 145px;

    padding: 15px 8px;

    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border:
        1px solid #ebe6f2;

    border-radius: 17px;

    background: #faf9fc;
}

.map-stage:nth-of-type(n + 10) {
    margin-top: 10px;
}

.map-number {
    width: 24px;
    height: 24px;

    position: absolute;
    top: 8px;
    left: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    color: #755eb6;

    background: #eee9f8;

    font-size: 9px;
    font-weight: 900;
}

.map-icon {
    margin-bottom: 7px;

    font-size: 28px;
}

.map-stage strong {
    color: #59476e;

    font-size: 11px;
}

.map-stage small {
    margin-top: 4px;

    color: #968b9e;

    font-size: 8px;
}

.map-line {
    height: 2px;

    border-radius: 999px;

    background: #e0d9ec;
}

.final-stage {
    border-color: #e9dbad;

    background:
        linear-gradient(
            145deg,
            #fffdf7,
            #fff9e9
        );
}


/*
   Because there are nine stages, allow the map
   to wrap into a cleaner layout on large screens.
*/

.final-map {
    grid-template-columns:
        repeat(9, minmax(0, 1fr));
}

.final-map .map-line {
    display: none;
}


/* =========================================================
   14. ROUND INTRO
   ========================================================= */

.round-intro-panel {
    padding-top: 50px;
}

.round-icon {
    width: 91px;
    height: 91px;

    margin: 0 auto 19px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 26px;

    background:
        linear-gradient(
            145deg,
            #f2edfc,
            #e9e2f8
        );

    font-size: 43px;

    box-shadow:
        0 10px 24px rgba(80, 58, 139, 0.09);
}

.quick-review-row {
    max-width: 670px;

    margin: 4px auto 0;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 8px;
}

.quick-review-row span {
    padding: 8px 12px;

    border:
        1px solid #e5def2;

    border-radius: 999px;

    color: #67528e;

    background: #faf8fe;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.7px;
}


/* =========================================================
   15. MINI RULE BOX
   ========================================================= */

.mini-rule-box {
    max-width: 680px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 10px;
}

.mini-rule-box div {
    min-height: 85px;

    padding: 14px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border:
        1px solid #e9e4f1;

    border-radius: 15px;

    background: #faf9fc;
}

.mini-rule-box strong {
    color: #604b83;

    font-size: 13px;
}

.mini-rule-box span {
    margin-top: 5px;

    color: #8f8499;

    font-size: 11px;
}


/* =========================================================
   16. DIFFERENCE BOX
   ========================================================= */

.difference-box {
    max-width: 700px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 12px;
}

.difference-box > div {
    min-height: 150px;

    padding: 22px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border:
        1px solid #e8e2f0;

    border-radius: 18px;

    background: #faf9fc;
}

.difference-box strong {
    margin-bottom: 9px;

    color: #604a84;

    font-size: 16px;
}

.difference-box p {
    color: #827788;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   17. ACTIVITIES
   ========================================================= */

.activity-panel {
    max-width: 820px;

    padding-top: 43px;
}

.activity-question-icon {
    width: 76px;
    height: 76px;

    margin: 2px auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 22px;

    background: #f1edfa;

    font-size: 36px;
}

.activity-question {
    max-width: 650px;

    margin: 18px auto 23px;

    color: #51495d;

    font-size: 18px;
    font-weight: 700;
    line-height: 1.55;
}

.activity-question strong {
    color: #624c88;
}

.activity-options {
    max-width: 660px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 12px;
}

.large-options {
    grid-template-columns: 1fr;
}

.activity-option {
    min-height: 58px;

    padding: 13px 16px;

    border:
        1px solid #e8e3ef;

    border-radius: 14px;

    color: #4e4659;

    background: #faf9fc;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;

    cursor: pointer;

    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease;
}

.activity-option:hover:not(:disabled) {
    transform: translateY(-2px);

    border-color: #cec2e8;

    background: #f7f3fe;
}

.activity-option.correct {
    color: #37704a;

    border-color: #aad8b9;

    background: #edf9f1;
}

.activity-option.wrong {
    color: #994e58;

    border-color: #efb8be;

    background: #fff1f2;

    animation: wrongShake 0.25s ease;
}

@keyframes wrongShake {

    0%,
    100% {
        transform: translateX(0);
    }

    33% {
        transform: translateX(-4px);
    }

    66% {
        transform: translateX(4px);
    }
}

.activity-feedback {
    min-height: 28px;

    margin-top: 17px;

    font-size: 13px;
    font-weight: 800;
}

.correct-feedback {
    color: #4d8960;
}

.wrong-feedback {
    color: #b25b67;
}

.activity-option:disabled {
    cursor: default;

    opacity: 0.68;
}

.activity-option.correct:disabled {
    opacity: 1;
}


/* =========================================================
   18. TRUE / FALSE
   ========================================================= */

.true-false-options {
    max-width: 500px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 14px;
}

.true-false-options .activity-option {
    min-height: 76px;

    font-size: 15px;
}


/* =========================================================
   19. ANSWER CLUE
   ========================================================= */

.answer-clue {
    max-width: 570px;

    margin: 5px auto 20px;

    padding: 18px 20px;

    display: flex;
    flex-direction: column;

    gap: 6px;

    border:
        1px solid #ded5ef;

    border-radius: 16px;

    background: #f5f1fc;
}

.answer-clue small {
    color: #9687aa;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.answer-clue strong {
    color: #574370;

    font-size: 17px;
}


/* =========================================================
   20. SITUATION CARD
   ========================================================= */

.situation-card {
    max-width: 570px;

    margin: 5px auto 20px;

    padding: 18px 20px;

    display: flex;
    flex-direction: column;

    gap: 6px;

    border:
        1px solid #e2d9f0;

    border-radius: 16px;

    background: #f7f4fc;
}

.situation-card small {
    color: #9687aa;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.situation-card strong {
    color: #57456f;

    font-size: 17px;
    line-height: 1.5;
}


/* =========================================================
   21. ROUND COMPLETE
   ========================================================= */

.round-complete-panel {
    max-width: 750px;

    padding-top: 53px;
}

.earned-star {
    width: 105px;
    height: 105px;

    margin: 0 auto 19px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid #f0e2ae;

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            #fffdf4,
            #fff4cb
        );

    font-size: 53px;

    box-shadow:
        0 12px 28px rgba(167, 130, 37, 0.12);

    animation: starAppear 0.55s ease;
}

@keyframes starAppear {

    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-15deg);
    }

    70% {
        transform: scale(1.08) rotate(3deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.round-complete-panel > p {
    max-width: 520px;

    margin: 0 auto;

    color: #766d7d;

    font-size: 14px;
    line-height: 1.6;
}

.stars-earned {
    width: fit-content;

    margin: 21px auto 0;

    padding: 10px 17px;

    border:
        1px solid #ecdfb7;

    border-radius: 999px;

    color: #725b23;

    background: #fffaf0;

    font-size: 13px;
    font-weight: 900;
}


/* =========================================================
   22. STREET MINI MAP
   ========================================================= */

.street-mini-map {
    max-width: 500px;

    margin: 4px auto 20px;

    padding: 22px;

    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    align-items: center;

    gap: 12px;

    border:
        1px solid #e8e3ef;

    border-radius: 20px;

    background: #faf9fc;
}

.map-building {
    min-height: 105px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border:
        1px solid #e8e3ef;

    border-radius: 16px;

    background: #ffffff;

    font-size: 36px;
}

.map-building span {
    color: #6b5a80;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
}

.map-road {
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #ffffff;

    background: #8e8994;

    font-size: 25px;
}


/* =========================================================
   23. FINAL CHALLENGE INTRO
   ========================================================= */

.final-challenge-intro {
    max-width: 820px;

    padding-top: 51px;

    border-color: rgba(190, 150, 50, 0.16);

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fffdf8 100%
        );
}

.final-fire {
    width: 100px;
    height: 100px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 29px;

    background:
        linear-gradient(
            145deg,
            #f4f0fd,
            #eee7fb
        );

    font-size: 50px;
}

.final-warning {
    max-width: 650px;

    margin: 0 auto;

    padding: 17px 20px;

    display: flex;
    align-items: center;

    gap: 15px;

    text-align: left;

    border:
        1px solid #e9dfbd;

    border-radius: 17px;

    background: #fffaf0;
}

.final-warning > span {
    flex: 0 0 auto;

    font-size: 25px;
}

.final-warning div {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.final-warning strong {
    color: #65502a;

    font-size: 13px;
}

.final-warning p {
    color: #8c8069;

    font-size: 11px;
    line-height: 1.5;
}


/* =========================================================
   24. FINAL QUESTIONS
   ========================================================= */

.final-activity {
    position: relative;

    border-color: rgba(190, 150, 50, 0.14);
}

.final-question-number {
    width: 58px;
    height: 58px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 17px;

    color: #66518f;

    background: #f0ebfa;

    font-size: 18px;
    font-weight: 900;
}

.final-number {
    color: #72591e;

    background: #fff4d1;
}

.final-travel-scene {
    max-width: 370px;

    margin: 0 auto 20px;

    padding: 20px;

    border:
        1px solid #e9e3f0;

    border-radius: 18px;

    background: #faf9fc;

    font-size: 38px;
    letter-spacing: 12px;
}


/* =========================================================
   25. READING
   ========================================================= */

.reading-panel {
    max-width: 820px;
}

.reading-icon {
    width: 82px;
    height: 82px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 23px;

    background: #f0ecf9;

    font-size: 39px;
}

.story-card {
    max-width: 690px;

    margin: 0 auto 20px;

    padding: 25px 28px;

    text-align: left;

    border:
        1px solid #e8e3ef;

    border-radius: 20px;

    background: #faf9fc;
}

.story-title {
    margin-bottom: 16px;

    display: block;

    color: #584576;

    font-size: 16px;
    font-weight: 900;
}

.story-card p {
    margin-bottom: 12px;

    color: #615967;

    font-size: 14px;
    line-height: 1.75;
}

.story-card p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   26. LISTEN BUTTON
   ========================================================= */

.listen-button {
    min-height: 44px;

    padding: 10px 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    color: #67509e;

    background: #eee9f8;

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

.listen-button:hover {
    background: #e5ddf5;

    transform: translateY(-1px);
}

.listen-button.audio-playing {
    background: #ded4f3;

    transform: scale(1.02);
}


/* =========================================================
   27. COMPLETION
   ========================================================= */

.completion-panel {
    max-width: 830px;

    padding-top: 52px;

    border-color: rgba(190, 150, 50, 0.16);

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fffefa
        );
}

.final-trophy {
    width: 115px;
    height: 115px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid #efdfaa;

    border-radius: 33px;

    background:
        linear-gradient(
            145deg,
            #fffdf4,
            #f9edbf
        );

    font-size: 59px;

    box-shadow:
        0 13px 30px rgba(166, 128, 35, 0.14);

    animation: trophyAppear 0.7s ease;
}

@keyframes trophyAppear {

    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.7);
    }

    70% {
        transform: translateY(-3px) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.completion-text {
    max-width: 620px;

    margin: 0 auto 22px;

    color: #71687c;

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   28. FINAL STARS
   ========================================================= */

.final-stars {
    max-width: 560px;

    margin: 0 auto 24px;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 7px;
}

.final-stars span {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid #eee1b5;

    border-radius: 12px;

    background: #fffaf0;

    font-size: 20px;

    animation: finalStar 0.5s ease both;
}

.final-stars span:nth-child(2) {
    animation-delay: 0.05s;
}

.final-stars span:nth-child(3) {
    animation-delay: 0.10s;
}

.final-stars span:nth-child(4) {
    animation-delay: 0.15s;
}

.final-stars span:nth-child(5) {
    animation-delay: 0.20s;
}

.final-stars span:nth-child(6) {
    animation-delay: 0.25s;
}

.final-stars span:nth-child(7) {
    animation-delay: 0.30s;
}

.final-stars span:nth-child(8) {
    animation-delay: 0.35s;
}

.final-stars span:nth-child(9) {
    animation-delay: 0.40s;
}

@keyframes finalStar {

    from {
        opacity: 0;
        transform: translateY(8px) scale(0.7);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   29. ACHIEVEMENT
   ========================================================= */

.achievement-card {
    max-width: 540px;

    margin: 0 auto 24px;

    padding: 18px 21px;

    display: flex;
    align-items: center;

    gap: 16px;

    text-align: left;

    border:
        1px solid #e8ddb9;

    border-radius: 19px;

    background:
        linear-gradient(
            135deg,
            #fffaf0,
            #fffdf8
        );
}

.achievement-icon {
    width: 64px;
    height: 64px;

    flex: 0 0 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #ffffff;

    font-size: 32px;

    box-shadow:
        0 7px 18px rgba(104, 80, 26, 0.08);
}

.achievement-card > div:last-child {
    display: flex;
    flex-direction: column;
}

.achievement-card small {
    margin-bottom: 3px;

    color: #a18b55;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.achievement-card strong {
    color: #624f28;

    font-size: 18px;
}

.achievement-card p {
    margin-top: 3px;

    color: #988e79;

    font-size: 11px;
}


/* =========================================================
   30. MASTERED SECTION
   ========================================================= */

.mastered-section {
    max-width: 680px;

    margin: 0 auto 22px;
}

.mastered-section h3 {
    margin-bottom: 13px;
}

.mastered-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 9px;
}

.mastered-grid div {
    min-height: 49px;

    padding: 10px 12px;

    display: flex;
    align-items: center;

    gap: 8px;

    text-align: left;

    border:
        1px solid #ebe7f1;

    border-radius: 12px;

    color: #6e6575;

    background: #faf9fc;

    font-size: 11px;
    font-weight: 700;
}

.mastered-grid span {
    color: #5d9c70;

    font-size: 13px;
    font-weight: 900;
}


/* =========================================================
   31. FINAL MESSAGE
   ========================================================= */

.final-message {
    max-width: 620px;

    margin: 0 auto;

    padding: 17px 20px;

    display: flex;
    align-items: center;

    gap: 14px;

    text-align: left;

    border:
        1px solid #e5def4;

    border-radius: 17px;

    background: #f6f2fc;
}

.final-message > span {
    flex: 0 0 auto;

    font-size: 27px;
}

.final-message div {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.final-message strong {
    color: #594575;

    font-size: 13px;
}

.final-message p {
    color: #817688;

    font-size: 11px;
    line-height: 1.55;
}

.finish-lesson-button {
    margin-top: 25px;
}


/* =========================================================
   32. FINAL ROUND BUTTON
   ========================================================= */

.round-final-task .round-complete-button {
    background:
        linear-gradient(
            135deg,
            #8067c9,
            #6d53b7
        );
}


/* =========================================================
   33. FOCUS
   ========================================================= */

button:focus-visible,
a:focus-visible {
    outline:
        3px solid rgba(124, 99, 195, 0.25);

    outline-offset: 3px;
}


/* =========================================================
   34. TABLET
   ========================================================= */

@media (max-width: 900px) {

    .lesson-panel {
        padding:
            40px 36px
            42px;
    }

    .final-map {
        grid-template-columns:
            repeat(3, 1fr);

        gap: 10px;
    }

    .map-stage {
        min-height: 130px;
    }

    .mastered-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }
}


/* =========================================================
   35. SMALL TABLET
   ========================================================= */

@media (max-width: 680px) {

    .lesson-navigation {
        height: 65px;

        padding: 0 18px;

        grid-template-columns:
            1fr auto auto;

        gap: 9px;
    }

    .lesson-logo {
        width: 39px;
        height: 39px;
    }

    .chapter-number {
        font-size: 8px;
    }

    .chapter-name {
        font-size: 12px;
    }

    .header-stars {
        min-width: 60px;
        min-height: 34px;

        padding: 6px 9px;
    }

    .lesson-progress-wrapper {
        width: calc(100% - 28px);
    }

    .lesson-screen {
        padding:
            25px 13px
            55px;
    }

    .lesson-panel {
        padding:
            32px 20px
            35px;

        border-radius: 22px;
    }

    .intro-stat-row {
        grid-template-columns: 1fr;
    }

    .intro-stat {
        min-height: 76px;
    }

    .final-map {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .mini-rule-box {
        grid-template-columns: 1fr;
    }

    .difference-box {
        grid-template-columns: 1fr;
    }

    .activity-options {
        grid-template-columns: 1fr;
    }

    .true-false-options {
        grid-template-columns: 1fr;
    }

    .street-mini-map {
        grid-template-columns:
            1fr 60px 1fr;

        padding: 15px;
    }

    .map-building {
        min-height: 90px;

        font-size: 30px;
    }

    .story-card {
        padding: 20px;
    }

    .mastered-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   36. MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .lesson-navigation {
        padding: 0 12px;
    }

    .lesson-brand {
        gap: 8px;
    }

    .chapter-number {
        display: none;
    }

    .chapter-name {
        max-width: 120px;

        overflow: hidden;

        white-space: nowrap;

        text-overflow: ellipsis;
    }

    .header-stars {
        min-width: 54px;

        gap: 4px;

        font-size: 12px;
    }

    .header-stars span {
        font-size: 14px;
    }

    .close-lesson-button {
        width: 35px;
        height: 35px;
    }

    .lesson-panel {
        padding:
            29px 15px
            32px;

        border-radius: 19px;
    }

    .screen-introduction {
        font-size: 14px;
    }

    .intro-trophy,
    .earned-star,
    .final-trophy {
        width: 88px;
        height: 88px;

        border-radius: 25px;

        font-size: 44px;
    }

    .round-icon,
    .final-fire {
        width: 80px;
        height: 80px;

        border-radius: 22px;

        font-size: 38px;
    }

    .final-map {
        grid-template-columns: 1fr;
    }

    .map-stage {
        min-height: 105px;
    }

    .activity-question {
        font-size: 16px;
    }

    .activity-option {
        font-size: 13px;
    }

    .street-mini-map {
        grid-template-columns: 1fr;
    }

    .map-road {
        width: 70%;
        height: 45px;

        margin: 0 auto;

        transform: rotate(90deg);
    }

    .final-travel-scene {
        font-size: 30px;
        letter-spacing: 6px;
    }

    .story-card p {
        font-size: 13px;
    }

    .final-stars {
        max-width: 280px;
    }

    .final-stars span {
        width: 38px;
        height: 38px;

        font-size: 18px;
    }

    .achievement-card {
        padding: 15px;
    }

    .achievement-icon {
        width: 55px;
        height: 55px;

        flex-basis: 55px;

        font-size: 27px;
    }

    .final-message {
        align-items: flex-start;
    }

    .main-action-button {
        width: 100%;

        min-width: 0;
    }
}


/* =========================================================
   37. VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .lesson-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .chapter-name {
        max-width: 95px;
    }

    .header-stars {
        padding: 5px 7px;
    }

    .activity-question-icon {
        width: 66px;
        height: 66px;

        font-size: 31px;
    }

    .quick-review-row span {
        padding: 7px 9px;

        font-size: 9px;
    }
}