/* =========================================================
   YEW — GRADE 4
   LESSON 11 — READING & STORY CHALLENGE
   ========================================================= */


/* =========================================================
   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 48%,
            #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: 100px;
    left: -250px;

    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: 350px;
    height: 350px;

    bottom: -190px;
    left: 20%;

    background: rgba(218, 210, 250, 0.25);
}


/* =========================================================
   3. FLOATING SYMBOLS
   ========================================================= */

.floating-symbol {
    position: fixed;
    z-index: -2;

    color: rgba(113, 86, 187, 0.10);

    font-size: 40px;
    font-weight: 900;

    pointer-events: none;
    user-select: none;
}

.symbol-one {
    top: 25%;
    left: 5%;

    transform: rotate(-13deg);
}

.symbol-two {
    top: 20%;
    right: 6%;

    transform: rotate(12deg);
}

.symbol-three {
    bottom: 14%;
    left: 7%;

    transform: rotate(8deg);
}

.symbol-four {
    right: 7%;
    bottom: 15%;

    transform: rotate(-9deg);
}


/* =========================================================
   4. HEADER
   ========================================================= */

.lesson-navigation {
    width: 100%;
    height: 70px;

    padding: 0 34px;

    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(255, 255, 255, 0.93);

    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;
}

.close-lesson-button {
    width: 39px;
    height: 39px;

    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);
}


/* =========================================================
   5. 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;
}


/* =========================================================
   6. LESSON 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);
    }
}


/* =========================================================
   7. 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);
}


/* =========================================================
   8. LABELS
   ========================================================= */

.screen-label,
.activity-progress,
.challenge-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;
}

.challenge-label {
    color: #654ba9;

    background: #ece6fa;
}


/* =========================================================
   9. TYPOGRAPHY
   ========================================================= */

.lesson-panel h1 {
    margin-bottom: 14px;

    color: #302941;

    font-size: clamp(34px, 5vw, 52px);
    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;
    line-height: 1.35;
}

.screen-introduction {
    max-width: 690px;

    margin: 0 auto 30px;

    color: #716a7d;

    font-size: 16px;
    line-height: 1.7;
}

.screen-introduction strong {
    color: #57457c;
}


/* =========================================================
   10. INTRO
   ========================================================= */

.intro-panel {
    padding-top: 52px;
}

.intro-icon {
    width: 96px;
    height: 96px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            #f3efff,
            #e9e2fb
        );

    font-size: 47px;

    box-shadow:
        0 12px 26px rgba(95, 70, 164, 0.11);
}

.intro-feature-grid {
    max-width: 650px;

    margin: 29px auto 10px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 13px;
}

.intro-feature-card {
    min-height: 145px;

    padding: 21px 14px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border:
        1px solid #eee9f7;

    border-radius: 20px;

    background: #faf9fd;
}

.intro-feature-card span {
    font-size: 32px;
}

.intro-feature-card strong {
    color: #4e406d;

    font-size: 16px;
}

.intro-feature-card small {
    color: #91899e;

    font-size: 12px;
}


/* =========================================================
   11. MAIN BUTTONS
   ========================================================= */

.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: 18px;
}

.hidden-button {
    display: none !important;
}


/* =========================================================
   12. HOW TO READ
   ========================================================= */

.reading-rule-box {
    max-width: 740px;

    margin: 5px auto 22px;

    padding: 24px;

    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;

    gap: 22px;

    text-align: left;

    border:
        1px solid #e9e3f4;

    border-radius: 21px;

    background: #faf8fe;
}

.rule-big-icon {
    width: 82px;
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 22px;

    background: #eee9fa;

    font-size: 39px;
}

.rule-content p {
    margin-top: 7px;

    color: #756c80;

    font-size: 14px;
    line-height: 1.6;
}

.question-chips {
    margin-top: 14px;

    display: flex;
    flex-wrap: wrap;

    gap: 7px;
}

.question-chips span {
    padding: 7px 10px;

    border-radius: 999px;

    color: #6952a4;

    background: #eee8fa;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.6px;
}


/* =========================================================
   13. NOTES
   ========================================================= */

.important-note,
.golden-tip,
.final-message {
    max-width: 760px;

    margin: 24px auto 5px;

    padding: 17px 20px;

    display: flex;
    align-items: flex-start;

    gap: 13px;

    text-align: left;

    border-radius: 17px;
}

.important-note {
    border:
        1px solid #e5def8;

    background: #f5f1fd;
}

.golden-tip {
    border:
        1px solid #eee1ba;

    background: #fffaf0;
}

.final-message {
    border:
        1px solid #e2dbf4;

    background: #f7f4fd;
}

.important-note > span,
.golden-tip > span,
.final-message > span {
    flex: 0 0 auto;

    font-size: 22px;
}

.important-note p,
.golden-tip p,
.final-message p {
    color: #665e70;

    font-size: 14px;
    line-height: 1.65;
}

.important-note strong,
.final-message strong {
    color: #58427f;
}

.golden-tip strong {
    color: #735f2d;
}


/* =========================================================
   14. STORY DETECTIVE
   ========================================================= */

.detective-grid {
    max-width: 800px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(5, 1fr);

    gap: 11px;
}

.detective-card {
    min-height: 190px;

    padding: 20px 12px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border:
        1px solid #ece7f3;

    border-radius: 19px;

    background: #faf9fc;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.detective-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 20px rgba(70, 51, 112, 0.07);
}

.detective-card > span {
    margin-bottom: 9px;

    font-size: 31px;
}

.detective-card strong {
    color: #59437e;

    font-size: 15px;
}

.detective-card small {
    margin-top: 3px;

    color: #94899f;

    font-size: 11px;
}

.detective-card p {
    margin-top: 10px;

    color: #766e7f;

    font-size: 11px;
    line-height: 1.5;
}


/* =========================================================
   15. UNKNOWN WORDS
   ========================================================= */

.unknown-word-example {
    max-width: 720px;

    margin: 0 auto 22px;

    padding: 25px;

    border:
        1px solid #e9e4f2;

    border-radius: 21px;

    background: #faf9fc;
}

.example-sentence {
    padding: 16px 18px;

    border-radius: 14px;

    color: #51475d;

    background: #ffffff;

    font-size: 16px;
    font-weight: 650;
    line-height: 1.7;
}

.example-sentence mark {
    padding: 2px 6px;

    border-radius: 6px;

    color: #5f478a;

    background: #eee6fc;
}

.context-arrow {
    margin: 10px 0;

    color: #8875b3;

    font-size: 25px;
    font-weight: 900;
}

.unknown-word-example > p {
    max-width: 570px;

    margin: 0 auto;

    color: #716879;

    font-size: 14px;
    line-height: 1.65;
}

.meaning-result {
    width: fit-content;

    margin: 16px auto 0;

    padding: 10px 16px;

    border-radius: 12px;

    color: #604a86;

    background: #eee8fa;

    font-size: 14px;
    font-weight: 800;
}

.reading-steps {
    max-width: 720px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}

.reading-step {
    min-height: 110px;

    padding: 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border:
        1px solid #ece7f3;

    border-radius: 17px;

    background: #faf9fc;
}

.reading-step span {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    color: #ffffff;

    background: #8068c8;

    font-size: 11px;
    font-weight: 900;
}

.reading-step p {
    color: #716879;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   16. STORY CARDS
   ========================================================= */

.story-card {
    max-width: 760px;

    margin: 4px auto 22px;

    padding: 26px;

    display: grid;
    grid-template-columns: 80px 1fr;

    gap: 23px;

    text-align: left;

    border:
        1px solid #e8e3f0;

    border-radius: 22px;

    background: #faf9fc;
}

.short-story {
    max-width: 720px;
}

.story-picture {
    width: 74px;
    height: 74px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: sticky;
    top: 110px;

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #f1edfa,
            #e8e1f7
        );

    font-size: 36px;
}

.story-content {
    color: #5e5668;

    font-size: 14px;
    line-height: 1.8;
}

.story-content p + p {
    margin-top: 11px;
}

.story-content strong {
    color: #4d3b69;
}


/* =========================================================
   17. LISTEN BUTTON
   ========================================================= */

.listen-button {
    min-height: 45px;

    padding: 11px 19px;

    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);
}


/* =========================================================
   18. 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-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.7;
}

.activity-option.correct:disabled {
    opacity: 1;
}


/* =========================================================
   19. 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: 80px;

    font-size: 16px;
}


/* =========================================================
   20. FIND THE CLUE
   ========================================================= */

.clue-quote,
.clue-reminder {
    max-width: 620px;

    margin: 5px auto 22px;

    padding: 18px 21px;

    position: relative;

    border:
        1px solid #ded5f1;

    border-radius: 17px;

    color: #58486f;

    background: #f5f1fc;

    font-size: 14px;
    font-weight: 650;
    line-height: 1.7;

    text-align: left;
}

.clue-quote::before {
    content: "🔍";

    margin-right: 9px;
}

.clue-reminder p {
    margin: 0;
}


/* =========================================================
   21. CONTEXT
   ========================================================= */

.context-example {
    max-width: 670px;

    margin: 5px auto 18px;

    padding: 23px;

    border:
        1px solid #e6e0ef;

    border-radius: 19px;

    background: #faf9fc;
}

.context-example p {
    color: #554b60;

    font-size: 17px;
    line-height: 1.7;
}

.context-example strong {
    padding: 2px 6px;

    border-radius: 6px;

    color: #634d8b;

    background: #eee7fb;
}

.context-explanation {
    max-width: 670px;

    margin: 0 auto;

    padding: 18px 20px;

    display: flex;
    align-items: flex-start;

    gap: 14px;

    text-align: left;

    border-radius: 17px;

    background: #f5f2fa;
}

.context-explanation > span {
    flex: 0 0 auto;

    font-size: 27px;
}

.context-explanation p {
    color: #6e6577;

    font-size: 13px;
    line-height: 1.6;
}

.context-explanation p + p {
    margin-top: 7px;
}

.context-explanation strong {
    color: #59457c;
}


/* =========================================================
   22. MAIN IDEA
   ========================================================= */

.main-idea-icon,
.prediction-icon {
    width: 84px;
    height: 84px;

    margin: 2px auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 24px;

    background: #f1edfa;

    font-size: 39px;
}

.main-idea-example {
    max-width: 690px;

    margin: 0 auto;

    padding: 22px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 10px;

    border:
        1px solid #ebe6f2;

    border-radius: 20px;

    background: #faf9fc;
}

.small-detail {
    min-height: 70px;

    padding: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid #eeeaf3;

    border-radius: 13px;

    color: #7a7183;

    background: #ffffff;

    font-size: 12px;
    line-height: 1.5;
}

.idea-arrow {
    grid-column: 1 / -1;

    color: #8b7aa9;

    font-size: 24px;
    font-weight: 900;
}

.big-idea {
    grid-column: 1 / -1;

    padding: 16px;

    border-radius: 14px;

    color: #594578;

    background: #eee8fa;

    font-size: 14px;
    font-weight: 800;
    line-height: 1.55;
}


/* =========================================================
   23. STORY STRUCTURE
   ========================================================= */

.story-structure {
    max-width: 790px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr 35px 1fr 35px 1fr;
    align-items: center;

    gap: 7px;
}

.structure-card {
    min-height: 250px;

    padding: 20px 15px;

    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border:
        1px solid #eae5f2;

    border-radius: 20px;

    background: #faf9fc;
}

.structure-number {
    width: 27px;
    height: 27px;

    position: absolute;
    top: 12px;
    left: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    color: #ffffff;

    background: #8168c8;

    font-size: 10px;
    font-weight: 900;
}

.structure-icon {
    margin-bottom: 10px;

    font-size: 35px;
}

.structure-card strong {
    color: #59447d;

    font-size: 14px;
}

.structure-card small {
    margin-top: 3px;

    color: #978da2;

    font-size: 11px;
}

.structure-card p {
    margin-top: 13px;

    color: #776e80;

    font-size: 11px;
    line-height: 1.55;
}

.structure-arrow {
    color: #a194ae;

    font-size: 22px;
    font-weight: 900;
}


/* =========================================================
   24. PREDICTION
   ========================================================= */

.word-definition {
    max-width: 590px;

    margin: 0 auto 19px;

    padding: 16px 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    border:
        1px solid #e6dff2;

    border-radius: 16px;

    background: #f7f4fc;
}

.word-definition strong {
    color: #5c4681;

    font-size: 18px;
}

.word-definition > span {
    color: #9a8da7;

    font-weight: 900;
}

.word-definition p {
    color: #716879;

    font-size: 13px;
}

.prediction-story {
    max-width: 650px;

    margin: 0 auto;

    padding: 21px 23px;

    text-align: left;

    border:
        1px solid #e8e3ef;

    border-radius: 18px;

    background: #faf9fc;
}

.prediction-story p {
    color: #595061;

    font-size: 15px;
    line-height: 1.75;
}


/* =========================================================
   25. BIG READING
   ========================================================= */

.reading-reminder {
    max-width: 650px;

    margin: 0 auto 17px;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 8px;
}

.reading-reminder span {
    padding: 7px 11px;

    border-radius: 999px;

    color: #6954a0;

    background: #f0ebfa;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.6px;
}

.big-story {
    max-width: 790px;

    background:
        linear-gradient(
            145deg,
            #fbfafd,
            #f8f6fc
        );
}


/* =========================================================
   26. REVIEW
   ========================================================= */

.review-grid {
    max-width: 730px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}

.review-card {
    min-height: 145px;

    padding: 18px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border:
        1px solid #ece7f2;

    border-radius: 18px;

    background: #faf9fc;
}

.review-card span {
    margin-bottom: 7px;

    font-size: 29px;
}

.review-card strong {
    color: #5b487d;

    font-size: 11px;
    letter-spacing: 0.7px;
}

.review-card p {
    margin-top: 5px;

    color: #8e8598;

    font-size: 11px;
    line-height: 1.5;
}


/* =========================================================
   27. FINAL STORY
   ========================================================= */

.final-story-panel {
    max-width: 900px;
}

.final-book-icon {
    width: 88px;
    height: 88px;

    margin: 2px auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 25px;

    background:
        linear-gradient(
            145deg,
            #f0ebfb,
            #e6ddf7
        );

    font-size: 43px;

    box-shadow:
        0 10px 23px rgba(81, 60, 139, 0.10);
}

.final-story-card {
    max-width: 760px;

    display: block;

    padding: 29px 32px;

    border-color: #ddd4ed;

    background:
        linear-gradient(
            145deg,
            #fcfbfe,
            #f8f5fd
        );
}

.final-story-card .story-content {
    font-size: 14px;
    line-height: 1.85;
}


/* =========================================================
   28. CHAPTER BOOK
   ========================================================= */

.chapter-map-panel {
    max-width: 820px;
}

.chapter-book {
    max-width: 640px;

    margin: 5px auto 10px;

    padding: 27px 30px;

    position: relative;

    border:
        1px solid #e0d8ee;

    border-radius: 23px;

    background:
        linear-gradient(
            145deg,
            #faf8fe,
            #f4f0fa
        );

    box-shadow:
        inset 0 0 30px rgba(78, 57, 127, 0.025);
}

.chapter-book::before {
    content: "📖";

    width: 44px;
    height: 44px;

    position: absolute;
    top: -19px;
    left: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateX(-50%);

    border:
        1px solid #e2d9f0;

    border-radius: 50%;

    background: #ffffff;

    font-size: 22px;

    box-shadow:
        0 5px 13px rgba(70, 52, 110, 0.08);
}

.story-chapter {
    width: 100%;
    min-height: 75px;

    padding: 12px 16px;

    display: grid;
    grid-template-columns: 47px 1fr 35px;
    align-items: center;

    gap: 13px;

    text-align: left;

    border:
        1px solid #ebe7ef;

    border-radius: 16px;

    color: #9c95a4;

    background: #f8f7f9;

    opacity: 0.65;

    cursor: not-allowed;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease;
}

.story-chapter.unlocked {
    color: #50415f;

    border-color: #d9ceec;

    background: #ffffff;

    opacity: 1;

    cursor: pointer;
}

.story-chapter.unlocked:hover {
    transform: translateX(4px);

    border-color: #c8b8e4;

    box-shadow:
        0 7px 18px rgba(70, 51, 112, 0.08);
}

.story-chapter.completed {
    color: #497054;

    border-color: #c7e0ce;

    background: #f2f8f4;

    opacity: 1;

    cursor: pointer;
}

.chapter-icon {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #efecf2;

    font-size: 22px;
}

.story-chapter.unlocked .chapter-icon {
    background: #eee8f9;
}

.story-chapter.completed .chapter-icon {
    background: #e1f1e5;
}

.chapter-info {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.chapter-info small {
    color: #9a91a4;

    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
}

.chapter-info strong {
    font-size: 14px;
}

.chapter-status {
    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f0edf3;

    font-size: 12px;
}

.story-chapter.unlocked .chapter-status {
    color: #ffffff;

    background: #7b62c2;
}

.story-chapter.completed .chapter-status {
    color: #427151;

    background: #cce8d3;
}

.chapter-line {
    width: 2px;
    height: 19px;

    margin: 0 auto;

    background:
        repeating-linear-gradient(
            180deg,
            #cfc5dd 0,
            #cfc5dd 4px,
            transparent 4px,
            transparent 7px
        );
}

.final-chapter.unlocked {
    border-color: #e3d39c;

    background: #fffdf7;
}

.final-chapter.unlocked .chapter-icon {
    background: #fff3c9;
}

.chapter-message {
    min-height: 27px;

    margin-top: 15px;

    color: #74638e;

    font-size: 13px;
    font-weight: 700;
}


/* =========================================================
   29. FINAL CHALLENGE
   ========================================================= */

.final-challenge-panel {
    max-width: 820px;
}

.final-challenge-icon {
    width: 90px;
    height: 90px;

    margin: 2px auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 26px;

    background:
        linear-gradient(
            145deg,
            #f1ecfb,
            #e6ddf6
        );

    font-size: 40px;

    box-shadow:
        0 10px 24px rgba(80, 58, 139, 0.10);
}


/* =========================================================
   30. COMPLETION
   ========================================================= */

.completion-panel {
    max-width: 820px;

    padding-top: 52px;
}

.completion-trophy {
    width: 106px;
    height: 106px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            #fff8dc,
            #f8e9ad
        );

    font-size: 52px;

    box-shadow:
        0 12px 28px rgba(164, 128, 44, 0.12);
}

.completion-text {
    max-width: 620px;

    margin: 0 auto 26px;

    color: #71687c;

    font-size: 15px;
    line-height: 1.7;
}

.completion-text strong {
    color: #554274;
}

.achievement-card {
    max-width: 530px;

    margin: 0 auto 22px;

    padding: 18px 21px;

    display: flex;
    align-items: center;

    gap: 16px;

    text-align: left;

    border:
        1px solid #e4dcf5;

    border-radius: 19px;

    background:
        linear-gradient(
            135deg,
            #f4f0fd,
            #fbf9ff
        );
}

.achievement-icon {
    width: 63px;
    height: 63px;

    flex: 0 0 63px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #ffffff;

    font-size: 31px;

    box-shadow:
        0 7px 18px rgba(70, 51, 112, 0.07);
}

.achievement-card > div:last-child {
    display: flex;
    flex-direction: column;
}

.achievement-card small {
    margin-bottom: 3px;

    color: #9587ab;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.achievement-card strong {
    color: #554075;

    font-size: 18px;
}

.achievement-card p {
    margin-top: 3px;

    color: #9990a3;

    font-size: 11px;
}

.completion-skills {
    max-width: 650px;

    margin: 0 auto 5px;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 8px;
}

.completion-skills div {
    padding: 8px 12px;

    border:
        1px solid #ece7f2;

    border-radius: 999px;

    color: #766d7f;

    background: #f8f6fa;

    font-size: 11px;
    font-weight: 700;
}

.completion-skills span {
    margin-right: 4px;

    color: #66a377;
}

.finish-lesson-button {
    margin-top: 25px;
}


/* =========================================================
   31. GENERAL BUTTON STATES
   ========================================================= */

button:disabled {
    cursor: default;
}

button:focus-visible,
a:focus-visible {
    outline:
        3px solid rgba(124, 99, 195, 0.25);

    outline-offset: 3px;
}


/* =========================================================
   32. TABLET
   ========================================================= */

@media (max-width: 850px) {

    .lesson-panel {
        padding:
            38px 34px
            40px;
    }

    .detective-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .review-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .story-structure {
        grid-template-columns:
            1fr 25px 1fr 25px 1fr;
    }

    .structure-card {
        min-height: 270px;
    }
}


/* =========================================================
   33. SMALL TABLET
   ========================================================= */

@media (max-width: 680px) {

    .lesson-navigation {
        height: 65px;

        padding: 0 18px;
    }

    .lesson-logo {
        width: 39px;
        height: 39px;
    }

    .chapter-number {
        font-size: 8px;
    }

    .chapter-name {
        font-size: 12px;
    }

    .lesson-progress-wrapper {
        width: calc(100% - 28px);
    }

    .lesson-screen {
        padding:
            25px 13px
            55px;
    }

    .lesson-panel {
        padding:
            32px 20px
            35px;

        border-radius: 22px;
    }

    .intro-feature-grid {
        grid-template-columns: 1fr;
    }

    .intro-feature-card {
        min-height: 110px;
    }

    .reading-rule-box {
        grid-template-columns: 1fr;

        text-align: center;
    }

    .rule-big-icon {
        margin: 0 auto;
    }

    .question-chips {
        justify-content: center;
    }

    .detective-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .reading-steps {
        grid-template-columns: 1fr;
    }

    .story-card {
        grid-template-columns: 1fr;
    }

    .story-picture {
        position: static;

        margin: 0 auto;
    }

    .activity-options {
        grid-template-columns: 1fr;
    }

    .true-false-options {
        grid-template-columns: 1fr;
    }

    .main-idea-example {
        grid-template-columns: 1fr;
    }

    .idea-arrow,
    .big-idea {
        grid-column: 1;
    }

    .story-structure {
        grid-template-columns: 1fr;

        gap: 9px;
    }

    .structure-card {
        min-height: 200px;
    }

    .structure-arrow {
        transform: rotate(90deg);
    }

    .word-definition {
        flex-direction: column;

        gap: 5px;
    }

    .review-grid {
        grid-template-columns: 1fr 1fr;
    }

    .chapter-book {
        padding:
            27px 18px
            20px;
    }
}


/* =========================================================
   34. MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .lesson-navigation {
        padding: 0 13px;
    }

    .lesson-brand {
        gap: 9px;
    }

    .chapter-name {
        max-width: 155px;

        overflow: hidden;

        white-space: nowrap;

        text-overflow: ellipsis;
    }

    .close-lesson-button {
        width: 35px;
        height: 35px;
    }

    .lesson-panel {
        padding:
            29px 15px
            32px;

        border-radius: 19px;
    }

    .screen-introduction {
        font-size: 14px;
    }

    .detective-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 9px;
    }

    .detective-card {
        min-height: 165px;

        padding:
            16px 8px;
    }

    .example-sentence {
        font-size: 14px;
    }

    .story-card {
        padding:
            19px 16px;

        gap: 15px;
    }

    .story-content {
        font-size: 13px;
        line-height: 1.75;
    }

    .final-story-card {
        padding:
            21px 17px;
    }

    .activity-question {
        font-size: 16px;
    }

    .activity-option {
        font-size: 13px;
    }

    .context-example p {
        font-size: 14px;
    }

    .review-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 9px;
    }

    .review-card {
        min-height: 130px;

        padding: 13px 8px;
    }

    .chapter-book {
        padding:
            27px 10px
            17px;
    }

    .story-chapter {
        grid-template-columns:
            39px 1fr 30px;

        min-height: 69px;

        padding: 10px;

        gap: 9px;
    }

    .chapter-icon {
        width: 38px;
        height: 38px;

        font-size: 19px;
    }

    .chapter-info strong {
        font-size: 12px;
    }

    .chapter-info small {
        font-size: 7px;
    }

    .chapter-status {
        width: 28px;
        height: 28px;
    }

    .achievement-card {
        padding: 15px;
    }

    .achievement-icon {
        width: 55px;
        height: 55px;

        flex-basis: 55px;
    }

    .main-action-button {
        width: 100%;

        min-width: 0;
    }
}


/* =========================================================
   35. VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .detective-grid,
    .review-grid {
        grid-template-columns: 1fr;
    }

    .detective-card,
    .review-card {
        min-height: 130px;
    }

    .chapter-name {
        max-width: 120px;
    }

    .story-chapter {
        grid-template-columns:
            36px 1fr 27px;
    }

    .chapter-icon {
        width: 35px;
        height: 35px;
    }
}