/* =========================================================
   YEW — GRADE 4 — LESSON 2
   QUESTION WORDS

   VISUAL SYSTEM: GRADE 4 — LESSON 1
========================================================= */


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;

    font-family:
        "Nunito",
        "Segoe UI",
        Arial,
        sans-serif;

    color: #62576e;

    background:
        radial-gradient(
            circle at 10% 8%,
            rgba(180, 154, 219, 0.24),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 12%,
            rgba(203, 184, 232, 0.22),
            transparent 27%
        ),
        linear-gradient(
            180deg,
            #faf7fd 0%,
            #fdfbff 45%,
            #f6f1fb 100%
        );

    overflow-x: hidden;
}

button,
a,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   COLORS
========================================================= */

:root {
    --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;
    --purple-50: #faf7fd;

    --lesson-text: #62576e;
    --lesson-muted: #81768c;

    --success: #43a97b;
    --success-dark: #2f8d65;
    --success-light: #eaf8f1;

    --error: #d96b79;
    --error-dark: #bd5362;
    --error-light: #fff0f2;

    --white: #ffffff;

    --panel-shadow:
        0 18px 50px rgba(79, 59, 120, 0.08);

    --card-shadow:
        0 8px 22px rgba(79, 59, 120, 0.07);
}


/* =========================================================
   BODY
========================================================= */

.question-words-body {
    position: relative;

    min-height: 100vh;

    margin: 0;
    padding: 0;

    color: var(--lesson-text);

    background:
        radial-gradient(
            circle at 10% 8%,
            rgba(180, 154, 219, 0.24),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 12%,
            rgba(203, 184, 232, 0.22),
            transparent 27%
        ),
        linear-gradient(
            180deg,
            #faf7fd 0%,
            #fdfbff 45%,
            #f6f1fb 100%
        );

    overflow-x: hidden;
}


/* =========================================================
   BACKGROUND DECORATIONS
========================================================= */

.background-shape {
    position: fixed;

    z-index: -2;

    pointer-events: none;

    border-radius: 50%;
}

.shape-one {
    top: 180px;
    left: -145px;

    width: 330px;
    height: 330px;

    background:
        linear-gradient(
            145deg,
            rgba(180, 154, 219, 0.23),
            rgba(224, 213, 242, 0.10)
        );
}

.shape-two {
    top: 48%;
    right: -165px;

    width: 390px;
    height: 390px;

    background:
        linear-gradient(
            145deg,
            rgba(157, 125, 204, 0.15),
            rgba(224, 213, 242, 0.08)
        );
}

.shape-three {
    bottom: -150px;
    left: 20%;

    width: 350px;
    height: 350px;

    background:
        linear-gradient(
            145deg,
            rgba(203, 184, 232, 0.17),
            rgba(244, 240, 250, 0.08)
        );
}


/* =========================================================
   FLOATING SYMBOLS
========================================================= */

.floating-symbol {
    position: fixed;

    z-index: -1;

    pointer-events: none;
    user-select: none;

    color: rgba(96, 71, 141, 0.10);

    font-weight: 900;
    letter-spacing: 0.04em;
}

.symbol-one,
.float-one {
    top: 29%;
    left: 4%;

    font-size: 55px;

    transform: rotate(-10deg);
}

.symbol-two,
.float-two {
    top: 44%;
    right: 3%;

    font-size: 46px;

    transform: rotate(8deg);
}

.symbol-three,
.float-three {
    bottom: 10%;
    left: 3%;

    font-size: 42px;

    transform: rotate(-7deg);
}

.symbol-four,
.float-four {
    bottom: 18%;
    right: 8%;

    font-size: 48px;

    transform: rotate(10deg);
}


/* =========================================================
   HEADER
   SAME GEOMETRY AS LESSON 1
========================================================= */

.lesson-header {
    position: relative;

    z-index: 20;

    width: 100%;

    margin: 0;
    padding: 22px 0 0;
}


/*
   Supports the newer HTML:
   <header class="lesson-header">
      <nav class="lesson-navigation">...
*/

.lesson-header .lesson-navigation {
    width: min(1180px, 88%);

    min-height: 86px;

    margin: 0 auto;
    padding: 14px 18px;

    display: flex;
    align-items: center;

    background:
        rgba(255, 255, 255, 0.94);

    border:
        1px solid rgba(203, 184, 232, 0.35);

    border-radius: 25px;

    box-shadow:
        0 10px 30px rgba(79, 59, 120, 0.06);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}


/*
   Supports the older Lesson 2 HTML where
   <header class="lesson-navigation">
*/

body > header.lesson-navigation {
    position: relative;

    z-index: 20;

    width: min(1180px, 88%);

    min-height: 86px;

    margin: 22px auto 0;
    padding: 14px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        rgba(255, 255, 255, 0.94);

    border:
        1px solid rgba(203, 184, 232, 0.35);

    border-radius: 25px;

    box-shadow:
        0 10px 30px rgba(79, 59, 120, 0.06);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}


/* =========================================================
   HEADER LEFT SIDE
========================================================= */

.lesson-brand {
    display: flex;
    align-items: center;

    gap: 18px;
}

.lesson-header .lesson-navigation {
    gap: 18px;
}


/* =========================================================
   LOGO
========================================================= */

.lesson-logo {
    flex: 0 0 auto;

    min-width: 88px;
    height: 56px;

    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            var(--purple-800),
            var(--purple-500)
        );

    border: 0;

    border-radius: 16px;

    color: #ffffff;

    font-size: 22px;
    font-weight: 900;

    letter-spacing: 0.06em;

    text-decoration: none;

    box-shadow:
        0 8px 18px rgba(96, 71, 141, 0.20);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.lesson-logo:hover {
    transform: translateY(-2px);

    box-shadow:
        0 11px 24px rgba(96, 71, 141, 0.26);
}


/* =========================================================
   CHAPTER INFORMATION
========================================================= */

.lesson-chapter,
.chapter-information {
    display: flex;
    flex-direction: column;
    justify-content: center;

    text-align: left;
}

.chapter-number {
    display: block;

    margin: 0 0 4px;

    color: var(--purple-600);

    font-size: 12px;
    font-weight: 900;

    line-height: 1.2;

    letter-spacing: 0.12em;
}

.chapter-name {
    display: block;

    margin: 0;

    color: var(--purple-900);

    font-size: 20px;
    font-weight: 900;

    line-height: 1.2;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.close-lesson-button {
    flex: 0 0 auto;

    width: 48px;
    height: 48px;

    margin-left: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        var(--purple-100);

    border:
        1px solid var(--purple-200);

    border-radius: 15px;

    color: var(--purple-700);

    font-size: 23px;
    font-weight: 700;

    line-height: 1;

    text-decoration: none;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.close-lesson-button:hover {
    transform: translateY(-2px);

    background: var(--purple-200);

    box-shadow:
        0 7px 17px rgba(79, 59, 120, 0.10);
}


/* =========================================================
   PROGRESS
   SAME POSITION AS LESSON 1
========================================================= */

.lesson-progress-area,
.lesson-progress-wrapper {
    position: relative;

    z-index: 10;

    width: min(1030px, 82%);

    margin: 21px auto 0;

    display: flex;
    align-items: center;

    gap: 15px;
}

.lesson-progress-track {
    flex: 1;

    height: 10px;

    overflow: hidden;

    background:
        rgba(224, 213, 242, 0.82);

    border:
        1px solid rgba(203, 184, 232, 0.42);

    border-radius: 999px;
}

.lesson-progress-fill {
    width: 2.7778%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--purple-700),
            var(--purple-500)
        );

    border-radius: inherit;

    transition:
        width 0.4s ease;
}

.lesson-progress-number {
    min-width: 58px;

    color: var(--purple-800);

    font-size: 14px;
    font-weight: 900;

    text-align: right;
}

.lesson-progress-number strong {
    color: var(--purple-800);

    font-size: 16px;
    font-weight: 900;
}


/* =========================================================
   MAIN
   SAME WIDTH/POSITION AS LESSON 1
========================================================= */

.lesson-main,
main.lesson-content {
    position: relative;

    z-index: 5;

    width: min(920px, 88%);

    margin: 0 auto;

    padding: 30px 0 90px;
}

.lesson-content {
    width: 100%;
}


/* =========================================================
   SCREENS
========================================================= */

.lesson-screen {
    display: none;

    width: 100%;

    animation:
        questionScreenEnter 0.4s ease both;
}

.lesson-screen.active-screen {
    display: block;
}

@keyframes questionScreenEnter {

    from {
        opacity: 0;

        transform:
            translateY(13px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================================================
   MAIN WHITE LESSON PANEL
   MATCHES LESSON 1
========================================================= */

.lesson-panel {
    width: 100%;

    min-height: 590px;

    margin: 0 auto;
    padding: 58px 60px;

    background:
        rgba(255, 255, 255, 0.96);

    border:
        1px solid rgba(203, 184, 232, 0.45);

    border-radius: 34px;

    text-align: center;

    box-shadow:
        0 20px 55px rgba(79, 59, 120, 0.08);

    overflow: hidden;
}

.intro-panel {
    padding-top: 62px;
}


/* =========================================================
   LABEL
========================================================= */

.screen-label,
.word-badge {
    min-height: 34px;

    margin: 0 0 18px;
    padding: 0 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background:
        var(--purple-100);

    border:
        1px solid var(--purple-200);

    border-radius: 999px;

    color: var(--purple-700);

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 0.12em;
}

.word-badge {
    color: #ffffff;

    border: 0;

    background:
        linear-gradient(
            135deg,
            var(--purple-700),
            var(--purple-500)
        );
}


/* =========================================================
   INTRO ICON
========================================================= */

.intro-icon {
    width: 104px;
    height: 104px;

    margin: 0 auto 23px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #eadff7,
            #f7f1fc
        );

    border:
        1px solid var(--purple-200);

    border-radius: 27px;

    font-size: 50px;

    box-shadow:
        0 11px 25px rgba(79, 59, 120, 0.08);

    transform: rotate(-2deg);
}


/* =========================================================
   HEADINGS
========================================================= */

.lesson-panel h1 {
    max-width: 780px;

    margin: 8px auto 20px;

    color: var(--purple-900);

    font-size:
        clamp(44px, 5vw, 60px);

    font-weight: 900;

    line-height: 1.04;

    letter-spacing: -0.025em;
}

.lesson-panel h2 {
    max-width: 760px;

    margin: 5px auto 18px;

    color: var(--purple-900);

    font-size:
        clamp(29px, 3.5vw, 40px);

    font-weight: 900;

    line-height: 1.15;
}


/* =========================================================
   INTRODUCTION TEXT
========================================================= */

.screen-introduction {
    max-width: 720px;

    margin: 0 auto 28px;

    color: var(--lesson-text);

    font-size: 17px;
    font-weight: 600;

    line-height: 1.65;
}

.screen-introduction strong {
    color: var(--purple-800);

    font-weight: 900;
}


/* =========================================================
   INTRO QUESTION WORDS
========================================================= */

.intro-question-row {
    max-width: 720px;

    margin: 28px auto;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;

    gap: 10px;
}

.intro-question-row span {
    min-height: 45px;

    padding: 0 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background:
        #ffffff;

    border:
        2px solid var(--purple-200);

    border-radius: 14px;

    color: var(--purple-800);

    font-size: 14px;
    font-weight: 900;

    box-shadow:
        0 6px 14px rgba(79, 59, 120, 0.05);
}


/* =========================================================
   INTRO NOTE
========================================================= */

.intro-note,
.important-note,
.final-rule-card {
    width: min(700px, 100%);

    margin: 28px auto 22px;
    padding: 20px 23px;

    display: flex;
    align-items: flex-start;

    gap: 16px;

    background:
        linear-gradient(
            145deg,
            #f8f4fc,
            #f2ebf9
        );

    border:
        1px solid var(--purple-200);

    border-radius: 20px;

    text-align: left;
}

.intro-note > span,
.important-note > span,
.final-rule-card > span {
    flex: 0 0 auto;

    font-size: 26px;
}

.intro-note p,
.important-note p,
.final-rule-card p {
    margin: 0;

    color: var(--lesson-text);

    font-size: 15px;
    font-weight: 650;

    line-height: 1.65;
}

.intro-note strong,
.important-note strong,
.final-rule-card strong {
    color: var(--purple-800);

    font-weight: 900;
}


/* =========================================================
   MAIN BUTTON
========================================================= */

.main-action-button,
.next-screen-button {
    appearance: none;

    min-width: 190px;
    min-height: 54px;

    margin-top: 18px;
    padding: 0 27px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    background:
        linear-gradient(
            135deg,
            var(--purple-700),
            var(--purple-500)
        );

    border: 0;

    border-radius: 17px;

    color: #ffffff;

    font-size: 15px;
    font-weight: 900;

    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 9px 20px rgba(117, 87, 166, 0.22);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.main-action-button:hover,
.next-screen-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 26px rgba(117, 87, 166, 0.29);
}

.main-action-button:active,
.next-screen-button:active {
    transform: translateY(0);
}


/* =========================================================
   QUESTION WORD HERO
========================================================= */

.grammar-hero-card {
    width: min(760px, 100%);

    margin: 8px auto 28px;
    padding: 25px 28px;

    display: grid;
    grid-template-columns: 95px 1fr;
    align-items: center;

    gap: 23px;

    background:
        linear-gradient(
            145deg,
            var(--purple-100),
            #ffffff
        );

    border:
        1px solid var(--purple-200);

    border-radius: 24px;

    text-align: left;

    box-shadow: var(--card-shadow);
}

.grammar-hero-icon {
    width: 82px;
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        #ffffff;

    border:
        1px solid var(--purple-200);

    border-radius: 22px;

    font-size: 40px;

    box-shadow: var(--card-shadow);
}

.grammar-hero-content h2 {
    margin: 0 0 8px;

    font-size: 29px;
}

.grammar-hero-content p {
    margin: 0;

    font-size: 15px;
    font-weight: 650;

    line-height: 1.65;
}


/* =========================================================
   QUESTION WORD GRID
========================================================= */

.question-word-grid {
    width: min(780px, 100%);

    margin: 28px auto;

    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 13px;
}

.question-word-card {
    min-height: 170px;

    padding: 19px 13px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            var(--purple-50)
        );

    border:
        1px solid var(--purple-200);

    border-radius: 20px;

    box-shadow: var(--card-shadow);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.question-word-card:hover {
    transform: translateY(-4px);

    border-color: var(--purple-300);

    box-shadow:
        0 13px 26px rgba(79, 59, 120, 0.10);
}

.question-icon {
    margin-bottom: 8px;

    font-size: 32px;
}

.question-word-card strong {
    color: var(--purple-800);

    font-size: 18px;
    font-weight: 900;
}

.question-word-card small {
    margin-top: 4px;

    color: var(--purple-600);

    font-size: 12px;
    font-weight: 800;
}

.question-word-card p {
    margin: 9px 0 0;

    color: var(--lesson-muted);

    font-size: 12px;
    font-weight: 650;

    line-height: 1.45;
}


/* =========================================================
   EXAMPLE LIST
========================================================= */

.example-list {
    width: min(740px, 100%);

    margin: 0 auto 25px;

    display: grid;

    gap: 13px;
}

.example-sentence-box {
    width: 100%;

    min-height: 74px;

    padding: 15px 18px;

    display: flex;
    align-items: center;

    gap: 15px;

    background:
        #ffffff;

    border:
        1px solid var(--purple-200);

    border-radius: 18px;

    text-align: left;

    box-shadow: var(--card-shadow);
}

.example-sentence-box > div {
    flex: 1;

    min-width: 0;
}

.example-icon {
    width: 43px;

    flex: 0 0 43px;

    text-align: center;

    font-size: 28px;
}

.example-sentence-box strong {
    display: block;

    color: var(--purple-900);

    font-size: 16px;
    font-weight: 900;

    line-height: 1.4;
}

.example-sentence-box small {
    display: block;

    margin-top: 4px;

    color: var(--lesson-muted);

    font-size: 12px;
    font-weight: 650;
}


/* =========================================================
   AUDIO BUTTONS
========================================================= */

.speak-button,
.listen-button {
    appearance: none;

    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background:
        var(--purple-100);

    border:
        1px solid var(--purple-200);

    color: var(--purple-800);

    cursor: pointer;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.speak-button {
    width: 42px;
    height: 42px;

    padding: 0;

    border-radius: 13px;

    font-size: 18px;
}

.speak-button:hover,
.listen-button:hover {
    transform: translateY(-2px);

    background:
        var(--purple-200);

    box-shadow:
        0 7px 16px rgba(79, 59, 120, 0.10);
}

.mini-speak {
    width: 36px;
    height: 36px;

    border-radius: 11px;

    font-size: 16px;
}

.sentence-with-audio,
.mini-audio-row,
.structure-example-row,
.formula-result-row {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 11px;
}


/* =========================================================
   COMPARISON
========================================================= */

.comparison-box {
    width: min(760px, 100%);

    margin: 27px auto;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        52px
        minmax(0, 1fr);

    align-items: stretch;

    gap: 12px;
}

.comparison-card {
    padding: 23px;

    background:
        #ffffff;

    border:
        1px solid var(--purple-200);

    border-radius: 21px;

    box-shadow: var(--card-shadow);
}

.highlight-card {
    background:
        linear-gradient(
            145deg,
            var(--purple-50),
            #ffffff
        );

    border-color:
        var(--purple-300);
}

.comparison-arrow {
    align-self: center;

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        var(--purple-100);

    border:
        1px solid var(--purple-200);

    border-radius: 50%;

    color: var(--purple-700);

    font-size: 13px;
    font-weight: 900;
}

.comparison-label {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--purple-600);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.09em;
}

.comparison-big-word {
    margin-bottom: 14px;

    color: var(--purple-800);

    font-size: 24px;
    font-weight: 900;
}

.comparison-tip {
    margin: 15px 0 0;
    padding: 13px;

    background:
        var(--purple-100);

    border-radius: 13px;

    font-size: 13px;
    font-weight: 650;

    line-height: 1.5;
}


/* =========================================================
   WHY / BECAUSE
========================================================= */

.why-because-box {
    width: min(730px, 100%);

    margin: 27px auto;

    display: grid;
    grid-template-columns:
        1fr 50px 1fr;

    align-items: center;

    gap: 12px;
}

.why-side,
.because-side {
    min-height: 150px;

    padding: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background:
        #ffffff;

    border:
        1px solid var(--purple-200);

    border-radius: 21px;

    box-shadow: var(--card-shadow);
}

.because-side {
    background:
        var(--purple-50);
}

.mini-label {
    margin-bottom: 10px;

    color: var(--purple-600);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.10em;
}

.why-side strong,
.because-side strong {
    color: var(--purple-900);

    font-size: 16px;
    font-weight: 900;
}

.why-side small,
.because-side small {
    margin-top: 7px;

    color: var(--lesson-muted);

    font-size: 12px;
    font-weight: 650;
}

.because-arrow {
    color: var(--purple-500);

    font-size: 30px;
    font-weight: 900;
}


/* =========================================================
   WHICH / WHOSE
========================================================= */

.choice-example,
.whose-example {
    width: min(620px, 100%);

    margin: 27px auto;
    padding: 25px;

    background:
        linear-gradient(
            145deg,
            var(--purple-50),
            #ffffff
        );

    border:
        1px solid var(--purple-200);

    border-radius: 23px;

    box-shadow: var(--card-shadow);
}

.choice-example strong,
.whose-example strong {
    color: var(--purple-900);

    font-size: 17px;
    font-weight: 900;
}

.choice-items {
    margin: 21px auto;

    display: flex;
    justify-content: center;

    gap: 18px;
}

.choice-items > div {
    width: 100px;
    height: 100px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background:
        #ffffff;

    border:
        1px solid var(--purple-200);

    border-radius: 19px;

    font-size: 43px;
}

.choice-items small {
    margin-top: 3px;

    color: var(--purple-700);

    font-size: 11px;
    font-weight: 900;
}

.whose-object {
    margin-bottom: 13px;

    font-size: 55px;
}

.translation {
    color: var(--lesson-muted);

    font-size: 13px;
    font-weight: 650;
}

.answer-example {
    display: inline-block;

    margin-top: 13px;
    padding: 10px 15px;

    background:
        var(--purple-100);

    border-radius: 12px;

    color: var(--purple-800);

    font-size: 13px;
    font-weight: 850;
}


/* =========================================================
   HOW
========================================================= */

.how-grid {
    width: min(780px, 100%);

    margin: 27px auto;

    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 13px;
}

.how-card {
    min-height: 200px;

    padding: 20px 14px;

    display: flex;
    flex-direction: column;
    align-items: center;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            var(--purple-50)
        );

    border:
        1px solid var(--purple-200);

    border-radius: 20px;

    box-shadow: var(--card-shadow);
}

.how-card > span {
    margin-bottom: 9px;

    font-size: 30px;
}

.how-card > strong {
    color: var(--purple-800);

    font-size: 15px;
    font-weight: 900;
}

.how-card > small {
    margin-top: 4px;

    color: var(--purple-600);

    font-size: 11px;
    font-weight: 750;
}

.how-card p {
    margin: 14px 0 0;

    font-size: 12px;
    font-weight: 750;

    line-height: 1.45;
}

.mini-audio-row {
    margin-top: auto;
    padding-top: 5px;
}

.mini-examples {
    margin: 15px 0;
    padding: 13px;

    background:
        var(--purple-50);

    border-radius: 13px;

    font-size: 13px;
    font-weight: 700;

    line-height: 1.8;
}


/* =========================================================
   FORMULA
========================================================= */

.formula-box {
    width: min(780px, 100%);

    margin: 28px auto 20px;

    display: flex;
    align-items: stretch;
    justify-content: center;

    gap: 8px;
}

.formula-piece {
    min-width: 115px;

    padding: 16px 12px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        #ffffff;

    border:
        1px solid var(--purple-200);

    border-radius: 16px;

    color: var(--purple-800);

    font-size: 16px;
    font-weight: 900;

    box-shadow: var(--card-shadow);
}

.formula-piece small {
    margin-top: 5px;

    color: var(--lesson-muted);

    font-size: 10px;
    font-weight: 750;
}

.question-piece {
    background:
        var(--purple-100);
}

.helper-piece {
    border-color:
        var(--purple-300);
}

.person-piece {
    background:
        var(--purple-50);
}

.verb-piece {
    border-color:
        var(--purple-400);
}

.formula-plus {
    align-self: center;

    color: var(--purple-400);

    font-size: 19px;
    font-weight: 900;
}

.formula-result {
    color: var(--purple-900);

    font-size: 21px;
    font-weight: 900;
}


/* =========================================================
   STRUCTURE GRID
========================================================= */

.structure-grid {
    width: min(780px, 100%);

    margin: 27px auto;

    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 13px;
}

.structure-card {
    min-height: 235px;

    padding: 23px 17px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            var(--purple-50)
        );

    border:
        1px solid var(--purple-200);

    border-radius: 21px;

    box-shadow: var(--card-shadow);
}

.structure-number {
    width: 34px;
    height: 34px;

    margin-bottom: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            var(--purple-700),
            var(--purple-500)
        );

    border-radius: 11px;

    color: #ffffff;

    font-size: 13px;
    font-weight: 900;
}

.structure-card > strong {
    color: var(--purple-800);

    font-size: 14px;
    font-weight: 900;
}

.structure-formula {
    width: 100%;

    margin: 14px 0;
    padding: 11px;

    background:
        var(--purple-100);

    border-radius: 12px;

    color: var(--purple-700);

    font-size: 12px;
    font-weight: 850;
}

.structure-example-row p {
    margin: 0;

    color: var(--purple-900);

    font-size: 14px;
    font-weight: 850;
}

.structure-card > small {
    margin-top: 8px;

    color: var(--lesson-muted);

    font-size: 11px;
    font-weight: 650;
}


/* =========================================================
   ACTIVITY PANEL
========================================================= */

.activity-panel {
    width: 100%;
}


/* =========================================================
   PURPLE ACTIVITY MACHINE
   SAME STYLE AS LESSON 1
========================================================= */

.purple-activity-machine {
    width: min(760px, 100%);

    margin: 25px auto 6px;
    padding: 25px;

    background:
        linear-gradient(
            145deg,
            #efe5f8 0%,
            #f7f1fc 100%
        );

    border:
        1px solid var(--purple-200);

    border-radius: 27px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.80),
        0 12px 28px rgba(79, 59, 120, 0.06);
}

.activity-progress {
    min-height: 31px;

    margin-bottom: 17px;
    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background:
        rgba(255, 255, 255, 0.75);

    border:
        1px solid var(--purple-200);

    border-radius: 999px;

    color: var(--purple-700);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.09em;
}


/* =========================================================
   ACTIVITY QUESTION
========================================================= */

.purple-question-card {
    width: 100%;

    min-height: 170px;

    padding: 24px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background:
        #ffffff;

    border:
        1px solid rgba(203, 184, 232, 0.68);

    border-radius: 21px;

    box-shadow:
        0 8px 20px rgba(79, 59, 120, 0.06);
}

.activity-question-icon {
    margin-bottom: 12px;

    font-size: 38px;
}

.activity-question {
    margin: 0;

    color: var(--purple-900);

    font-size:
        clamp(18px, 2.4vw, 22px);

    font-weight: 900;

    line-height: 1.5;
}

.activity-question small {
    color: var(--lesson-muted);

    font-size: 13px;
    font-weight: 700;
}

.question-sentence-row {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;
}

.question-speak-button {
    width: 42px;
    height: 42px;

    background:
        var(--purple-100);
}


/* =========================================================
   ACTIVITY OPTIONS
========================================================= */

.activity-options {
    width: 100%;

    margin-top: 16px;

    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;
}

.activity-options.two-options {
    max-width: 560px;

    margin-left: auto;
    margin-right: auto;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.activity-options.large-options {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.activity-option {
    appearance: none;

    min-height: 62px;

    padding: 12px 14px;

    background:
        #ffffff;

    border:
        2px solid transparent;

    border-radius: 16px;

    color: var(--purple-800);

    font-size: 14px;
    font-weight: 850;

    line-height: 1.35;

    cursor: pointer;

    box-shadow:
        0 6px 15px rgba(79, 59, 120, 0.06);

    transition:
        transform 0.17s ease,
        border-color 0.17s ease,
        background 0.17s ease,
        box-shadow 0.17s ease;
}

.activity-option:hover:not(:disabled) {
    transform: translateY(-3px);

    border-color:
        var(--purple-300);

    box-shadow:
        0 10px 21px rgba(79, 59, 120, 0.10);
}

.activity-option:disabled {
    cursor: default;
}


/* =========================================================
   CORRECT / WRONG
========================================================= */

.activity-option.correct,
.activity-option.correct-choice,
.activity-option.correct-answer {
    background:
        var(--success-light) !important;

    border-color:
        var(--success) !important;

    color:
        var(--success-dark) !important;

    box-shadow:
        0 8px 20px rgba(67, 169, 123, 0.14);
}

.activity-option.wrong,
.activity-option.wrong-choice,
.activity-option.wrong-answer {
    background:
        var(--error-light) !important;

    border-color:
        var(--error) !important;

    color:
        var(--error-dark) !important;

    box-shadow:
        0 8px 20px rgba(217, 107, 121, 0.13);
}


/* =========================================================
   FEEDBACK
========================================================= */

.activity-feedback {
    min-height: 26px;

    margin-top: 15px;

    color: var(--purple-800);

    font-size: 14px;
    font-weight: 850;
}

.activity-feedback.correct,
.activity-feedback.correct-feedback {
    color: var(--success-dark);
}

.activity-feedback.wrong,
.activity-feedback.wrong-feedback {
    color: var(--error-dark);
}


/* =========================================================
   HIDDEN BUTTON
========================================================= */

.hidden-button {
    display: none !important;
}

.hidden-button.show-button,
.hidden-button.visible-button {
    display: inline-flex !important;
}


/* =========================================================
   LISTEN BUTTON
========================================================= */

.listen-button {
    min-height: 48px;

    margin-top: 20px;
    padding: 0 19px;

    gap: 8px;

    border-radius: 15px;

    font-size: 14px;
    font-weight: 850;
}


/* =========================================================
   DIALOGUE
========================================================= */

.dialogue-card {
    width: min(690px, 100%);

    margin: 27px auto 6px;
    padding: 23px;

    display: grid;

    gap: 12px;

    background:
        linear-gradient(
            145deg,
            var(--purple-50),
            var(--purple-100)
        );

    border:
        1px solid var(--purple-200);

    border-radius: 24px;
}

.dialogue-line {
    max-width: 78%;

    padding: 14px 16px;

    display: flex;
    align-items: flex-start;

    gap: 12px;

    background:
        #ffffff;

    border:
        1px solid var(--purple-200);

    border-radius: 17px;

    text-align: left;

    box-shadow: var(--card-shadow);
}

.left-line {
    justify-self: start;
}

.right-line {
    justify-self: end;

    background:
        #f5effb;
}

.speaker-avatar {
    flex: 0 0 auto;

    font-size: 24px;
}

.dialogue-line strong {
    display: block;

    color: var(--purple-900);

    font-size: 14px;
    font-weight: 850;
}

.dialogue-line small {
    display: block;

    margin-top: 3px;

    color: var(--lesson-muted);

    font-size: 11px;
    font-weight: 650;
}


/* =========================================================
   ANSWER CLUE
========================================================= */

.answer-clue {
    margin: 8px auto 15px;
    padding: 14px 19px;

    background:
        var(--purple-100);

    border:
        1px solid var(--purple-200);

    border-radius: 15px;
}

.answer-clue small {
    display: block;

    margin-bottom: 6px;

    color: var(--purple-600);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.09em;
}

.answer-clue strong {
    color: var(--purple-900);

    font-size: 17px;
    font-weight: 900;
}

.large-clue {
    min-width: min(420px, 100%);

    padding: 18px 23px;
}

.large-clue strong {
    font-size:
        clamp(18px, 2.4vw, 24px);
}


/* =========================================================
   REVIEW GRID
========================================================= */

.review-grid {
    width: min(740px, 100%);

    margin: 28px auto;

    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}

.review-card {
    min-height: 130px;

    padding: 14px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            var(--purple-50)
        );

    border:
        1px solid var(--purple-200);

    border-radius: 18px;

    box-shadow: var(--card-shadow);
}

.review-card span {
    margin-bottom: 7px;

    font-size: 28px;
}

.review-card strong {
    color: var(--purple-800);

    font-size: 15px;
    font-weight: 900;
}

.review-card small {
    margin-top: 3px;

    color: var(--lesson-muted);

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   GAME INTRO
========================================================= */

.game-intro-panel {
    padding-top: 58px;
}

.game-icon {
    width: 100px;
    height: 100px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #eadff7,
            #f7f1fc
        );

    border:
        1px solid var(--purple-200);

    border-radius: 27px;

    font-size: 48px;

    box-shadow: var(--card-shadow);
}

.game-rules {
    width: min(690px, 100%);

    margin: 27px auto;

    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}

.game-rules > div {
    padding: 19px 15px;

    background:
        var(--purple-50);

    border:
        1px solid var(--purple-200);

    border-radius: 17px;
}

.game-rules span {
    width: 34px;
    height: 34px;

    margin: 0 auto 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            var(--purple-700),
            var(--purple-500)
        );

    border-radius: 11px;

    color: #ffffff;

    font-size: 13px;
    font-weight: 900;
}

.game-rules p {
    margin: 0;

    font-size: 13px;
    font-weight: 750;

    line-height: 1.5;
}


/* =========================================================
   VIDEO
========================================================= */

.video-icon {
    margin-bottom: 12px;

    font-size: 52px;
}

.video-container,
.video-frame {
    position: relative;

    width: min(740px, 100%);

    aspect-ratio: 16 / 9;

    margin: 27px auto;

    overflow: hidden;

    background:
        #ffffff;

    border:
        4px solid var(--purple-100);

    border-radius: 23px;

    box-shadow:
        0 12px 30px rgba(79, 59, 120, 0.11);
}

.video-container iframe,
.video-frame iframe {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}

.video-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            var(--purple-50),
            var(--purple-100)
        );

    color: var(--purple-800);
}

.video-play-icon {
    margin-bottom: 12px;

    font-size: 47px;
}


/* =========================================================
   COMPLETION
========================================================= */

.completion-panel {
    padding-top: 60px;
}

.completion-trophy {
    width: 105px;
    height: 105px;

    margin: 0 auto 21px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #eadff7,
            #ffffff
        );

    border:
        1px solid var(--purple-200);

    border-radius: 29px;

    font-size: 52px;

    box-shadow:
        0 14px 30px rgba(79, 59, 120, 0.09);

    animation:
        trophyFloat 2.4s ease-in-out infinite;
}

@keyframes trophyFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

.completion-text {
    max-width: 660px;

    margin: 0 auto 25px;

    font-size: 16px;
    font-weight: 600;

    line-height: 1.7;
}

.completion-text strong {
    color: var(--purple-800);
}


/* =========================================================
   ACHIEVEMENT
========================================================= */

.achievement-card {
    width: min(520px, 100%);

    margin: 25px auto;
    padding: 19px 21px;

    display: flex;
    align-items: center;

    gap: 16px;

    background:
        linear-gradient(
            145deg,
            var(--purple-100),
            #ffffff
        );

    border:
        1px solid var(--purple-200);

    border-radius: 21px;

    text-align: left;

    box-shadow: var(--card-shadow);
}

.achievement-icon {
    width: 62px;
    height: 62px;

    flex: 0 0 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        #ffffff;

    border:
        1px solid var(--purple-200);

    border-radius: 17px;

    font-size: 31px;
}

.achievement-card small {
    display: block;

    margin-bottom: 3px;

    color: var(--purple-600);

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.10em;
}

.achievement-card strong {
    display: block;

    color: var(--purple-900);

    font-size: 19px;
    font-weight: 900;
}

.achievement-card p {
    margin: 3px 0 0;

    color: var(--lesson-muted);

    font-size: 12px;
    font-weight: 650;
}


/* =========================================================
   COMPLETION SKILLS
========================================================= */

.completion-skills {
    width: min(660px, 100%);

    margin: 24px auto;

    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 9px;
}

.completion-skills > div {
    min-height: 46px;

    padding: 8px 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    background:
        var(--purple-50);

    border:
        1px solid var(--purple-200);

    border-radius: 13px;

    color: var(--purple-800);

    font-size: 12px;
    font-weight: 850;
}

.completion-skills span {
    color: var(--success);

    font-weight: 900;
}


/* =========================================================
   TOAST
========================================================= */

.achievement-toast {
    position: fixed;

    z-index: 99999;

    top: 100px;
    left: 50%;

    min-width: 250px;

    padding: 15px 21px;

    background:
        rgba(79, 59, 120, 0.96);

    border-radius: 16px;

    color: #ffffff;

    font-size: 13px;
    font-weight: 850;

    text-align: center;

    box-shadow:
        0 13px 30px rgba(48, 34, 78, 0.22);

    opacity: 0;

    pointer-events: none;

    transform:
        translate(-50%, -15px);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.achievement-toast.show {
    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* =========================================================
   CONFETTI
========================================================= */

.confetti-container {
    position: fixed;

    z-index: 999999;

    inset: 0;

    overflow: hidden;

    pointer-events: none;
}

.answer-sparkle,
.yew-answer-confetti,
.yew-big-confetti {
    position: fixed;

    z-index: 999999;

    pointer-events: none;
}


/* =========================================================
   FINISH
========================================================= */

.finish-lesson-button {
    margin-top: 12px;
}


/* =========================================================
   FOCUS
========================================================= */

button:focus-visible,
a:focus-visible {
    outline:
        3px solid rgba(137, 104, 187, 0.34);

    outline-offset: 3px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .lesson-header .lesson-navigation,
    body > header.lesson-navigation {
        width: 92%;
    }

    .lesson-progress-area,
    .lesson-progress-wrapper {
        width: 84%;
    }

    .lesson-main,
    main.lesson-content {
        width: 90%;
    }

    .lesson-panel {
        min-height: 560px;

        padding: 48px 38px;
    }

    .question-word-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .how-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .structure-grid {
        grid-template-columns: 1fr;
    }

    .structure-card {
        min-height: auto;
    }

    .review-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .formula-box {
        flex-wrap: wrap;
    }

    .activity-options {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .completion-skills {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .lesson-header {
        padding-top: 12px;
    }

    .lesson-header .lesson-navigation,
    body > header.lesson-navigation {
        width: 94%;

        min-height: 70px;

        margin-top: 12px;
        padding: 10px 12px;

        border-radius: 19px;
    }

    .lesson-header .lesson-navigation {
        margin-top: 0;
    }

    .lesson-brand {
        gap: 10px;
    }

    .lesson-logo {
        min-width: 62px;
        height: 44px;

        padding: 0 12px;

        border-radius: 13px;

        font-size: 15px;
    }

    .chapter-number {
        margin-bottom: 3px;

        font-size: 8px;
    }

    .chapter-name {
        font-size: 14px;
    }

    .close-lesson-button {
        width: 40px;
        height: 40px;

        border-radius: 12px;

        font-size: 20px;
    }

    .lesson-progress-area,
    .lesson-progress-wrapper {
        width: 86%;

        margin-top: 17px;

        gap: 10px;
    }

    .lesson-progress-track {
        height: 8px;
    }

    .lesson-progress-number {
        min-width: 48px;

        font-size: 12px;
    }

    .lesson-main,
    main.lesson-content {
        width: 92%;

        padding: 23px 0 65px;
    }

    .lesson-panel {
        min-height: 520px;

        padding: 38px 20px;

        border-radius: 26px;
    }

    .intro-panel,
    .completion-panel,
    .game-intro-panel {
        padding-top: 42px;
    }

    .lesson-panel h1 {
        font-size: 38px;
    }

    .lesson-panel h2 {
        font-size: 27px;
    }

    .screen-introduction {
        font-size: 15px;

        line-height: 1.6;
    }

    .intro-icon,
    .game-icon {
        width: 84px;
        height: 84px;

        border-radius: 23px;

        font-size: 41px;
    }

    .completion-trophy {
        width: 90px;
        height: 90px;

        border-radius: 25px;

        font-size: 45px;
    }

    .grammar-hero-card {
        grid-template-columns: 1fr;

        gap: 14px;

        padding: 21px;

        text-align: center;
    }

    .grammar-hero-icon {
        width: 74px;
        height: 74px;

        margin: 0 auto;

        font-size: 36px;
    }

    .example-sentence-box {
        padding: 14px;

        gap: 10px;
    }

    .example-sentence-box strong {
        font-size: 14px;
    }

    .example-icon {
        width: 34px;

        flex-basis: 34px;

        font-size: 24px;
    }

    .speak-button {
        width: 39px;
        height: 39px;

        border-radius: 11px;

        font-size: 17px;
    }

    .question-word-grid {
        gap: 10px;
    }

    .question-word-card {
        min-height: 150px;

        padding: 15px 10px;
    }

    .comparison-box {
        grid-template-columns: 1fr;

        gap: 11px;
    }

    .comparison-arrow {
        margin: 0 auto;

        transform: rotate(90deg);
    }

    .why-because-box {
        grid-template-columns: 1fr;
    }

    .because-arrow {
        transform: rotate(90deg);
    }

    .how-grid {
        grid-template-columns: 1fr;
    }

    .formula-piece {
        min-width:
            calc(50% - 18px);
    }

    .purple-activity-machine {
        padding: 18px;

        border-radius: 22px;
    }

    .purple-question-card {
        min-height: 150px;

        padding: 20px 15px;

        border-radius: 18px;
    }

    .activity-question-icon {
        font-size: 34px;
    }

    .activity-question {
        font-size: 18px;
    }

    .activity-options,
    .activity-options.large-options,
    .activity-options.two-options {
        grid-template-columns: 1fr;
    }

    .activity-option {
        min-height: 56px;

        font-size: 13px;
    }

    .dialogue-card {
        padding: 17px;
    }

    .dialogue-line {
        max-width: 92%;
    }

    .review-grid {
        gap: 9px;
    }

    .review-card {
        min-height: 115px;
    }

    .game-rules {
        grid-template-columns: 1fr;
    }

    .game-rules > div {
        display: flex;
        align-items: center;

        gap: 12px;

        text-align: left;
    }

    .game-rules span {
        flex: 0 0 34px;

        margin: 0;
    }

    .achievement-card {
        padding: 17px;
    }

    .achievement-icon {
        width: 56px;
        height: 56px;

        flex-basis: 56px;

        font-size: 28px;
    }

    .floating-symbol {
        display: none;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 410px) {

    .lesson-header .lesson-navigation,
    body > header.lesson-navigation {
        width: 95%;

        padding-left: 9px;
        padding-right: 9px;
    }

    .lesson-brand {
        gap: 8px;
    }

    .lesson-logo {
        min-width: 57px;
        height: 41px;

        font-size: 14px;
    }

    .chapter-name {
        font-size: 12px;
    }

    .lesson-panel {
        padding: 33px 14px;
    }

    .lesson-panel h1 {
        font-size: 33px;
    }

    .lesson-panel h2 {
        font-size: 24px;
    }

    .intro-question-row span {
        min-height: 40px;

        padding: 0 12px;

        font-size: 12px;
    }

    .question-word-card {
        min-height: 140px;
    }

    .question-word-card strong {
        font-size: 16px;
    }

    .question-word-card p {
        font-size: 11px;
    }

    .purple-activity-machine {
        padding: 14px;
    }

    .purple-question-card {
        padding: 18px 12px;
    }

    .formula-piece {
        min-width: 100%;
    }

    .formula-plus {
        width: 100%;
    }

    .completion-skills {
        grid-template-columns:
            1fr 1fr;
    }
}


/* =========================================================
   FINAL GEOMETRY PROTECTION
   LESSON 2 MUST KEEP LESSON 1 LAYOUT
========================================================= */

html,
body {
    margin: 0 !important;
    border: 0 !important;
}

body {
    padding: 0 !important;
}


/* Header is NOT full-width white strip */

body > header.lesson-navigation {
    width: min(1180px, 88%) !important;

    margin:
        22px auto 0 !important;

    border-radius:
        25px !important;
}


/* Newer header structure */

.lesson-header {
    background:
        transparent !important;

    border:
        0 !important;

    box-shadow:
        none !important;
}

.lesson-header > .lesson-navigation {
    width: min(1180px, 88%) !important;

    margin:
        0 auto !important;

    border-radius:
        25px !important;
}


/* Progress stays narrower than header */

.lesson-progress-area,
.lesson-progress-wrapper {
    width: min(1030px, 82%) !important;
}


/* Main card matches Lesson 1 width */

.lesson-main,
main.lesson-content {
    width: min(920px, 88%) !important;
}

/* =========================================================
   EXTRA GAMES — QUESTION WORDS
========================================================= */

.external-games-grid {
    width: min(760px, 100%);

    margin: 32px auto 28px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 16px;
}


/* =========================================================
   GAME CARD
========================================================= */

.external-game-card {
    position: relative;

    min-height: 165px;

    padding: 22px 52px 22px 20px;

    display: flex;
    align-items: center;

    gap: 17px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #faf7fd 100%
        );

    border:
        2px solid var(--purple-200);

    border-radius: 22px;

    color: var(--lesson-text);

    text-align: left;
    text-decoration: none;

    box-shadow:
        0 8px 22px rgba(79, 59, 120, 0.07);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


/* Decorative glow */

.external-game-card::before {
    content: "";

    position: absolute;

    top: -55px;
    right: -55px;

    width: 125px;
    height: 125px;

    border-radius: 50%;

    background:
        rgba(180, 154, 219, 0.13);

    pointer-events: none;

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}


/* =========================================================
   HOVER
========================================================= */

.external-game-card:hover {
    transform: translateY(-5px);

    border-color: var(--purple-400);

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f6f0fb 100%
        );

    box-shadow:
        0 15px 30px rgba(79, 59, 120, 0.12);
}

.external-game-card:hover::before {
    transform: scale(1.25);

    background:
        rgba(180, 154, 219, 0.19);
}


/* =========================================================
   GAME ICON
========================================================= */

.external-game-icon {
    width: 62px;
    height: 62px;

    flex: 0 0 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    z-index: 2;

    background:
        linear-gradient(
            145deg,
            var(--purple-100),
            #ffffff
        );

    border:
        1px solid var(--purple-200);

    border-radius: 18px;

    font-size: 31px;

    box-shadow:
        0 6px 15px rgba(79, 59, 120, 0.07);

    transition:
        transform 0.2s ease;
}

.external-game-card:hover .external-game-icon {
    transform:
        translateY(-2px)
        rotate(-3deg);
}


/* =========================================================
   GAME TEXT
========================================================= */

.external-game-content {
    position: relative;

    z-index: 2;

    flex: 1;

    min-width: 0;
}

.external-game-site {
    display: block;

    margin-bottom: 6px;

    color: var(--purple-500);

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.13em;
}

.external-game-content strong {
    display: block;

    margin-bottom: 7px;

    color: var(--purple-900);

    font-size: 16px;
    font-weight: 900;

    line-height: 1.25;
}

.external-game-content p {
    margin: 0;

    color: var(--lesson-muted);

    font-size: 12px;
    font-weight: 650;

    line-height: 1.5;
}


/* =========================================================
   ARROW
========================================================= */

.external-game-arrow {
    position: absolute;

    z-index: 3;

    top: 50%;
    right: 18px;

    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--purple-100);

    border:
        1px solid var(--purple-200);

    border-radius: 10px;

    color: var(--purple-700);

    font-size: 16px;
    font-weight: 900;

    transform: translateY(-50%);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.external-game-card:hover .external-game-arrow {
    background:
        linear-gradient(
            135deg,
            var(--purple-700),
            var(--purple-500)
        );

    border-color: transparent;

    color: #ffffff;

    transform:
        translate(3px, -50%);
}


/* =========================================================
   INDIVIDUAL GAME DETAILS
========================================================= */

.external-game-card:nth-child(1)
.external-game-icon {
    background:
        linear-gradient(
            145deg,
            #f3ecfa,
            #ffffff
        );
}

.external-game-card:nth-child(2)
.external-game-icon {
    background:
        linear-gradient(
            145deg,
            #eee5f8,
            #ffffff
        );
}

.external-game-card:nth-child(3)
.external-game-icon {
    background:
        linear-gradient(
            145deg,
            #f6f1fb,
            #ffffff
        );
}

.external-game-card:nth-child(4)
.external-game-icon {
    background:
        linear-gradient(
            145deg,
            #eee6f8,
            #ffffff
        );
}


/* =========================================================
   GAMES NOTE
========================================================= */

.game-intro-panel .important-note {
    margin-top: 30px;
}


/* =========================================================
   GAME SCREEN BUTTON
========================================================= */

.game-intro-panel > .main-action-button {
    margin-top: 8px;
}


/* =========================================================
   FOCUS
========================================================= */

.external-game-card:focus-visible {
    outline:
        3px solid rgba(137, 104, 187, 0.35);

    outline-offset: 4px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 800px) {

    .external-games-grid {
        width: min(650px, 100%);

        grid-template-columns: 1fr;
    }

    .external-game-card {
        min-height: 135px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .external-games-grid {
        margin-top: 25px;

        gap: 12px;
    }

    .external-game-card {
        min-height: 125px;

        padding:
            17px 45px 17px 15px;

        gap: 13px;

        border-radius: 18px;
    }

    .external-game-icon {
        width: 52px;
        height: 52px;

        flex-basis: 52px;

        border-radius: 15px;

        font-size: 27px;
    }

    .external-game-site {
        margin-bottom: 4px;

        font-size: 8px;
    }

    .external-game-content strong {
        margin-bottom: 5px;

        font-size: 14px;
    }

    .external-game-content p {
        font-size: 11px;

        line-height: 1.4;
    }

    .external-game-arrow {
        right: 12px;

        width: 28px;
        height: 28px;

        border-radius: 9px;

        font-size: 14px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .external-game-card {
        align-items: flex-start;

        padding:
            16px 42px 16px 13px;
    }

    .external-game-icon {
        width: 46px;
        height: 46px;

        flex-basis: 46px;

        font-size: 23px;
    }

    .external-game-content strong {
        font-size: 13px;
    }

    .external-game-content p {
        font-size: 10px;
    }
}