/* =========================================================
   YEW — GRADE 4 — LESSON 1
   COMPLETE SELF-CONTAINED CSS

   BASE CSS + GRADE 4 CSS
   NO @import
========================================================= */


/* =========================================================
   BASE STYLES
========================================================= */

:root {

    --gold-900: #765019;

    --gold-800: #96651f;

    --gold-700: #b87b26;

    --gold-600: #d39835;

    --gold-500: #ebb651;

    --gold-400: #f4ca73;

    --gold-300: #f8dda0;

    --gold-200: #fff0c4;

    --gold-100: #fff8e8;


    --cream: #fffdf7;

    --ink: #34313e;

    --muted: #706b77;


    --green: #5a9a72;

    --red: #cf6262;

    --white: #ffffff;


    --shadow:
        0 22px 55px
        rgba(130, 88, 24, 0.14);
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    min-height: 100vh;

    font-family:
        "Manrope",
        sans-serif;
}


button,
a {
    font: inherit;
}


button {
    border: 0;
}


/* =========================================
   PAGE BACKGROUND
========================================= */

.lesson-body {
    position: relative;

    overflow-x: hidden;

    color: var(--ink);

    background:
        radial-gradient(
            circle at 8% 3%,
            rgba(255, 222, 137, 0.7),
            transparent 28%
        ),
        radial-gradient(
            circle at 94% 12%,
            rgba(255, 242, 198, 0.9),
            transparent 31%
        ),
        linear-gradient(
            145deg,
            #fffaf0 0%,
            #fffdf8 55%,
            #fff6da 100%
        );
}


.background-shape,
.floating-symbol {
    position: fixed;

    pointer-events: none;

    z-index: 0;
}


.background-shape {
    border-radius: 50%;

    filter: blur(2px);

    opacity: 0.5;
}


.shape-one {
    width: 280px;
    height: 280px;

    left: -120px;
    top: 28%;

    background: #ffe19b;
}


.shape-two {
    width: 230px;
    height: 230px;

    right: -100px;
    top: 50%;

    background: #f7c960;
}


.shape-three {
    width: 180px;
    height: 180px;

    left: 10%;
    bottom: -90px;

    background: #fff0bd;
}


.floating-symbol {
    width: 64px;
    height: 64px;

    display: grid;
    place-items: center;

    border:
        1px solid
        rgba(190, 129, 36, 0.12);

    border-radius: 22px;

    background:
        rgba(255, 255, 255, 0.62);

    color:
        rgba(150, 101, 31, 0.3);

    font-family:
        "Fredoka",
        sans-serif;

    font-weight: 700;

    box-shadow:
        0 15px 30px
        rgba(135, 91, 25, 0.07);
}


.float-one {
    left: 4%;
    top: 19%;

    transform: rotate(-11deg);
}


.float-two {
    right: 3%;
    top: 31%;

    transform: rotate(9deg);
}


.float-three {
    left: 2%;
    bottom: 9%;

    transform: rotate(7deg);
}


.lesson-header,
.lesson-progress-area,
.lesson-application {
    position: relative;

    z-index: 2;
}


/* =========================================
   HEADER
========================================= */

.lesson-header {
    padding: 18px 22px 0;
}


.lesson-navigation {
    width: min(1180px, 100%);

    margin: 0 auto;
    padding: 13px 17px;

    display: grid;

    grid-template-columns:
        auto 1fr auto;

    align-items: center;

    gap: 18px;

    border:
        1px solid
        rgba(197, 134, 40, 0.16);

    border-radius: 24px;

    background:
        rgba(255, 255, 255, 0.88);

    backdrop-filter:
        blur(15px);

    box-shadow:
        0 13px 35px
        rgba(130, 88, 24, 0.1);
}


.lesson-logo {
    padding: 11px 18px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            var(--gold-600),
            var(--gold-400)
        );

    color: white;

    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;

    text-decoration: none;
}


.chapter-information {
    display: flex;

    flex-direction: column;

    gap: 2px;
}


.chapter-number {
    color: var(--gold-800);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
}


.chapter-name {
    font-family:
        "Fredoka",
        sans-serif;

    font-size: 18px;
}


.close-lesson-button {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    border-radius: 15px;

    background:
        var(--gold-100);

    color:
        var(--gold-900);

    font-size: 28px;

    text-decoration: none;

    transition:
        0.25s ease;
}


.close-lesson-button:hover {
    background:
        var(--gold-200);

    transform:
        rotate(5deg);
}


/* =========================================
   LESSON PROGRESS
========================================= */

.lesson-progress-area {
    width:
        min(
            1060px,
            calc(100% - 44px)
        );

    margin:
        18px auto 0;

    display: flex;

    align-items: center;

    gap: 14px;
}


.lesson-progress-track {
    height: 12px;

    flex: 1;

    overflow: hidden;

    border:
        1px solid
        rgba(191, 130, 37, 0.12);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.8);
}


.lesson-progress-fill {
    width: 10%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--gold-500),
            #ffd873
        );

    box-shadow:
        0 0 14px
        rgba(227, 166, 66, 0.4);

    transition:
        width 0.55s ease;
}


.lesson-progress-number {
    min-width: 58px;

    color:
        var(--gold-900);

    font-size: 13px;
}


/* =========================================
   LESSON SCREENS
========================================= */

.lesson-application {
    width:
        min(
            1120px,
            calc(100% - 34px)
        );

    margin: 0 auto;

    padding:
        30px 0 70px;
}


.lesson-screen {
    display: none;

    animation:
        screenIn
        0.45s ease both;
}


.lesson-screen.active-screen {
    display: block;
}


@keyframes screenIn {

    from {
        opacity: 0;

        transform:
            translateY(16px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


.lesson-panel {
    width:
        min(840px, 100%);

    margin: 0 auto;

    padding:
        clamp(
            28px,
            5vw,
            58px
        );

    border:
        1px solid
        rgba(198, 135, 40, 0.18);

    border-radius: 38px;

    background:
        rgba(255, 255, 255, 0.91);

    box-shadow:
        var(--shadow);
}


.wide-panel {
    width:
        min(1040px, 100%);
}


h1,
h2,
h3,
p {
    overflow-wrap:
        anywhere;
}


h1,
h2,
h3 {
    font-family:
        "Fredoka",
        sans-serif;
}


h1 {
    max-width: 680px;

    margin:
        14px auto 18px;

    font-size:
        clamp(
            40px,
            6vw,
            66px
        );

    line-height: 1.05;
}


h2 {
    margin: 3px 0 0;

    font-size:
        clamp(
            31px,
            4vw,
            44px
        );

    line-height: 1.1;
}


h3 {
    font-size: 24px;
}


.screen-label {
    margin: 0;

    color:
        var(--gold-700);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}


/* =========================================
   INTRO
========================================= */

.intro-page {
    position: relative;

    overflow: hidden;

    text-align: center;
}


.intro-page::before {
    content: "";

    position: absolute;

    width: 360px;
    height: 360px;

    top: -190px;
    right: -120px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 216, 115, 0.34),
            transparent 70%
        );
}


.intro-sun,
.heading-icon,
.review-icon,
.finish-trophy {
    display: grid;
    place-items: center;

    margin-inline: auto;

    background:
        linear-gradient(
            145deg,
            #fff2bd,
            #ffe092
        );

    box-shadow:
        0 14px 28px
        rgba(174, 117, 32, 0.13);
}


.intro-sun {
    width: 96px;
    height: 96px;

    margin-bottom: 20px;

    border-radius: 30px;

    font-size: 49px;
}


.intro-lead {
    max-width: 650px;

    margin: 0 auto;

    color:
        var(--muted);

    font-size: 18px;

    line-height: 1.7;
}


.pronoun-cloud {
    margin:
        30px auto;

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;
}


.pronoun-cloud span,
.pronoun-chip {
    min-width: 54px;

    padding:
        10px 15px;

    display: inline-grid;
    place-items: center;

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            #fff6d6,
            #ffe7a6
        );

    color:
        var(--gold-900);

    font-family:
        "Fredoka",
        sans-serif;

    font-size: 21px;
    font-weight: 700;

    box-shadow:
        0 8px 18px
        rgba(153, 102, 27, 0.09);
}


.mission-card {
    max-width: 650px;

    margin:
        0 auto 30px;

    padding:
        18px 20px;

    display: flex;

    align-items: center;

    gap: 16px;

    text-align: left;

    border:
        1px solid
        rgba(205, 145, 53, 0.18);

    border-radius: 22px;

    background:
        var(--gold-100);
}


.mission-icon {
    font-size: 34px;
}


.mission-card strong {
    font-family:
        "Fredoka",
        sans-serif;

    font-size: 20px;
}


.mission-card p {
    margin:
        4px 0 0;

    color:
        var(--muted);

    line-height: 1.5;
}


/* =========================================
   MAIN BUTTONS
========================================= */

.main-action-button,
.secondary-link-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    cursor: pointer;

    text-decoration: none;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.main-action-button {
    min-width: 205px;

    margin:
        28px auto 0;

    padding:
        16px 24px;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            var(--gold-600),
            var(--gold-400)
        );

    color: white;

    font-weight: 800;

    box-shadow:
        0 13px 26px
        rgba(180, 120, 31, 0.23);
}


button.main-action-button {
    display: flex;
}


.main-action-button:hover,
.secondary-link-button:hover {
    transform:
        translateY(-3px);
}


.hidden-button {
    display: none !important;
}


/* =========================================
   PAGE HEADINGS
========================================= */

.page-heading {
    margin-bottom: 27px;

    display: flex;

    align-items: center;

    gap: 17px;
}


.centered-heading {
    justify-content: center;

    text-align: left;
}


.heading-icon {
    width: 70px;
    height: 70px;

    margin: 0;

    flex:
        0 0 auto;

    border-radius: 23px;

    font-size: 34px;
}


/* =========================================
   EXPLANATION
========================================= */

.explanation-card,
.golden-tip,
.important-note,
.review-reminder {
    border:
        1px solid
        rgba(204, 142, 48, 0.17);

    background:
        var(--gold-100);
}


.explanation-card {
    padding: 22px;

    border-radius: 24px;
}


.explanation-card > p {
    margin:
        0 0 17px;

    font-size: 17px;

    line-height: 1.65;
}


.replace-example {
    padding: 15px;

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 13px;

    border-radius: 17px;

    background: white;

    line-height: 1.5;
}


.replace-arrow {
    color:
        var(--gold-700);

    font-size: 24px;
    font-weight: 800;
}


mark {
    padding:
        2px 7px;

    border-radius: 8px;

    background: #ffe296;

    color:
        var(--gold-900);
}


/* =========================================
   PRONOUN TABLE
========================================= */

.pronoun-table-wrap {
    margin-top: 22px;

    overflow-x: auto;

    border:
        1px solid
        rgba(202, 139, 44, 0.16);

    border-radius: 24px;
}


.pronoun-table {
    width: 100%;
    min-width: 760px;

    border-collapse: collapse;

    background: white;
}


.pronoun-table th,
.pronoun-table td {
    padding:
        14px 13px;

    border-bottom:
        1px solid
        #f3ead4;

    text-align: left;

    vertical-align: middle;
}


.pronoun-table th {
    background:
        linear-gradient(
            135deg,
            #f7d981,
            #efbd5b
        );

    color: #68430f;

    font-size: 13px;
}


.pronoun-table tbody tr:last-child td {
    border-bottom: 0;
}


.pronoun-table tbody tr:hover {
    background: #fffaf0;
}


.pronoun-table .pronoun-chip {
    min-width: 47px;

    padding:
        7px 11px;

    font-size: 17px;
}


.speak-button {
    width: 42px;
    height: 42px;

    cursor: pointer;

    border-radius: 14px;

    background: #fff1c4;

    font-size: 19px;

    transition:
        0.22s ease;
}


.speak-button:hover,
.speak-button.speaking {
    background:
        var(--gold-400);

    transform:
        scale(1.08);
}


.golden-tip,
.important-note {
    margin-top: 20px;

    padding:
        17px 19px;

    display: flex;

    align-items: center;

    gap: 13px;

    border-radius: 20px;
}


.golden-tip span,
.important-note span {
    font-size: 27px;
}


.golden-tip p,
.important-note p {
    margin: 0;

    line-height: 1.55;
}

/* =========================================
   SINGULAR AND PLURAL
========================================= */

.number-groups {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 20px;
}


.number-card {
    padding: 27px;

    border:
        1px solid
        rgba(199, 137, 42, 0.16);

    border-radius: 27px;

    text-align: center;
}


.singular-card {
    background:
        linear-gradient(
            145deg,
            #fff8e5,
            #ffedbd
        );
}


.plural-card {
    background:
        linear-gradient(
            145deg,
            #fff4d1,
            #f5d989
        );
}


.number-card-icon {
    font-size: 43px;
}


.number-card h3 {
    margin:
        12px 0 10px;
}


.number-card p {
    margin:
        13px 0 0;

    color:
        var(--muted);

    line-height: 1.6;
}


.big-pronouns {
    color:
        var(--gold-900);

    font-family:
        "Fredoka",
        sans-serif;

    font-size: 23px;
    font-weight: 700;
}


.compare-strip {
    margin-top: 21px;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 15px;
}


.compare-strip div {
    padding: 18px;

    display: flex;

    justify-content: center;
    align-items: center;

    gap: 12px;

    border-radius: 18px;

    background: white;

    box-shadow:
        0 9px 22px
        rgba(123, 82, 23, 0.08);
}


/* =========================================
   TEXT INTRODUCTIONS
========================================= */

.activity-instruction,
.video-intro,
.games-intro,
.map-message {
    max-width: 680px;

    margin:
        -7px auto 23px;

    color:
        var(--muted);

    text-align: center;

    line-height: 1.65;
}


/* =========================================
   SORTING INTERACTIVE
========================================= */

.sorting-station {
    max-width: 690px;

    margin: 0 auto;

    padding: 24px;

    border:
        1px solid
        rgba(203, 141, 47, 0.18);

    border-radius: 29px;

    background:
        linear-gradient(
            145deg,
            #fffaf0,
            #fff0c1
        );
}


.sorting-progress {
    margin-bottom: 15px;

    color:
        var(--gold-800);

    font-size: 13px;
    font-weight: 800;

    text-align: center;
}


.sorting-card {
    min-height: 185px;

    padding: 24px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    border-radius: 24px;

    background: white;

    box-shadow:
        0 13px 30px
        rgba(131, 87, 22, 0.11);
}


.sorting-emoji {
    font-size: 61px;
}


.sorting-card strong {
    margin-top: 10px;

    font-family:
        "Fredoka",
        sans-serif;

    font-size: 30px;
}


.sorting-card small {
    margin-top: 3px;

    color:
        var(--muted);
}


.pronoun-options,
.answer-options {
    margin-top: 18px;

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;
}


.pronoun-option,
.answer-option,
.word-tile,
.pair-card {
    cursor: pointer;

    border:
        2px solid
        transparent;

    background: white;

    color:
        var(--ink);

    font-weight: 800;

    box-shadow:
        0 8px 18px
        rgba(132, 87, 20, 0.08);

    transition:
        0.2s ease;
}


.pronoun-option {
    min-width: 66px;

    padding:
        12px 16px;

    border-radius: 15px;

    font-family:
        "Fredoka",
        sans-serif;

    font-size: 19px;
}


.pronoun-option:hover,
.answer-option:hover,
.word-tile:hover,
.pair-card:hover {
    transform:
        translateY(-2px);

    border-color:
        var(--gold-400);
}


.correct-choice {
    border-color:
        var(--green) !important;

    background:
        #eaf8ef !important;

    color:
        #36724d !important;
}


.wrong-choice {
    border-color:
        var(--red) !important;

    background:
        #fff0f0 !important;

    color:
        #a43e3e !important;
}


.activity-feedback {
    min-height: 28px;

    margin-top: 15px;

    font-weight: 800;

    text-align: center;
}


.feedback-correct {
    color:
        var(--green);
}


.feedback-wrong {
    color:
        var(--red);
}


/* =========================================
   VIDEO
========================================= */

.video-page,
.games-page,
.practice-page,
.review-page,
.finish-page {
    text-align: center;
}


.video-frame-wrap {
    position: relative;

    overflow: hidden;

    width:
        min(800px, 100%);

    aspect-ratio:
        16 / 9;

    margin: 0 auto;

    border:
        7px solid white;

    border-radius: 27px;

    background: #2e281e;

    box-shadow:
        0 18px 42px
        rgba(114, 76, 22, 0.18);
}


.video-frame-wrap iframe {
    width: 100%;
    height: 100%;

    border: 0;
}


.secondary-link-button {
    margin-top: 18px;

    padding:
        12px 18px;

    border-radius: 14px;

    background:
        var(--gold-100);

    color:
        var(--gold-900);

    font-weight: 800;
}


/* =========================================
   EXTERNAL GAMES
========================================= */

.external-games-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 20px;
}


.external-game-card {
    padding: 25px;

    display: flex;

    flex-direction: column;

    align-items: center;

    border:
        1px solid
        rgba(198, 135, 39, 0.17);

    border-radius: 27px;

    background:
        linear-gradient(
            145deg,
            #fffaf0,
            #ffedba
        );
}


.game-number {
    color:
        var(--gold-800);

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
}


.external-game-icon {
    margin-top: 14px;

    font-size: 53px;
}


.external-game-card h3 {
    margin:
        10px 0 7px;
}


.external-game-card p {
    margin:
        0 0 20px;

    flex: 1;

    color:
        var(--muted);

    line-height: 1.55;
}


.external-game-card a {
    padding:
        12px 18px;

    border-radius: 14px;

    background: white;

    color:
        var(--gold-900);

    font-weight: 800;

    text-decoration: none;
}


/* =========================================
   PRACTICE MAP
========================================= */

.practice-map {
    max-width: 760px;

    margin: 0 auto;

    display: flex;

    flex-direction: column;

    align-items: center;
}


.practice-level {
    width:
        min(460px, 100%);

    padding:
        19px 22px;

    display: grid;

    grid-template-columns:
        auto 1fr auto;

    grid-template-rows:
        auto auto;

    align-items: center;

    column-gap: 16px;

    cursor: pointer;

    border:
        2px solid
        rgba(199, 136, 41, 0.19);

    border-radius: 24px;

    background: white;

    color:
        var(--ink);

    text-align: left;

    box-shadow:
        0 12px 28px
        rgba(122, 81, 20, 0.09);

    transition:
        0.25s ease;
}


.practice-level:not(:disabled):hover {
    transform:
        scale(1.025);

    border-color:
        var(--gold-500);
}


.practice-level-icon {
    grid-row:
        1 / 3;

    width: 55px;
    height: 55px;

    display: grid;
    place-items: center;

    border-radius: 18px;

    background:
        var(--gold-200);

    font-size: 28px;
}


.practice-level strong {
    font-family:
        "Fredoka",
        sans-serif;

    font-size: 20px;
}


.practice-level small {
    color:
        var(--muted);
}


.level-status {
    grid-column: 3;
    grid-row:
        1 / 3;

    padding:
        7px 10px;

    border-radius: 999px;

    background:
        var(--gold-200);

    color:
        var(--gold-900);

    font-size: 10px;
    font-weight: 900;
}


.active-practice-level {
    border-color:
        var(--gold-500);

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #fff3ca
        );
}


.completed-level {
    border-color: #8dc59e;

    background: #f0fbf3;
}


.completed-level .level-status {
    background: #d7f2df;

    color: #39724e;
}


.locked-level {
    cursor: not-allowed;

    opacity: 0.58;
}


.practice-path-line {
    width: 6px;
    height: 26px;

    background:
        repeating-linear-gradient(
            to bottom,
            #e2b95e 0 7px,
            transparent 7px 12px
        );
}


/* =========================================
   GAME SCREEN
========================================= */

.game-back-button {
    display: block;

    margin:
        0 0 23px;

    padding:
        10px 14px;

    cursor: pointer;

    border-radius: 13px;

    background:
        var(--gold-100);

    color:
        var(--gold-900);

    font-weight: 800;
}


.game-heading {
    text-align: center;
}


.game-heading > p:last-child {
    color:
        var(--muted);
}


.game-progress-row {
    margin:
        20px 0 14px;

    display: flex;

    justify-content: space-between;

    color:
        var(--gold-900);

    font-size: 13px;
    font-weight: 800;
}


.game-workspace {
    min-height: 250px;

    padding: 25px;

    border:
        1px solid
        rgba(200, 137, 42, 0.17);

    border-radius: 27px;

    background:
        linear-gradient(
            145deg,
            #fffaf0,
            #fff1c5
        );
}


.question-card h3 {
    margin:
        0 0 9px;

    font-size:
        clamp(
            23px,
            3vw,
            31px
        );
}


.question-card > p {
    margin: 0;

    color:
        var(--muted);
}


.answer-option {
    min-width: 105px;

    padding:
        13px 17px;

    border-radius: 15px;
}


/* =========================================
   PAIR GAME
========================================= */

.pair-board {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 11px;
}


.pair-card {
    min-height: 75px;

    padding: 10px;

    border-radius: 16px;
}


.pair-card.flipped,
.pair-card.matched {
    background: #fff3c9;

    border-color:
        var(--gold-500);
}


.pair-card.matched {
    background: #e9f8ed;

    border-color:
        var(--green);
}


/* =========================================
   SENTENCE BUILDER
========================================= */

.builder-answer,
.builder-words {
    min-height: 72px;

    padding: 14px;

    display: flex;

    justify-content: center;
    align-items: center;

    flex-wrap: wrap;

    gap: 9px;

    border-radius: 17px;
}


.builder-answer {
    margin:
        15px 0;

    border:
        2px dashed
        #dfb75d;

    background:
        rgba(255, 255, 255, 0.65);
}


.word-tile {
    padding:
        11px 14px;

    border-radius: 13px;
}


.builder-actions {
    margin-top: 14px;

    display: flex;

    justify-content: center;

    gap: 10px;
}


.small-game-button {
    padding:
        11px 16px;

    cursor: pointer;

    border-radius: 13px;

    background:
        var(--gold-600);

    color: white;

    font-weight: 800;
}


.small-game-button.secondary {
    background: white;

    color:
        var(--gold-900);
}


/* =========================================
   STORY GAME
========================================= */

.story-box {
    max-width: 640px;

    margin:
        0 auto;

    padding: 21px;

    border-radius: 20px;

    background: white;

    font-size: 18px;

    line-height: 2;
}


.story-select {
    padding:
        6px 9px;

    border:
        2px solid
        #ebc56e;

    border-radius: 10px;

    background: #fffaf0;

    color:
        var(--ink);

    font-weight: 800;
}


/* =========================================
   REVIEW
========================================= */

.review-icon,
.finish-trophy {
    width: 90px;
    height: 90px;

    margin-bottom: 18px;

    border-radius: 29px;

    font-size: 47px;
}


.review-grid {
    margin-top: 28px;

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 12px;
}


.review-grid article {
    padding:
        17px 10px;

    display: flex;

    flex-direction: column;

    gap: 5px;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            #fff9e9,
            #ffedb8
        );
}


.review-grid strong {
    color:
        var(--gold-900);

    font-family:
        "Fredoka",
        sans-serif;

    font-size: 24px;
}


.review-grid span {
    color:
        var(--muted);

    font-size: 12px;
}


.review-reminder {
    margin-top: 20px;

    padding: 18px;

    border-radius: 18px;

    line-height: 1.6;
}


/* =========================================
   FINISH
========================================= */

.finish-page {
    position: relative;

    overflow: hidden;
}


.finish-page > * {
    position: relative;

    z-index: 1;
}


.finish-rays {
    position: absolute;

    z-index: 0;

    width: 520px;
    height: 520px;

    left: 50%;
    top: -290px;

    transform:
        translateX(-50%);

    border-radius: 50%;

    background:
        repeating-conic-gradient(
            rgba(248, 204, 99, 0.24)
            0 10deg,
            transparent
            10deg 22deg
        );
}


.finish-description {
    max-width: 560px;

    margin:
        12px auto 0;

    color:
        var(--muted);

    line-height: 1.65;
}


.finish-statistics {
    max-width: 440px;

    margin:
        27px auto;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 14px;
}


.finish-statistic {
    padding: 19px;

    display: grid;

    grid-template-columns:
        auto 1fr;

    align-items: center;

    column-gap: 9px;

    border-radius: 21px;

    background:
        var(--gold-100);
}


.finish-statistic > span {
    grid-row:
        1 / 3;

    font-size: 30px;
}


.finish-statistic strong {
    font-family:
        "Fredoka",
        sans-serif;

    font-size: 27px;
}


.finish-statistic small {
    color:
        var(--muted);
}


.finish-badge {
    max-width: 440px;

    margin: 0 auto;

    padding: 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 13px;

    border:
        2px solid
        #efc25e;

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            #fff9e8,
            #ffe49d
        );
}


.finish-badge-icon {
    font-size: 38px;
}


.finish-badge div {
    display: flex;

    flex-direction: column;

    text-align: left;
}


.finish-badge small {
    color:
        var(--gold-800);

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.4px;
}


.finish-link-button {
    margin-top: 28px;
}


/* =========================================
   ACHIEVEMENT
========================================= */

.achievement-toast {
    position: fixed;

    z-index: 20;

    right: 24px;
    bottom: 24px;

    width:
        min(
            370px,
            calc(100% - 34px)
        );

    padding: 17px;

    display: flex;

    align-items: center;

    gap: 13px;

    border:
        1px solid
        rgba(194, 132, 38, 0.2);

    border-radius: 21px;

    background: white;

    box-shadow:
        0 18px 45px
        rgba(106, 70, 17, 0.2);

    opacity: 0;

    pointer-events: none;

    transform:
        translateY(30px);

    transition:
        0.35s ease;
}


.achievement-toast.show-toast {
    opacity: 1;

    transform:
        translateY(0);
}


.achievement-toast-icon {
    font-size: 36px;
}


.achievement-toast small {
    color:
        var(--gold-700);

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.4px;
}


.achievement-toast strong,
.achievement-toast p {
    display: block;
}


.achievement-toast p {
    margin:
        3px 0 0;

    color:
        var(--muted);

    font-size: 12px;
}


/* =========================================
   SPARKLES AND CONFETTI
========================================= */

.sparkle-layer,
.confetti-layer {
    position: fixed;

    inset: 0;

    z-index: 30;

    overflow: hidden;

    pointer-events: none;
}


.sparkle,
.confetti-piece {
    position: absolute;

    animation:
        fall
        1.5s ease-out forwards;
}


.sparkle {
    font-size: 22px;
}


.confetti-piece {
    width: 10px;
    height: 18px;

    border-radius: 3px;
}


@keyframes fall {

    from {
        opacity: 1;

        transform:
            translateY(-30px)
            rotate(0deg);
    }

    to {
        opacity: 0;

        transform:
            translateY(100vh)
            rotate(600deg);
    }
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 820px) {

    .lesson-navigation {
        grid-template-columns:
            auto 1fr auto;
    }

    .number-groups,
    .external-games-grid {
        grid-template-columns:
            1fr;
    }

    .review-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .pair-board {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 570px) {

    .lesson-header {
        padding:
            10px 10px 0;
    }

    .lesson-navigation {
        padding: 10px;

        gap: 10px;

        border-radius: 18px;
    }

    .lesson-logo {
        padding:
            9px 12px;

        font-size: 18px;
    }

    .chapter-number {
        font-size: 8px;
    }

    .chapter-name {
        font-size: 14px;
    }

    .close-lesson-button {
        width: 38px;
        height: 38px;
    }

    .lesson-progress-area {
        width:
            calc(100% - 24px);
    }

    .lesson-application {
        width:
            calc(100% - 20px);

        padding-top: 20px;
    }

    .lesson-panel {
        padding:
            25px 17px;

        border-radius: 27px;
    }

    .page-heading,
    .centered-heading {
        flex-direction: column;

        text-align: center;
    }

    .replace-example {
        grid-template-columns:
            1fr;
    }

    .replace-arrow {
        transform:
            rotate(90deg);
    }

    .compare-strip,
    .finish-statistics {
        grid-template-columns:
            1fr;
    }

    .practice-level {
        padding: 15px;

        column-gap: 10px;
    }

    .practice-level-icon {
        width: 46px;
        height: 46px;

        font-size: 23px;
    }

    .level-status {
        padding:
            6px 8px;

        font-size: 8px;
    }

    .game-workspace,
    .sorting-station {
        padding: 17px;
    }

    .floating-symbol {
        display: none;
    }

}

/* =========================================================
   GRADE 4 — LESSON 1
   PREPOSITIONS OF TIME
   IN · ON · BEFORE · AFTER
========================================================= */


/* =========================================================
   1. LESSON PALETTE
========================================================= */

.lesson-body {

    --purple-900: #4f3b78;
    --purple-800: #60478d;
    --purple-700: #7557a6;
    --purple-600: #8968bb;
    --purple-500: #9d7dcc;
    --purple-400: #b49adb;
    --purple-300: #cbb8e8;
    --purple-200: #e0d5f2;
    --purple-100: #f4f0fa;

    --time-dark: #4f3b78;
    --time-main: #655181;
    --time-soft: #81748f;

    min-height: 100vh;
    margin: 0;

    color: var(--time-main);

    background:
        radial-gradient(
            circle at 10% 8%,
            rgba(181, 154, 219, 0.25),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 12%,
            rgba(210, 190, 236, 0.24),
            transparent 27%
        ),
        linear-gradient(
            180deg,
            #faf8fd 0%,
            #fefcff 45%,
            #f7f3fb 100%
        );

    overflow-x: hidden;
    position: relative;
}


/* =========================================================
   2. BACKGROUND DECORATIONS
========================================================= */

.background-shape {

    position: fixed;

    border-radius: 50%;

    pointer-events: none;

    z-index: 0;

    opacity: 0.5;

    filter: blur(1px);
}


.shape-one {

    width: 280px;
    height: 280px;

    top: 18%;
    left: -130px;

    background:
        rgba(180, 154, 218, 0.22);
}


.shape-two {

    width: 220px;
    height: 220px;

    right: -100px;
    top: 55%;

    background:
        rgba(198, 180, 225, 0.22);
}


.shape-three {

    width: 180px;
    height: 180px;

    left: 8%;
    bottom: -80px;

    background:
        rgba(224, 213, 242, 0.35);
}


.floating-symbol {

    position: fixed;

    width: 60px;
    height: 60px;

    display: grid;

    place-items: center;

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.68);

    border:
        1px solid
        rgba(137, 104, 187, 0.10);

    color:
        rgba(96, 71, 141, 0.30);

    font-family:
        "Fredoka",
        sans-serif;

    font-weight: 700;

    box-shadow:
        0 14px 30px
        rgba(92, 69, 130, 0.07);

    pointer-events: none;

    z-index: 0;
}


.float-one {

    left: 4%;
    top: 22%;

    transform:
        rotate(-10deg);
}


.float-two {

    right: 3%;
    top: 36%;

    transform:
        rotate(9deg);
}


.float-three {

    left: 3%;
    bottom: 10%;

    transform:
        rotate(7deg);
}


/* =========================================================
   3. HEADER
========================================================= */

.lesson-header {

    position: relative;

    z-index: 5;

    padding:
        18px 22px 0;
}


.lesson-navigation {

    width:
        min(
            1180px,
            100%
        );

    margin:
        0 auto;

    padding:
        13px 17px;

    display: grid;

    grid-template-columns:
        auto 1fr auto;

    align-items: center;

    gap: 18px;

    border:
        1px solid
        rgba(117, 87, 166, 0.14);

    border-radius: 24px;

    background:
        rgba(255, 255, 255, 0.90);

    backdrop-filter:
        blur(15px);

    box-shadow:
        0 13px 35px
        rgba(80, 60, 115, 0.08);
}


.lesson-logo {

    padding:
        11px 18px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            var(--purple-700),
            var(--purple-500)
        );

    color:
        #ffffff;

    font-size: 22px;

    font-weight: 800;

    letter-spacing: 2px;

    text-decoration: none;
}


.chapter-information {

    display: flex;

    flex-direction: column;

    gap: 2px;
}


.chapter-number {

    color:
        var(--purple-700);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.4px;
}


.chapter-name {

    color:
        var(--time-dark);

    font-family:
        "Fredoka",
        sans-serif;

    font-size: 18px;
}


.close-lesson-button {

    width: 44px;
    height: 44px;

    display: grid;

    place-items: center;

    border-radius: 15px;

    background:
        var(--purple-100);

    color:
        var(--purple-900);

    font-size: 28px;

    text-decoration: none;

    transition:
        0.25s ease;
}


.close-lesson-button:hover {

    background:
        var(--purple-200);

    transform:
        rotate(5deg);
}


/* =========================================================
   4. PROGRESS BAR
========================================================= */

.lesson-progress-area {

    position: relative;

    z-index: 4;

    width:
        min(
            1060px,
            calc(100% - 44px)
        );

    margin:
        18px auto 0;

    display: flex;

    align-items: center;

    gap: 14px;
}


.lesson-progress-track {

    height: 12px;

    flex: 1;

    overflow: hidden;

    border:
        1px solid
        rgba(117, 87, 166, 0.12);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.80);
}


.lesson-progress-fill {

    width: 10%;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--purple-500),
            var(--purple-300)
        );

    box-shadow:
        0 0 14px
        rgba(137, 104, 187, 0.30);

    transition:
        width 0.55s ease;
}


.lesson-progress-number {

    min-width: 58px;

    color:
        var(--purple-800);

    font-size: 13px;
}


/* =========================================================
   5. APPLICATION
========================================================= */

.lesson-application {

    position: relative;

    z-index: 2;

    width:
        min(
            1120px,
            calc(100% - 34px)
        );

    margin:
        0 auto;

    padding:
        30px 0 70px;
}


.lesson-panel {

    border-color:
        rgba(117, 87, 166, 0.14);

    background:
        rgba(255, 255, 255, 0.93);

    box-shadow:
        0 22px 55px
        rgba(76, 57, 108, 0.10);
}


/* =========================================================
   6. TYPOGRAPHY
========================================================= */

h1,
h2,
h3 {

    color:
        var(--time-dark);
}


.screen-label {

    color:
        var(--purple-700);
}


.intro-lead,
.activity-instruction,
.video-intro,
.games-intro,
.map-message,
.question-card > p,
.finish-description {

    color:
        var(--time-soft);
}


/* =========================================================
   7. INTRO PAGE
========================================================= */

.intro-page::before {

    background:
        radial-gradient(
            circle,
            rgba(181, 154, 219, 0.22),
            transparent 70%
        );
}


.intro-sun,
.heading-icon,
.review-icon,
.finish-trophy {

    background:
        linear-gradient(
            145deg,
            var(--purple-100),
            var(--purple-200)
        );

    box-shadow:
        0 14px 28px
        rgba(92, 69, 130, 0.10);
}


.mission-card {

    border-color:
        rgba(117, 87, 166, 0.14);

    background:
        var(--purple-100);
}


/* =========================================================
   8. MAIN BUTTONS
========================================================= */

.main-action-button {

    background:
        linear-gradient(
            135deg,
            var(--purple-700),
            var(--purple-500)
        );

    color:
        #ffffff;

    box-shadow:
        0 13px 26px
        rgba(101, 77, 145, 0.20);
}


.secondary-link-button {

    background:
        var(--purple-100);

    color:
        var(--purple-900);
}


/* =========================================================
   9. TIME CARDS
========================================================= */

.time-rule-grid {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 18px;

    margin-top: 24px;
}


.time-rule-card {

    padding: 24px;

    border:
        1px solid
        rgba(117, 87, 166, 0.14);

    border-radius: 26px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f7f3fb
        );

    box-shadow:
        0 12px 26px
        rgba(76, 57, 108, 0.07);

    text-align: center;
}


.time-rule-icon {

    width: 64px;
    height: 64px;

    margin:
        0 auto 14px;

    display: grid;

    place-items: center;

    border-radius: 20px;

    background:
        var(--purple-100);

    font-size: 32px;
}


.time-rule-card h3 {

    margin:
        0 0 10px;

    color:
        var(--purple-800);

    font-size: 25px;
}


.time-rule-card p {

    margin: 0;

    color:
        var(--time-soft);

    line-height: 1.6;
}


.time-example {

    margin-top: 15px;

    padding:
        12px 14px;

    border-radius: 15px;

    background:
        var(--purple-100);

    color:
        var(--purple-900);

    font-weight: 800;
}


/* =========================================================
   10. EXPLANATION CARDS
========================================================= */

.explanation-card,
.golden-tip,
.important-note,
.review-reminder {

    border-color:
        rgba(117, 87, 166, 0.14);

    background:
        var(--purple-100);
}


.replace-example {

    border:
        1px solid
        rgba(117, 87, 166, 0.10);

    background:
        #ffffff;
}


.replace-arrow {

    color:
        var(--purple-700);
}


mark {

    background:
        var(--purple-200);

    color:
        var(--purple-900);
}


/* =========================================================
   11. TIME TABLE
========================================================= */

.time-table-wrap {

    margin-top: 22px;

    overflow-x: auto;

    border:
        1px solid
        rgba(117, 87, 166, 0.14);

    border-radius: 24px;
}


.time-table {

    width: 100%;

    min-width: 720px;

    border-collapse: collapse;

    background:
        #ffffff;
}


.time-table th,
.time-table td {

    padding:
        15px 14px;

    border-bottom:
        1px solid
        #eee8f5;

    text-align: left;

    vertical-align: middle;
}


.time-table th {

    background:
        linear-gradient(
            135deg,
            var(--purple-600),
            var(--purple-400)
        );

    color:
        #ffffff;

    font-size: 13px;
}


.time-table tbody tr:last-child td {

    border-bottom: 0;
}


.time-table tbody tr:hover {

    background:
        #faf8fd;
}


.preposition-chip {

    min-width: 70px;

    padding:
        8px 13px;

    display: inline-grid;

    place-items: center;

    border-radius: 14px;

    background:
        var(--purple-100);

    color:
        var(--purple-900);

    font-family:
        "Fredoka",
        sans-serif;

    font-size: 18px;

    font-weight: 700;
}


/* =========================================================
   12. SPEAK BUTTON
========================================================= */

.speak-button {

    background:
        var(--purple-100);
}


.speak-button:hover,
.speak-button.speaking {

    background:
        var(--purple-300);
}


/* =========================================================
   13. SORTING STATION
========================================================= */

.sorting-station {

    border-color:
        rgba(117, 87, 166, 0.14);

    background:
        linear-gradient(
            145deg,
            #fbf9fd,
            #f1ebf8
        );
}


.sorting-progress {

    color:
        var(--purple-800);
}


.sorting-card {

    box-shadow:
        0 13px 30px
        rgba(76, 57, 108, 0.09);
}


.sorting-card strong {

    color:
        var(--purple-900);
}


.sorting-card small {

    color:
        var(--time-soft);
}


/* =========================================================
   14. OPTIONS
========================================================= */

.pronoun-option,
.answer-option,
.word-tile,
.pair-card,
.time-option {

    border-color:
        transparent;

    background:
        #ffffff;

    color:
        var(--time-main);

    box-shadow:
        0 8px 18px
        rgba(76, 57, 108, 0.07);
}


.pronoun-option:hover,
.answer-option:hover,
.word-tile:hover,
.pair-card:hover,
.time-option:hover {

    border-color:
        var(--purple-400);
}


/* =========================================================
   15. VIDEO
========================================================= */

.video-frame-wrap {

    border-color:
        #ffffff;

    box-shadow:
        0 18px 42px
        rgba(76, 57, 108, 0.14);
}


/* =========================================================
   16. EXTERNAL GAMES
========================================================= */

.external-game-card {

    border-color:
        rgba(117, 87, 166, 0.14);

    background:
        linear-gradient(
            145deg,
            #fbf9fd,
            #f1ebf8
        );
}


.game-number {

    color:
        var(--purple-700);
}


.external-game-card p {

    color:
        var(--time-soft);
}


.external-game-card a {

    color:
        var(--purple-900);
}


/* =========================================================
   17. PRACTICE MAP
========================================================= */

.practice-level {

    border-color:
        rgba(117, 87, 166, 0.16);

    color:
        var(--time-main);

    box-shadow:
        0 12px 28px
        rgba(76, 57, 108, 0.07);
}


.practice-level:not(:disabled):hover {

    border-color:
        var(--purple-500);
}


.practice-level-icon {

    background:
        var(--purple-100);
}


.practice-level strong {

    color:
        var(--purple-900);
}


.practice-level small {

    color:
        var(--time-soft);
}


.level-status {

    background:
        var(--purple-100);

    color:
        var(--purple-900);
}


.active-practice-level {

    border-color:
        var(--purple-500);

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f4f0fa
        );
}


.practice-path-line {

    background:
        repeating-linear-gradient(
            to bottom,
            var(--purple-300) 0 7px,
            transparent 7px 12px
        );
}


/* =========================================================
   18. GAME SCREEN
========================================================= */

.game-back-button {

    background:
        var(--purple-100);

    color:
        var(--purple-900);
}


.game-progress-row {

    color:
        var(--purple-800);
}


.game-workspace {

    border-color:
        rgba(117, 87, 166, 0.14);

    background:
        linear-gradient(
            145deg,
            #fbf9fd,
            #f1ebf8
        );
}


/* =========================================================
   19. PAIR GAME
========================================================= */

.pair-card.flipped,
.pair-card.matched {

    background:
        var(--purple-100);

    border-color:
        var(--purple-500);
}


.pair-card.matched {

    background:
        #edf8f0;

    border-color:
        var(--green);
}


/* =========================================================
   20. SENTENCE BUILDER
========================================================= */

.builder-answer {

    border-color:
        var(--purple-300);

    background:
        rgba(255, 255, 255, 0.72);
}


.small-game-button {

    background:
        var(--purple-700);
}


.small-game-button.secondary {

    background:
        #ffffff;

    color:
        var(--purple-900);
}


/* =========================================================
   21. STORY
========================================================= */

.story-box {

    box-shadow:
        0 10px 24px
        rgba(76, 57, 108, 0.07);
}


.story-select {

    border-color:
        var(--purple-300);

    background:
        #faf8fd;

    color:
        var(--time-main);
}


/* =========================================================
   22. REVIEW
========================================================= */

.review-grid article {

    background:
        linear-gradient(
            145deg,
            #faf8fd,
            #eee7f6
        );
}


.review-grid strong {

    color:
        var(--purple-900);
}


.review-grid span {

    color:
        var(--time-soft);
}


/* =========================================================
   23. FINISH
========================================================= */

.finish-rays {

    background:
        repeating-conic-gradient(
            rgba(181, 154, 219, 0.16)
            0 10deg,
            transparent
            10deg 22deg
        );
}


.finish-statistic {

    background:
        var(--purple-100);
}


.finish-statistic strong {

    color:
        var(--purple-900);
}


.finish-statistic small {

    color:
        var(--time-soft);
}


.finish-badge {

    border-color:
        var(--purple-300);

    background:
        linear-gradient(
            145deg,
            #faf8fd,
            #e9e0f4
        );
}


.finish-badge small {

    color:
        var(--purple-700);
}


/* =========================================================
   24. ACHIEVEMENT TOAST
========================================================= */

.achievement-toast {

    border-color:
        rgba(117, 87, 166, 0.18);

    box-shadow:
        0 18px 45px
        rgba(76, 57, 108, 0.16);
}


.achievement-toast small {

    color:
        var(--purple-700);
}


.achievement-toast p {

    color:
        var(--time-soft);
}


/* =========================================================
   25. SPECIAL TIME EXAMPLES
========================================================= */

.time-example-grid {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 16px;

    margin-top: 22px;
}


.time-example-card {

    padding: 20px;

    border:
        1px solid
        rgba(117, 87, 166, 0.13);

    border-radius: 22px;

    background:
        #ffffff;

    box-shadow:
        0 9px 22px
        rgba(76, 57, 108, 0.06);
}


.time-example-card strong {

    display: block;

    margin-bottom: 7px;

    color:
        var(--purple-900);

    font-family:
        "Fredoka",
        sans-serif;

    font-size: 21px;
}


.time-example-card p {

    margin: 0;

    color:
        var(--time-soft);

    line-height: 1.55;
}


/* =========================================================
   26. RULE STRIP
========================================================= */

.rule-strip {

    margin-top: 20px;

    padding: 18px;

    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    border-radius: 20px;

    background:
        var(--purple-100);
}


.rule-strip span {

    padding:
        9px 13px;

    border-radius: 13px;

    background:
        #ffffff;

    color:
        var(--purple-900);

    font-weight: 800;

    box-shadow:
        0 6px 14px
        rgba(76, 57, 108, 0.05);
}


/* =========================================================
   27. MOBILE
========================================================= */

@media (max-width: 820px) {

    .time-rule-grid,
    .time-example-grid {

        grid-template-columns:
            1fr;
    }

}


@media (max-width: 570px) {

    .lesson-header {

        padding:
            10px 10px 0;
    }


    .lesson-navigation {

        padding: 10px;

        gap: 10px;

        border-radius: 18px;
    }


    .lesson-logo {

        padding:
            9px 12px;

        font-size: 18px;
    }


    .chapter-number {

        font-size: 8px;
    }


    .chapter-name {

        font-size: 14px;
    }


    .close-lesson-button {

        width: 38px;
        height: 38px;
    }


    .lesson-progress-area {

        width:
            calc(100% - 24px);
    }


    .lesson-application {

        width:
            calc(100% - 20px);

        padding-top: 20px;
    }


    .time-rule-card,
    .time-example-card {

        padding: 18px;
    }


    .floating-symbol {

        display: none;
    }

}