@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

body {
    font-family: "Fredoka", sans-serif;
}

button,
input,
textarea,
select {
    font-family: "Fredoka", sans-serif;
}

/* ==================================================
   YEW — LESSON 1
   Rounded game-style design
================================================== */

* {
    box-sizing: border-box;
}

:root {
    --green: #58cc02;
    --green-light: #7fdf24;
    --green-dark: #46a302;
    --green-shadow: #3c8f00;

    --purple: #8f7bd6;
    --purple-light: #b9a7f4;
    --purple-dark: #725fc2;
    --purple-soft: #f2eeff;

    --blue: #1cb0f6;
    --blue-dark: #1488bd;
    --blue-soft: #e8f7ff;

    --yellow: #ffc800;
    --yellow-dark: #d9a900;
    --yellow-soft: #fff7cf;

    --coral: #ff6b6b;
    --coral-dark: #d94f58;
    --coral-soft: #fff0f1;

    --text: #38384a;
    --text-soft: #737386;

    --white: #ffffff;
    --page: #f8f8fc;
    --line: #e8e8ef;

    --card-radius: 34px;
    --button-radius: 20px;

    --soft-shadow:
        0 12px 30px rgba(69, 57, 116, 0.09);

    --card-shadow:
        0 8px 0 rgba(78, 65, 126, 0.08),
        0 18px 42px rgba(69, 57, 116, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

button,
a {
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.lesson-body {
    min-height: 100vh;
    overflow-x: hidden;

    font-family: "Fredoka", sans-serif;
    color: var(--text);

    background:
        radial-gradient(
            circle at 8% 10%,
            rgba(193, 177, 255, 0.46),
            transparent 28%
        ),
        radial-gradient(
            circle at 92% 14%,
            rgba(171, 226, 255, 0.5),
            transparent 29%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(255, 222, 151, 0.3),
            transparent 32%
        ),
        var(--page);
}

/* ==================================================
   BACKGROUND DECORATIONS
================================================== */

.background-shape,
.floating-symbol {
    position: fixed;
    pointer-events: none;
}

.background-shape {
    z-index: -2;
    border-radius: 50%;
    filter: blur(3px);
}

.shape-one {
    top: 160px;
    left: -100px;

    width: 250px;
    height: 250px;

    background: rgba(143, 123, 214, 0.09);
}

.shape-two {
    top: 46%;
    right: -120px;

    width: 290px;
    height: 290px;

    background: rgba(28, 176, 246, 0.08);
}

.shape-three {
    bottom: -130px;
    left: 32%;

    width: 310px;
    height: 310px;

    background: rgba(255, 200, 0, 0.08);
}

.floating-symbol {
    z-index: -1;

    opacity: 0.1;

    font-size: clamp(75px, 10vw, 145px);
    font-weight: 700;

    animation: floatingSymbol 6s ease-in-out infinite;
}

.floating-symbol-a {
    top: 22%;
    left: 2%;

    color: var(--purple);
    transform: rotate(-12deg);
}

.floating-symbol-star {
    top: 44%;
    right: 3%;

    animation-delay: -2s;
}

.floating-symbol-pencil {
    bottom: 4%;
    left: 4%;

    animation-delay: -4s;
}

@keyframes floatingSymbol {
    0%,
    100% {
        transform: translateY(0) rotate(-6deg);
    }

    50% {
        transform: translateY(-16px) rotate(5deg);
    }
}

/* ==================================================
   HEADER
================================================== */

.lesson-header {
    padding: 20px 22px 0;
}

.lesson-navigation {
    width: min(1050px, 100%);
     margin: 0 auto;
    padding: 13px 16px;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;

    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(143, 123, 214, 0.12);
    border-radius: 25px;

    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(14px);
}

.lesson-logo {
    min-width: 76px;
    padding: 11px 17px 8px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            var(--purple),
            #aa93ef
        );

    border-radius: 16px;
    border-bottom: 5px solid #6f5bb8;

    color: white;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
}

.lesson-logo:active {
    transform: translateY(3px);
    border-bottom-width: 2px;
}

.chapter-information {
    text-align: center;
}

.chapter-number {
    display: block;
    margin-bottom: 3px;

    color: var(--purple);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.chapter-name {
    font-size: 18px;
    font-weight: 600;
}

.close-lesson-button {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    background: var(--white);
    border: 2px solid var(--line);
    border-bottom: 4px solid #d8d8df;
    border-radius: 16px;

    color: #858594;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;

    transition: 0.18s ease;
}

.close-lesson-button:hover {
    color: var(--coral);
    border-color: #ffd2d5;
    background: var(--coral-soft);
}

.close-lesson-button:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* ==================================================
   MAIN APPLICATION
================================================== */

.lesson-application {
    width: min(960px, calc(100% - 30px));
    margin: 0 auto;
    padding: 34px 0 100px;
}

/* ==================================================
   LESSON PROGRESS
================================================== */

.lesson-progress-area{

    width:min(820px,100%);
    margin:0 auto 30px;

    display:flex;
    align-items:center;
    gap:18px;
}

.lesson-progress-track{

    flex:1;

    height:12px;

    padding:2px;

    background:#ece9f6;

    border-radius:999px;
}

.lesson-progress-fill {
    width: 16.666%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--green),
            var(--green-light)
        );

    border-radius: inherit;

    box-shadow:
        inset 0 -2px 0
        rgba(53, 133, 0, 0.18);

    transition: width 0.45s ease;
}

.lesson-progress-number{

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    min-width:70px;

    color:#8f7bd6;

    font-size:11px;
    font-weight:600;

    background:none;
    border:none;
    box-shadow:none;
}

.lesson-progress-number strong{

    margin-top:2px;

    color:#6657a7;

    font-size:17px;
}

/* ==================================================
   SCREEN SYSTEM
================================================== */

.lesson-screen {
    display: none;
}

.lesson-screen.active-screen {
    display: block;

    animation: screenBounceIn 0.42s ease;
}

@keyframes screenBounceIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    70% {
        transform: translateY(-3px) scale(1.005);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==================================================
   SHARED PAGE CARDS
================================================== */

.story-page,
.goal-page,
.alphabet-page,
.video-page,
.practice-page,
.finish-page {
    min-height: 650px;
    padding: 48px;

    position: relative;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 12% 10%,
            rgba(255, 255, 255, 0.95),
            transparent 28%
        ),
        var(--white);

    border: 2px solid var(--line);
    border-radius: var(--card-radius);

    box-shadow: var(--card-shadow);
}

.story-page::before {
    display: none;
}

.story-page::after,
.goal-page::after,
.alphabet-page::after,
.video-page::after,
.practice-page::after,
.finish-page::after {
    content: "";

    position: absolute;
    left: -70px;
    bottom: -80px;

    width: 190px;
    height: 190px;

    background: rgba(28, 176, 246, 0.06);
    border-radius: 50%;
}

.screen-label {
    margin: 0 0 12px;

    color: var(--purple);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}

.story-page h1,
.goal-page h2,
.alphabet-heading h2,
.video-heading h2,
.practice-heading h2,
.finish-page h2 {
    margin: 0;

    color: var(--text);
    font-weight: 700;
    line-height: 1.08;
}

/* ==================================================
   MAIN BUTTON
================================================== */

.main-action-button {
    min-width: 250px;
    padding: 17px 28px 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    border: 0;
    border-bottom: 6px solid var(--green-shadow);
    border-radius: var(--button-radius);

    background:
        linear-gradient(
            180deg,
            #63d90a,
            var(--green)
        );

    color: white;

    box-shadow:
        0 8px 20px
        rgba(88, 204, 2, 0.23);

    font-size: 18px;
    font-weight: 700;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        filter 0.15s ease,
        border-width 0.15s ease;
}

.main-action-button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.main-action-button:active:not(:disabled) {
    transform: translateY(4px);
    border-bottom-width: 2px;
}

.main-action-button:disabled {
    background: #c9c9d1;
    border-bottom-color: #aaaab2;
    box-shadow: none;

    color: #f3f3f5;

    cursor: not-allowed;
}

/* ==================================================
   SCREEN 1 — STORY
================================================== */

.story-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.story-decoration {
    position: absolute;
    inset: 0;

    pointer-events: none;
}

.story-spark {
    position: absolute;

    color: var(--yellow);
    font-size: 26px;

    animation: sparklePulse 1.8s ease-in-out infinite;
}

.spark-one {
    top: 16%;
    left: 18%;
}

.spark-two {
    top: 24%;
    right: 17%;

    animation-delay: -0.7s;
}

.spark-three {
    bottom: 21%;
    right: 24%;

    animation-delay: -1.2s;
}

@keyframes sparklePulse {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.8) rotate(0);
    }

    50% {
        opacity: 1;
        transform: scale(1.15) rotate(12deg);
    }
}

.story-book-icon {
    width: 115px;
    height: 115px;
    margin-bottom: 24px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            var(--purple-soft),
            var(--blue-soft)
        );

    border: 3px solid #e3dbfb;
    border-bottom: 7px solid #d1c5f4;
    border-radius: 34px;

    font-size: 62px;

    animation: iconFloat 2.7s ease-in-out infinite;
}

@keyframes iconFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-8px) rotate(3deg);
    }
}

.story-page h1 {
    max-width: 720px;
    margin-bottom: 22px;

    font-size: clamp(42px, 6vw, 66px);
}

.story-main-text {
    max-width: 680px;
    margin: 0 0 10px;

    color: var(--text-soft);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
}

.story-mission-card {
    width: min(650px, 100%);
    margin: 25px 0 30px;
    padding: 18px 20px;

    display: flex;
    align-items: center;
    gap: 16px;

    background:
        linear-gradient(
            135deg,
            #fff9d9,
            #fff4ba
        );

    border: 2px solid #f3df7a;
    border-bottom: 5px solid #e3ca57;
    border-radius: 24px;

    text-align: left;
}

.mission-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: var(--white);
    border-radius: 18px;

    font-size: 31px;
}

.story-mission-card strong {
    display: block;
    margin-bottom: 4px;

    color: #725b00;
    font-size: 18px;
}

.story-mission-card p {
    margin: 0;

    color: #7d6c2c;
    font-size: 15px;
    line-height: 1.45;
}

/* ==================================================
   SCREEN 2 — GOAL
================================================== */

.goal-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.goal-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 22px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            var(--coral-soft),
            var(--yellow-soft)
        );

    border: 3px solid #ffd7ba;
    border-bottom: 7px solid #f5c499;
    border-radius: 31px;

    font-size: 55px;
}

.goal-page h2 {
    max-width: 700px;
    margin-bottom: 20px;

    font-size: clamp(37px, 5vw, 56px);
}

.goal-description {
    max-width: 680px;
    margin: 0 0 28px;

    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.6;
}

.lesson-goal-list {
    width: min(720px, 100%);
    margin-bottom: 24px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
}

.goal-list-item {
    min-width: 0;
    padding: 17px 13px;

    display: flex;
    align-items: center;
    gap: 11px;

    background: var(--white);
    border: 2px solid var(--line);
    border-bottom: 5px solid #ddddE6;
    border-radius: 22px;

    text-align: left;
}

.goal-list-icon {
    width: 49px;
    height: 49px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 15px;

    font-size: 25px;
}

.purple-icon {
    background: var(--purple-soft);
}

.blue-icon {
    background: var(--blue-soft);
}

.yellow-icon {
    background: var(--yellow-soft);
}

.goal-list-item strong {
    display: block;

    font-size: 16px;
}

.goal-list-item span {
    display: block;
    margin-top: 2px;

    color: var(--text-soft);
    font-size: 12px;
}

.goal-progress-card {
    width: min(660px, 100%);
    margin-bottom: 28px;
    padding: 20px;

    background:
        linear-gradient(
            135deg,
            var(--purple-soft),
            #eef8ff
        );

    border: 2px solid #e1d9f8;
    border-radius: 25px;
}

.goal-progress-heading {
    margin-bottom: 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    text-align: left;
}

.goal-progress-heading span {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
}

.goal-progress-heading strong {
    display: block;
    margin-top: 3px;

    color: var(--purple-dark);
    font-size: 23px;
}

.goal-progress-emoji {
    font-size: 39px;
}

.letters-progress-track {
    height: 15px;
    padding: 3px;

    overflow: hidden;

    background: var(--white);
    border-radius: 999px;
}

.letters-progress-fill {
    width: 0;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--green),
            var(--green-light)
        );

    border-radius: inherit;

    transition: width 0.4s ease;
}

/* ==================================================
   SCREEN 3 — ALPHABET
================================================== */

.alphabet-page {
    min-height: 760px;

    text-align: center;
}

.alphabet-heading {
    position: relative;
    z-index: 1;

    margin-bottom: 24px;
}

.alphabet-heading h2 {
    margin-bottom: 10px;

    font-size: clamp(37px, 5vw, 53px);
}

.alphabet-heading p:last-child {
    margin: 0;

    color: var(--text-soft);
    font-size: 16px;
}

.learned-letters-progress {
    width: min(810px, 100%);
    margin: 0 auto 25px;
    padding: 18px;

    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;

    background:
        linear-gradient(
            135deg,
            var(--purple-soft),
            var(--blue-soft)
        );

    border: 2px solid #dfd8f8;
    border-bottom: 6px solid #d0c7ee;
    border-radius: 27px;
}

.learned-letters-information {
    min-width: 150px;

    display: flex;
    align-items: center;
    gap: 11px;

    text-align: left;
}

.learned-letters-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: var(--white);
    border-radius: 17px;

    font-size: 28px;
}

.learned-letters-information span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
}

.learned-letters-information strong {
    display: block;
    margin-top: 3px;

    color: var(--purple-dark);
    font-size: 23px;
}

.learned-letter-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 6px;
}

.learned-letter-cell,
.book-letter-cell {
    height: 35px;

    display: grid;
    place-items: center;

    background: rgba(255, 255, 255, 0.88);
    border: 2px solid #e3def2;
    border-radius: 10px;

    color: #c2bbd2;
    font-size: 13px;
    font-weight: 700;

    transition: 0.25s ease;
}

.learned-letter-cell.learned,
.book-letter-cell.learned {
    background:
        linear-gradient(
            135deg,
            var(--purple),
            var(--purple-light)
        );

    border-color: var(--purple);
    color: white;

    transform: scale(1.06);

    animation: learnedCellPop 0.42s ease;
}

@keyframes learnedCellPop {
    0% {
        opacity: 0.4;
        transform: scale(0.45);
    }

    70% {
        transform: scale(1.16);
    }

    100% {
        opacity: 1;
        transform: scale(1.06);
    }
}

.letter-learning-card {
    width: min(510px, 100%);
    min-height: 420px;
    margin: 0 auto;
    padding: 27px 34px 34px;

    position: relative;
    z-index: 1;

    background: var(--white);
    border: 3px solid var(--line);
    border-bottom: 8px solid #d9d9e2;
    border-radius: 35px;

    box-shadow:
        0 18px 36px
        rgba(67, 57, 107, 0.08);

    transition: 0.28s ease;
}

.letter-learning-card:hover {
    transform: translateY(-3px);
}

.letter-learning-card.card-pop {
    animation: letterCardPop 0.36s ease;
}

@keyframes letterCardPop {
    50% {
        transform: scale(1.025);
    }
}

.letter-card-status {
    margin-bottom: 17px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.letter-status-badge {
    padding: 8px 11px;

    background: var(--yellow-soft);
    border-radius: 12px;

    color: #9a7900;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.letter-position {
    padding: 8px 11px;

    background: var(--purple-soft);
    border-radius: 12px;

    color: var(--purple-dark);
    font-size: 13px;
    font-weight: 700;
}

.letter-example-emoji {
    margin: 7px 0 15px;

    font-size: 94px;
    line-height: 1;

    animation: exampleEmojiFloat 2.5s ease-in-out infinite;
}

@keyframes exampleEmojiFloat {
    50% {
        transform: translateY(-7px) rotate(2deg);
    }
}

.letter-symbol {
    margin-bottom: 10px;

    color: var(--purple-dark);
    font-size: 78px;
    font-weight: 700;
    line-height: 1;
}

.letter-example-word {
    margin-bottom: 25px;

    color: var(--text);
    font-size: 29px;
    font-weight: 600;
}

.listen-button {
    min-width: 190px;
    padding: 14px 20px 11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border: 0;
    border-bottom: 5px solid var(--blue-dark);
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            #31baf9,
            var(--blue)
        );

    color: var(--white);

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.15s ease;
}

.listen-button:hover {
    transform: translateY(-2px);
}

.listen-button:active {
    transform: translateY(3px);
    border-bottom-width: 2px;
}

.listen-button-icon {
    font-size: 19px;
}

.learned-message {
    min-height: 45px;
    margin-top: 18px;
    padding: 11px 15px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    opacity: 0;

    background: #effbe6;
    border: 2px solid #bce99d;
    border-radius: 16px;

    color: var(--green-dark);
    font-size: 15px;
    font-weight: 700;

    transform: translateY(5px);

    transition: 0.25s ease;
}

.learned-message.show-learned-message {
    opacity: 1;
    transform: translateY(0);
}

.learned-message span {
    width: 24px;
    height: 24px;

    display: grid;
    place-items: center;

    background: var(--green);
    border-radius: 50%;

    color: white;
    font-size: 13px;
}

.letter-navigation {
    width: min(510px, 100%);
    margin: 18px auto;

    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 13px;
}

.letter-navigation-button {
    width: 64px;
    height: 57px;

    border: 0;
    border-bottom: 5px solid #6551ac;
    border-radius: 18px;

    background: var(--purple);
    color: white;

    font-size: 25px;
    font-weight: 700;

    cursor: pointer;
}

.letter-navigation-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.next-letter-button {
    min-height: 57px;
    padding: 13px 20px 10px;

    border: 0;
    border-bottom: 5px solid var(--green-shadow);
    border-radius: 18px;

    background: var(--green);
    color: white;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
}

.alphabet-finish-button {
    position: relative;
    z-index: 1;

    margin-top: 3px;
}

/* ==================================================
   SCREEN 4 — VIDEOS
================================================== */

.video-page {
    text-align: center;
}

.video-heading {
    position: relative;
    z-index: 1;

    margin-bottom: 30px;
}

.video-heading h2 {
    margin-bottom: 12px;

    font-size: clamp(37px, 5vw, 53px);
}

.video-heading p:last-child {
    max-width: 670px;
    margin: 0 auto;

    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.55;
}

.video-card-grid {
    margin-bottom: 30px;

    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.learning-video-card {
    min-height: 400px;
    padding: 28px 24px;

    display: flex;
    flex-direction: column;
    align-items: center;

    background: var(--white);
    border: 3px solid var(--line);
    border-bottom: 8px solid #dcdce5;
    border-radius: 31px;

    transition: 0.22s ease;
}

.learning-video-card:hover {
    transform: translateY(-6px) rotate(-0.5deg);
}

.learning-video-card:nth-child(2):hover {
    transform: translateY(-6px) rotate(0.5deg);
}

.song-video-card {
    background:
        linear-gradient(
            180deg,
            #fffdf0,
            var(--white)
        );

    border-color: #f3e59b;
    border-bottom-color: #dfcc70;
}

.writing-video-card {
    background:
        linear-gradient(
            180deg,
            #f2f9ff,
            var(--white)
        );

    border-color: #cceafb;
    border-bottom-color: #a6d6ee;
}

.video-card-illustration {
    width: 94px;
    height: 94px;
    margin-bottom: 19px;

    display: grid;
    place-items: center;

    background: rgba(255, 255, 255, 0.85);
    border-radius: 27px;

    font-size: 52px;
}

.video-card-label {
    margin-bottom: 9px;

    color: var(--purple);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.learning-video-card h3 {
    margin: 0 0 12px;

    font-size: 25px;
    line-height: 1.15;
}

.learning-video-card p {
    flex: 1;

    margin: 0 0 22px;

    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.5;
}

.video-link-button {
    width: 100%;
    padding: 14px 17px 11px;

    border-bottom: 5px solid var(--blue-dark);
    border-radius: 17px;

    background: var(--blue);
    color: white;

    font-weight: 700;
    text-decoration: none;
}

/* ==================================================
   SCREEN 5 — PRACTICE MAP
================================================== */

.practice-page {
    text-align: center;
}

.practice-heading {
    position: relative;
    z-index: 1;

    margin-bottom: 30px;
}

.practice-heading-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 18px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            var(--purple-soft),
            var(--blue-soft)
        );

    border-radius: 27px;

    font-size: 48px;
}

.practice-heading h2 {
    margin-bottom: 10px;

    font-size: clamp(37px, 5vw, 53px);
}

.practice-heading p:last-child {
    margin: 0;

    color: var(--text-soft);
    font-size: 16px;
}

.practice-map {
    width: min(650px, 100%);
    margin: 0 auto 28px;

    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.practice-level {
    width: min(350px, 100%);
    min-height: 100px;
    padding: 16px 20px;

    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: center;
    column-gap: 15px;

    border: 3px solid #e5e5ec;
    border-bottom: 7px solid #d6d6df;
    border-radius: 25px;

    background: white;
    color: var(--text);

    text-align: left;

    cursor: pointer;

    transition: 0.2s ease;
}

.practice-level:nth-of-type(3) {
    transform: translateX(55px);
}

.practice-level:nth-of-type(5) {
    transform: translateX(-45px);
}

.practice-level:nth-of-type(7) {
    transform: translateX(35px);
}

.practice-level:hover {
    filter: brightness(1.02);
}

.active-practice-level {
    border-color: #9fe768;
    border-bottom-color: #72bd3e;
    background: #f3ffe9;
}

.practice-level-icon {
    width: 62px;
    height: 62px;
    grid-row: span 2;

    display: grid;
    place-items: center;

    background: var(--purple-soft);
    border-radius: 19px;

    font-size: 32px;
}

.practice-level strong {
    align-self: end;

    font-size: 18px;
}

.practice-level small {
    align-self: start;

    margin-top: 3px;

    color: var(--text-soft);
    font-size: 12px;
}

.practice-path-line {
    width: 9px;
    height: 33px;

    background:
        repeating-linear-gradient(
            to bottom,
            #d5ccef 0 8px,
            transparent 8px 14px
        );

    border-radius: 999px;
}

.practice-workspace {
    min-height: 150px;
    padding: 24px;

    position: relative;
    z-index: 1;

    display: grid;
    place-items: center;

    background: var(--purple-soft);
    border: 2px dashed #cfc3f3;
    border-radius: 25px;

    color: var(--text-soft);
}

/* ==================================================
   SCREEN 6 — FINISH
================================================== */

.finish-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.finish-confetti-decoration {
    display: flex;
    gap: 20px;

    font-size: 30px;
}

.finish-confetti-decoration span {
    animation: finishStarBounce 1.4s ease-in-out infinite;
}

.finish-confetti-decoration span:nth-child(2) {
    animation-delay: -0.45s;
}

.finish-confetti-decoration span:nth-child(3) {
    animation-delay: -0.9s;
}

@keyframes finishStarBounce {
    50% {
        transform: translateY(-8px) rotate(8deg);
    }
}

.finish-trophy {
    margin: 13px 0 18px;

    font-size: 94px;

    animation: trophyBounce 2s ease-in-out infinite;
}

@keyframes trophyBounce {
    50% {
        transform: translateY(-8px) rotate(3deg);
    }
}

.finish-page h2 {
    max-width: 720px;
    margin-bottom: 16px;

    font-size: clamp(40px, 6vw, 59px);
}

.finish-description {
    max-width: 650px;
    margin: 0 0 27px;

    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.55;
}

.finish-statistics {
    width: min(720px, 100%);
    margin-bottom: 22px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.finish-statistic {
    padding: 18px 12px;

    background: white;
    border: 2px solid var(--line);
    border-bottom: 5px solid #dad9e3;
    border-radius: 22px;
}

.finish-statistic > span {
    display: block;
    margin-bottom: 7px;

    font-size: 29px;
}

.finish-statistic strong {
    display: block;

    color: var(--purple-dark);
    font-size: 23px;
}

.finish-statistic small {
    display: block;
    margin-top: 4px;

    color: var(--text-soft);
    font-size: 12px;
}

.finish-badge {
    width: min(450px, 100%);
    margin-bottom: 27px;
    padding: 16px 18px;

    display: flex;
    align-items: center;
    gap: 15px;

    background:
        linear-gradient(
            135deg,
            var(--yellow-soft),
            var(--purple-soft)
        );

    border: 2px solid #efdf92;
    border-bottom: 5px solid #ddca6a;
    border-radius: 23px;

    text-align: left;
}

.finish-badge-icon {
    width: 63px;
    height: 63px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: white;
    border-radius: 19px;

    font-size: 34px;
}

.finish-badge span {
    display: block;
    margin-bottom: 3px;

    color: #9b7b00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.finish-badge strong {
    font-size: 20px;
}

/* ==================================================
   ACHIEVEMENT TOAST
================================================== */

.achievement-toast {
    position: fixed;
    top: 22px;
    left: 50%;
    z-index: 1500;

    width: min(430px, calc(100% - 28px));
    padding: 15px 17px;

    display: flex;
    align-items: center;
    gap: 14px;

    opacity: 0;
    pointer-events: none;

    background: rgba(255, 255, 255, 0.98);
    border: 3px solid #f0df8b;
    border-bottom: 6px solid #dbc45d;
    border-radius: 24px;

    box-shadow:
        0 20px 45px
        rgba(78, 63, 23, 0.18);

    transform:
        translate(-50%, -45px)
        scale(0.94);

    transition: 0.36s ease;
}

.achievement-toast.show-achievement {
    opacity: 1;

    transform:
        translate(-50%, 0)
        scale(1);
}

.achievement-toast-icon {
    width: 65px;
    height: 65px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: var(--yellow-soft);
    border-radius: 20px;

    font-size: 36px;

    animation: toastIconBounce 1.3s ease-in-out infinite;
}

@keyframes toastIconBounce {
    50% {
        transform: translateY(-5px) rotate(4deg);
    }
}

.achievement-toast-content {
    text-align: left;
}

.achievement-toast-content > span {
    display: block;
    margin-bottom: 3px;

    color: #a27f00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.achievement-toast-content strong {
    display: block;

    color: var(--purple-dark);
    font-size: 19px;
}

.achievement-toast-content p {
    margin: 3px 0 0;

    color: var(--text-soft);
    font-size: 13px;
}

/* ==================================================
   EFFECT LAYERS
================================================== */

.sparkle-layer,
.confetti-layer {
    position: fixed;
    inset: 0;
    z-index: 1400;

    overflow: hidden;
    pointer-events: none;
}

.sparkle-piece {
    position: absolute;

    animation: sparkleFly 0.8s ease-out forwards;
}

@keyframes sparkleFly {
    from {
        opacity: 1;
        transform: translate(0, 0) scale(0.5);
    }

    to {
        opacity: 0;
        transform:
            translate(
                var(--sparkle-x),
                var(--sparkle-y)
            )
            scale(1.3)
            rotate(180deg);
    }
}

.confetti-piece {
    position: absolute;
    top: -20px;

    width: 10px;
    height: 17px;

    border-radius: 3px;

    animation: confettiFall 1.9s linear forwards;
}

@keyframes confettiFall {
    to {
        opacity: 0.25;

        transform:
            translateY(110vh)
            rotate(740deg);
    }
}

/* ==================================================
   TABLET
================================================== */

@media (max-width: 820px) {
    .story-page,
    .goal-page,
    .alphabet-page,
    .video-page,
    .practice-page,
    .finish-page {
        padding: 38px 28px;
    }

    .lesson-goal-list {
        grid-template-columns: 1fr;
    }

    .goal-list-item {
        padding: 14px 17px;
    }

    .video-card-grid {
        grid-template-columns: 1fr;
    }

    .learning-video-card {
        min-height: 330px;
    }

    .learned-letters-progress {
        grid-template-columns: 1fr;
    }

    .learned-letters-information {
        justify-content: center;
        text-align: center;
    }

    .learned-letter-grid {
        grid-template-columns: repeat(9, 1fr);
    }
}

/* ==================================================
   PHONE
================================================== */

@media (max-width: 560px) {
    .lesson-header {
        padding: 11px 10px 0;
    }

    .lesson-navigation {
        padding: 10px;

        gap: 9px;
        border-radius: 20px;
    }

    .lesson-logo {
        min-width: 62px;
        padding: 9px 12px 6px;

        font-size: 19px;
        border-radius: 13px;
    }

    .chapter-number {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .chapter-name {
        font-size: 14px;
    }

    .close-lesson-button {
        width: 40px;
        height: 40px;

        border-radius: 14px;
    }

    .lesson-application {
        width: calc(100% - 18px);
        padding: 23px 0 70px;
    }

    .lesson-progress-area {
        gap: 9px;
    }

    .lesson-progress-track {
        height: 14px;
    }

    .lesson-progress-number {
        min-width: 55px;
        padding: 7px 8px;

        font-size: 12px;
    }

    .story-page,
    .goal-page,
    .alphabet-page,
    .video-page,
    .practice-page,
    .finish-page {
        min-height: 550px;
        padding: 28px 17px;

        border-radius: 27px;
    }

    .story-book-icon {
        width: 89px;
        height: 89px;

        border-radius: 27px;

        font-size: 49px;
    }

    .story-page h1 {
        font-size: 39px;
    }

    .story-main-text {
        font-size: 15px;
    }

    .story-mission-card {
        padding: 14px;
    }

    .mission-icon {
        width: 49px;
        height: 49px;

        font-size: 25px;
    }

    .main-action-button {
        width: 100%;
        min-width: 0;

        font-size: 16px;
    }

    .goal-icon {
        width: 82px;
        height: 82px;

        font-size: 44px;
    }

    .goal-page h2,
    .alphabet-heading h2,
    .video-heading h2,
    .practice-heading h2 {
        font-size: 35px;
    }

    .goal-description,
    .video-heading p:last-child {
        font-size: 15px;
    }

    .goal-progress-card {
        padding: 16px;
    }

    .learned-letters-progress {
        padding: 13px;

        border-radius: 22px;
    }

    .learned-letters-information {
        min-width: 0;
    }

    .learned-letter-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
    }

    .learned-letter-cell,
    .book-letter-cell {
        height: 31px;

        font-size: 11px;
        border-radius: 9px;
    }

    .letter-learning-card {
        min-height: 360px;
        padding: 22px 18px 27px;

        border-radius: 28px;
    }

    .letter-example-emoji {
        font-size: 80px;
    }

    .letter-symbol {
        font-size: 66px;
    }

    .letter-example-word {
        font-size: 24px;
    }

    .letter-card-status {
        margin-bottom: 15px;
    }

    .letter-navigation {
        grid-template-columns: 57px 1fr;
        gap: 10px;
    }

    .letter-navigation-button {
        width: 57px;
        height: 53px;
    }

    .next-letter-button {
        min-height: 53px;

        font-size: 14px;
    }

    .video-card-grid {
        gap: 14px;
    }

    .learning-video-card {
        min-height: 340px;
        padding: 23px 17px;

        border-radius: 26px;
    }

    .practice-level,
    .practice-level:nth-of-type(3),
    .practice-level:nth-of-type(5),
    .practice-level:nth-of-type(7) {
        transform: none;
    }

    .practice-level {
        min-height: 90px;
        grid-template-columns: 56px 1fr;

        padding: 13px;
    }

    .practice-level-icon {
        width: 54px;
        height: 54px;

        font-size: 28px;
    }

    .finish-trophy {
        font-size: 79px;
    }

    .finish-page h2 {
        font-size: 39px;
    }

    .finish-statistics {
        grid-template-columns: 1fr;
    }

    .finish-statistic {
        padding: 14px;
    }

    .achievement-toast {
        top: 12px;
        padding: 12px;

        border-radius: 19px;
    }

    .achievement-toast-icon {
        width: 54px;
        height: 54px;

        font-size: 30px;
    }

    .floating-symbol {
        opacity: 0.05;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   SOFTER FIRST SCREEN
========================================= */

.lesson-application {
    padding-top: 70px;
}

.story-page {
    min-height: 700px;
    padding-top: 72px;
    padding-bottom: 62px;

    background:
        radial-gradient(
            circle at 12% 12%,
            rgba(246, 241, 255, 0.9),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #ffffff,
            #fcfbff
        );
}

.story-book-icon {
    margin-bottom: 28px;

    background:
        linear-gradient(
            135deg,
            #f0ebff,
            #eaf6ff
        );

    border-color: #ddd4f7;
    border-bottom-color: #cfc4ef;

    box-shadow:
        0 12px 28px
        rgba(115, 95, 185, 0.12);
}

.screen-label {
    color: #8c78cf;
}

.story-page h1 {
    color: #343445;
}

.story-main-text {
    color: #77778a;
}

.story-mission-card {
    background:
        linear-gradient(
            135deg,
            #fffaf0,
            #fff5d8
        );

    border-color: #efd98a;
    border-bottom-color: #dbc36c;

    box-shadow:
        0 10px 24px
        rgba(158, 128, 35, 0.08);
}

.mission-icon {
    background: rgba(255, 255, 255, 0.9);
}

.story-mission-card strong {
    color: #6f5a19;
}

.story-mission-card p {
    color: #85733f;
}

/* Более спокойная главная кнопка */

.main-action-button {
    background:
        linear-gradient(
            180deg,
            #8fdc57,
            #72c63b
        );

    border-bottom-color: #58a62a;

    box-shadow:
        0 10px 24px
        rgba(97, 173, 47, 0.2);
}

.main-action-button:hover:not(:disabled) {
    background:
        linear-gradient(
            180deg,
            #99e565,
            #78cc43
        );
}

/* Спокойнее фон */

.lesson-body {
    background:
        radial-gradient(
            circle at 8% 10%,
            rgba(216, 207, 255, 0.34),
            transparent 28%
        ),
        radial-gradient(
            circle at 92% 14%,
            rgba(205, 239, 255, 0.34),
            transparent 29%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(255, 228, 174, 0.2),
            transparent 32%
        ),
        #fafaff;
}

/* Декоративные элементы делаем менее яркими */

.floating-symbol {
    opacity: 0.055;
}

.story-spark {
    color: #e9c95a;
    opacity: 0.75;
}

/* Телефон */

@media (max-width: 560px) {
    .lesson-application {
        padding-top: 38px;
    }

    .story-page {
        min-height: 620px;
        padding-top: 46px;
        padding-bottom: 40px;
    }
}

.main-action-button {

    background:
        linear-gradient(
            180deg,
            #f7efcf 0%,
            #edf2cf 55%,
            #e2edcf 100%
        );

    color: #5f644d;

    border-bottom: 5px solid #cbd5b0;

    box-shadow:
        0 12px 24px rgba(170,180,150,.18);
}

.main-action-button:hover{

    background:
        linear-gradient(
            180deg,
            #faf3d9,
            #f1f6d8,
            #e8f2d7
        );
}

.lesson-navigation::before,
.lesson-navigation::after{
    display:none !important;
}

.lesson-header::before,
.lesson-header::after{
    display:none !important;
}

.lesson-header {
    width: 100% !important;
    min-height: 0 !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.lesson-header::before,
.lesson-header::after {
    content: none !important;
    display: none !important;
}

.lesson-progress-area {
    position: relative !important;
    top: 130px !important;

    width: min(700px, calc(100% - 40px)) !important;
    margin: 0 auto 100px !important;
}

.story-page,
.goal-page,
.alphabet-page,
.video-page,
.practice-page,
.finish-page {

    background:
        linear-gradient(
            180deg,
            #fffefb 0%,
            #fcfaf5 100%
        );
}

/* =========================================
   SOFT MILKY ALPHABET SCREEN
========================================= */

.alphabet-page {
    background:
        linear-gradient(
            180deg,
            #fffefc 0%,
            #f9f6f0 100%
        );

    border-color: #eee7dc;

    box-shadow:
        0 20px 55px
        rgba(132, 119, 93, 0.08);
}

.alphabet-heading h2 {
    color: #575169;
}

.alphabet-heading p:last-child {
    color: #817d88;
}

/* Блок прогресса букв */

.learned-letters-progress {
    background:
        linear-gradient(
            135deg,
            #f5f1fb,
            #f0f5f1
        );

    border-color: #e6dfef;
    border-bottom-color: #d8cfdf;

    box-shadow:
        0 12px 26px
        rgba(105, 91, 130, 0.08);
}

.learned-letters-icon {
    background: #fffdfa;

    box-shadow:
        0 5px 14px
        rgba(111, 98, 77, 0.08);
}

.learned-letters-information span {
    color: #8b8791;
}

.learned-letters-information strong {
    color: #766c99;
}

/* Маленькие клетки букв */

.learned-letter-cell,
.book-letter-cell {
    background: rgba(255, 253, 249, 0.92);

    border-color: #e8e1d9;

    color: #c5beb7;
}

.learned-letter-cell.learned,
.book-letter-cell.learned {
    background:
        linear-gradient(
            135deg,
            #b5a9d4,
            #c7bddf
        );

    border-color: #b5a9d4;

    color: #fffdf9;

    box-shadow:
        0 5px 12px
        rgba(120, 102, 160, 0.15);
}

/* Главная карточка буквы */

.letter-learning-card {
    background:
        linear-gradient(
            180deg,
            #fffefc,
            #fbf8f2
        );

    border-color: #eee7dd;
    border-bottom-color: #ddd4c7;

    box-shadow:
        0 18px 38px
        rgba(122, 108, 84, 0.09);
}

.letter-symbol {
    color: #786e9b;
}

.letter-example-word {
    color: #585363;
}

.letter-status-badge {
    background: #f5efcf;

    color: #857744;
}

.letter-position {
    background: #f0ecf7;

    color: #766b9a;
}

/* Голубая кнопка становится мягче */

.listen-button {
    background:
        linear-gradient(
            180deg,
            #a9d6e8,
            #93c8dd
        );

    border-bottom-color: #77adc4;

    color: #ffffff;

    box-shadow:
        0 8px 18px
        rgba(110, 168, 193, 0.18);
}

.listen-button:hover {
    background:
        linear-gradient(
            180deg,
            #b5deed,
            #9fd1e3
        );
}

/* Сообщение "Літеру вивчено" */

.learned-message {
    background: #f1f5e9;

    border-color: #d5dfc3;

    color: #6f7b58;
}

.learned-message span {
    background: #a8bd86;
}

/* Кнопки навигации */

.letter-navigation-button {
    background:
        linear-gradient(
            180deg,
            #aaa0cb,
            #9489b8
        );

    border-bottom-color: #786d9d;

    box-shadow:
        0 7px 16px
        rgba(111, 96, 151, 0.16);
}

.next-letter-button {
    background:
        linear-gradient(
            180deg,
            #f3ebc9,
            #e6e8c9
        );

    border-bottom-color: #c9cba8;

    color: #626650;

    box-shadow:
        0 8px 18px
        rgba(157, 157, 119, 0.15);
}

.next-letter-button:hover {
    background:
        linear-gradient(
            180deg,
            #f7f0d6,
            #ecefd4
        );
}

/* Кнопка перехода к видео */

.alphabet-finish-button:not(:disabled) {
    background:
        linear-gradient(
            180deg,
            #f4edcf,
            #e6ebd3
        );

    border-bottom-color: #c7cdb0;

    color: #5d624f;
}

/* Телефон */

@media (max-width: 560px) {
    .alphabet-page {
        padding-top: 34px;
    }

    .learned-letters-progress {
        margin-bottom: 20px;
    }

    .letter-learning-card {
        min-height: 345px;
    }
}

/* =========================================
   POLISHED LETTER ANIMATIONS
========================================= */

/* Плавное появление экрана */

.lesson-screen.active-screen {
    animation: softScreenEnter 0.5s
        cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes softScreenEnter {
    0% {
        opacity: 0;
        transform:
            translateY(24px)
            scale(0.985);
    }

    70% {
        transform:
            translateY(-3px)
            scale(1.003);
    }

    100% {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

/* Живое появление новой карточки */

.letter-learning-card.card-pop {
    animation: softLetterChange 0.42s
        cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes softLetterChange {
    0% {
        opacity: 0.45;
        transform:
            translateX(18px)
            scale(0.97);
    }

    65% {
        transform:
            translateX(-3px)
            scale(1.01);
    }

    100% {
        opacity: 1;
        transform:
            translateX(0)
            scale(1);
    }
}

/* Эмодзи слегка плавает */

.letter-example-emoji {
    animation: gentleIllustrationFloat 3s
        ease-in-out infinite;
}

@keyframes gentleIllustrationFloat {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(-1deg);
    }

    50% {
        transform:
            translateY(-7px)
            rotate(1.5deg);
    }
}

/* Буква появляется мягко */

.letter-symbol {
    animation: letterSymbolAppear 0.5s
        cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes letterSymbolAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Кнопка прослушивания */

.listen-button {
    position: relative;
    overflow: hidden;
}

.listen-button::after {
    content: "";

    position: absolute;
    inset: 0;

    opacity: 0;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.55),
            transparent 65%
        );

    transform: scale(0.2);
    transition: 0.35s ease;
}

.listen-button:active::after {
    opacity: 1;
    transform: scale(1.5);
}

.listen-button:active {
    transform: translateY(3px) scale(0.98);
}

/* Сообщение "Літеру вивчено" */

.learned-message.show-learned-message {
    animation: learnedMessageEnter 0.5s
        cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes learnedMessageEnter {
    0% {
        opacity: 0;
        transform:
            translateY(10px)
            scale(0.94);
    }

    70% {
        transform:
            translateY(-2px)
            scale(1.015);
    }

    100% {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

/* Галочка слегка подпрыгивает */

.learned-message.show-learned-message span {
    animation: learnedCheckBounce 0.55s ease;
}

@keyframes learnedCheckBounce {
    0% {
        transform: scale(0) rotate(-25deg);
    }

    70% {
        transform: scale(1.2) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

/* Изученная клетка */

.learned-letter-cell {
    position: relative;
}

.learned-letter-cell.learned {
    animation: learnedLetterPop 0.55s
        cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes learnedLetterPop {
    0% {
        opacity: 0.35;
        transform:
            scale(0.45)
            rotate(-8deg);
    }

    68% {
        transform:
            scale(1.18)
            rotate(3deg);
    }

    100% {
        opacity: 1;
        transform:
            scale(1.06)
            rotate(0);
    }
}

/* Маленькая галочка на изученной букве */

.learned-letter-cell.learned::after {
    content: "✓";

    position: absolute;
    top: -5px;
    right: -5px;

    width: 16px;
    height: 16px;

    display: grid;
    place-items: center;

    background: #a8bd86;
    border: 2px solid #fffdf9;
    border-radius: 50%;

    color: white;
    font-size: 9px;
    font-weight: 700;

    animation: tinyCheckAppear 0.45s ease;
}

@keyframes tinyCheckAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Всплывающее достижение */

.achievement-toast.show-achievement {
    animation: achievementEnter 0.55s
        cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes achievementEnter {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -45px)
            scale(0.88);
    }

    70% {
        transform:
            translate(-50%, 5px)
            scale(1.02);
    }

    100% {
        opacity: 1;
        transform:
            translate(-50%, 0)
            scale(1);
    }
}

/* Более приятное нажатие стрелок */

.letter-navigation-button,
.next-letter-button {
    transition:
        transform 0.15s ease,
        filter 0.15s ease,
        box-shadow 0.15s ease;
}

.letter-navigation-button:hover:not(:disabled),
.next-letter-button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.025);
}

.letter-navigation-button:active:not(:disabled),
.next-letter-button:active:not(:disabled) {
    transform:
        translateY(3px)
        scale(0.985);
}

/* Телефон */

@media (max-width: 560px) {
    .letter-example-emoji {
        animation-duration: 3.5s;
    }

    .learned-letter-cell.learned::after {
        top: -4px;
        right: -4px;

        width: 14px;
        height: 14px;

        font-size: 8px;
    }
}

/* =========================================
   ALPHABET SUCCESS SCREEN
========================================= */

.alphabet-success-page {
    min-height: 650px;
    padding: 48px;

    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            180deg,
            #fffefc 0%,
            #f9f6f0 100%
        );

    border: 2px solid #eee7dc;
    border-radius: var(--card-radius);

    box-shadow:
        0 20px 55px
        rgba(132, 119, 93, 0.08);

    text-align: center;
}

.alphabet-success-page::before {
    content: "";

    position: absolute;
    top: -90px;
    right: -80px;

    width: 230px;
    height: 230px;

    background: rgba(181, 169, 212, 0.1);
    border-radius: 50%;
}

.alphabet-success-page::after {
    content: "";

    position: absolute;
    bottom: -90px;
    left: -70px;

    width: 210px;
    height: 210px;

    background: rgba(201, 218, 188, 0.1);
    border-radius: 50%;
}

.success-stars {
    position: relative;
    z-index: 1;

    margin-bottom: 12px;

    display: flex;
    align-items: center;
    gap: 20px;

    color: #d9c681;
    font-size: 25px;
}

.success-stars span {
    animation: successStarFloat 1.8s ease-in-out infinite;
}

.success-stars span:nth-child(2) {
    font-size: 35px;
    animation-delay: -0.6s;
}

.success-stars span:nth-child(3) {
    animation-delay: -1.2s;
}

@keyframes successStarFloat {
    50% {
        transform:
            translateY(-7px)
            rotate(7deg);
    }
}

.success-icon {
    width: 105px;
    height: 105px;
    margin-bottom: 22px;

    position: relative;
    z-index: 1;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            #f5efcf,
            #eee9f6
        );

    border: 3px solid #e9dfbf;
    border-bottom: 7px solid #d8cda8;
    border-radius: 32px;

    font-size: 57px;

    animation: successIconBounce 2.4s ease-in-out infinite;
}

@keyframes successIconBounce {
    50% {
        transform:
            translateY(-7px)
            rotate(3deg);
    }
}

.alphabet-success-page .screen-label,
.alphabet-success-page h2,
.success-description,
.success-statistics,
.next-step-card,
.alphabet-success-page .main-action-button {
    position: relative;
    z-index: 1;
}

.alphabet-success-page h2 {
    max-width: 720px;
    margin: 0 0 17px;

    color: #575169;
    font-size: clamp(39px, 6vw, 58px);
    line-height: 1.08;
}

.success-description {
    max-width: 650px;
    margin: 0 0 27px;

    color: #817d88;
    font-size: 17px;
    line-height: 1.6;
}

.success-statistics {
    width: min(720px, 100%);
    margin-bottom: 23px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.success-statistic {
    min-width: 0;
    padding: 17px 13px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    background: rgba(255, 253, 249, 0.92);
    border: 2px solid #ebe4db;
    border-bottom: 5px solid #ddd4c7;
    border-radius: 21px;

    text-align: left;
}

.success-statistic > span {
    font-size: 29px;
}

.success-statistic strong {
    display: block;

    color: #766c99;
    font-size: 19px;
}

.success-statistic small {
    display: block;
    margin-top: 3px;

    color: #8b8791;
    font-size: 11px;
}

.next-step-card {
    width: min(620px, 100%);
    margin-bottom: 27px;
    padding: 17px 19px;

    display: flex;
    align-items: center;
    gap: 15px;

    background:
        linear-gradient(
            135deg,
            #f6f0da,
            #eef1e4
        );

    border: 2px solid #e6ddbd;
    border-bottom: 5px solid #d4caa5;
    border-radius: 23px;

    text-align: left;
}

.next-step-icon {
    width: 59px;
    height: 59px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: #fffdf9;
    border-radius: 18px;

    font-size: 31px;
}

.next-step-card strong {
    display: block;
    margin-bottom: 4px;

    color: #665f4e;
    font-size: 18px;
}

.next-step-card p {
    margin: 0;

    color: #7c7667;
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 650px) {
    .alphabet-success-page {
        min-height: 580px;
        padding: 30px 17px;

        border-radius: 27px;
    }

    .success-icon {
        width: 88px;
        height: 88px;

        font-size: 48px;
    }

    .alphabet-success-page h2 {
        font-size: 38px;
    }

    .success-description {
        font-size: 15px;
    }

    .success-statistics {
        grid-template-columns: 1fr;
    }

    .success-statistic {
        justify-content: flex-start;
        padding: 13px 17px;
    }

    .next-step-card {
        padding: 14px;
    }
}

.secondary-video-link{

    margin-top:12px;

    display:block;
}

/* =========================================
   PRACTICE TASK 1
========================================= */

.practice-workspace {
    width: min(720px, 100%);
    min-height: 430px;
    margin: 0 auto;
    padding: 30px;

    display: block;

    background:
        linear-gradient(
            180deg,
            #fffefc,
            #f9f6f0
        );

    border: 2px solid #eee7dc;
    border-radius: 28px;

    color: #575169;
}

.practice-task-header {
    margin-bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.practice-task-label,
.practice-task-counter {
    padding: 8px 12px;

    border-radius: 12px;

    font-size: 12px;
    font-weight: 700;
}

.practice-task-label {
    background: #f0ecf7;
    color: #766b9a;
}

.practice-task-counter {
    background: #f5efcf;
    color: #857744;
}

.practice-workspace h3 {
    margin: 0 0 26px;

    color: #575169;
    font-size: clamp(27px, 4vw, 38px);
    text-align: center;
}

.practice-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.practice-choice-button {
    min-height: 100px;

    border: 2px solid #e8e1d9;
    border-bottom: 6px solid #d9d0c5;
    border-radius: 22px;

    background: #fffdfa;
    color: #6f668e;

    font-size: 38px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.practice-choice-button:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: #cfc3df;
}

.practice-choice-button:active:not(:disabled) {
    transform: translateY(3px);
    border-bottom-width: 3px;
}

.practice-choice-button.correct-choice {
    background: #eef4e7;
    border-color: #bfd2a9;
    border-bottom-color: #9fb889;
    color: #647652;

    animation: correctChoicePop 0.4s ease;
}

.practice-choice-button.wrong-choice {
    background: #f8ecec;
    border-color: #dfbcbc;
    border-bottom-color: #c99797;
    color: #9b6666;
}

.practice-choice-button:disabled {
    cursor: default;
}

@keyframes correctChoicePop {
    50% {
        transform: scale(1.04);
    }
}

.practice-feedback {
    min-height: 54px;
    margin: 20px 0 16px;
    padding: 14px 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 17px;

    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.practice-feedback.correct-feedback {
    background: #eef4e7;
    color: #647652;
}

.practice-feedback.wrong-feedback {
    background: #f8ecec;
    color: #9b6666;
}

.practice-next-button {
    margin: 0 auto;
}

.practice-next-button[hidden] {
    display: none;
}

@media (max-width: 560px) {
    .practice-workspace {
        min-height: 390px;
        padding: 22px 15px;
    }

    .practice-choice-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .practice-choice-button {
        min-height: 74px;
        font-size: 30px;
    }

    .practice-workspace h3 {
        font-size: 28px;
    }
}

.practice-result-card {
    min-height: 350px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.practice-result-icon {
    margin-bottom: 18px;
    font-size: 78px;
}

.practice-result-card h3 {
    margin-bottom: 14px;
}

.practice-result-card p {
    margin: 0 0 24px;

    color: #817d88;
    font-size: 17px;
}

.practice-result-card p strong {
    color: #766c99;
}

#practiceWorkspace {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* =========================================
   GAME SCREEN
========================================= */

.game-page {
    min-height: 620px;
    padding: 38px;

    position: relative;

    background:
        linear-gradient(
            180deg,
            #fffefc,
            #f9f6f0
        );

    border: 2px solid #eee7dc;
    border-radius: 32px;

    box-shadow:
        0 20px 55px
        rgba(132, 119, 93, 0.08);
}

.game-back-button {
    padding: 10px 15px;

    border: 0;
    border-radius: 14px;

    background: #f0ecf7;
    color: #766b9a;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
}

.game-back-button:hover {
    background: #e9e3f3;
}

.game-heading {
    max-width: 650px;

    margin:
        30px auto
        28px;

    text-align: center;
}

.game-heading h2 {
    margin: 0 0 10px;

    color: #575169;

    font-size:
        clamp(
            32px,
            5vw,
            46px
        );
}

.game-heading > p:last-child {
    margin: 0;

    color: #817d88;

    font-size: 16px;
}

.game-workspace {
    width: min(720px, 100%);
    min-height: 360px;

    margin: 0 auto;
    padding: 30px;

    background: #fffdfa;

    border: 2px solid #ebe4db;
    border-bottom: 6px solid #ddd4c7;
    border-radius: 28px;
}


/* =========================================
   GAME CHOICES
========================================= */

.game-question {
    margin: 0 0 28px;

    color: #575169;

    font-size:
        clamp(
            27px,
            4vw,
            38px
        );

    font-weight: 800;
    text-align: center;
}

.game-choice-grid {
    display: grid;
    grid-template-columns:
        repeat(2, 1fr);

    gap: 14px;
}

.game-choice {
    min-height: 100px;

    border: 2px solid #e8e1d9;
    border-bottom: 6px solid #d9d0c5;
    border-radius: 22px;

    background: #fffefb;
    color: #706691;

    font-size: 37px;
    font-weight: 800;

    cursor: pointer;

    transition: 0.18s ease;
}

.game-choice:hover:not(:disabled) {
    transform: translateY(-3px);

    border-color: #cabfda;
}

.game-choice.correct {
    background: #eef4e7;

    border-color: #bfd2a9;
    border-bottom-color: #9fb889;

    color: #647652;
}

.game-choice.wrong {
    background: #f8ecec;

    border-color: #dfbcbc;
    border-bottom-color: #c99797;

    color: #9b6666;
}

.game-feedback {
    min-height: 50px;

    margin: 20px 0 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 17px;

    font-weight: 800;
    text-align: center;
}

.game-feedback.correct {
    background: #eef4e7;
    color: #647652;
}

.game-feedback.wrong {
    background: #f8ecec;
    color: #9b6666;
}

.game-next-button {
    margin: 0 auto;
}

.game-next-button[hidden] {
    display: none;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 560px) {

    .game-page {
        min-height: 550px;
        padding: 24px 15px;

        border-radius: 27px;
    }

    .game-workspace {
        min-height: 330px;
        padding: 22px 15px;
    }

    .game-choice-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .game-choice {
        min-height: 72px;
        font-size: 30px;
    }
}

/* =========================================
   PRACTICE MAP STATES
========================================= */

.practice-level:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.25);
}

.practice-level.completed-practice-level {
    background:
        linear-gradient(
            180deg,
            #eef4e7,
            #e5eddc
        );

    border-color: #bfd2a9;
}

.practice-level.completed-practice-level strong {
    color: #647652;
}

.practice-level.locked-practice-level {
    transform: none !important;
}

.game-round-counter {
    width: fit-content;

    margin:
        0 auto
        18px;

    padding: 7px 12px;

    background: #f0ecf7;

    border-radius: 12px;

    color: #766b9a;

    font-size: 12px;
    font-weight: 800;
}

.final-test-emoji {
    display: inline-block;

    margin-bottom: 8px;

    font-size: 56px;
}