.learning-page {
    --learning-font: var(--luvstudy-language-font, "LuvStudyRounded", Arial, sans-serif);
    --learning-content-width: 500px;
    font-family: var(--learning-font);
}

.learning-page #main-content {
    padding-top: 0;
    padding-bottom: calc(var(--menu-h, 70px) + 40px + env(safe-area-inset-bottom));
}

.learning-shell {
    position: relative;
    width: min(100%, var(--site-width, 840px));
    margin: 0 auto;
    color: #fff;
    font-family: var(--learning-font);
}

.learning-shell button {
    font-family: var(--learning-font);
}

.learning-seo {
    width: 100%;
    max-width: 100%;
    margin: 18px auto 0;
    padding: 22px 24px;
    border: 2px solid #bfe7f2;
    border-radius: 20px;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    color: #172032;
    background: #f4fcff;
    font-family: var(--learning-font);
    line-height: 1.55;
}

.learning-seo h2 {
    margin: 0 0 12px;
    color: #075985;
    font-size: clamp(22px, 4.5vw, 28px);
    line-height: 1.2;
}

.learning-seo p {
    margin: 10px 0 0;
}

@media (max-width: 620px) {
    .learning-seo {
        padding: 18px 16px;
        border-radius: 16px;
    }
}

.learning-stage {
    position: relative;
    min-height: 1180px;
    overflow: hidden;
    border: 2px solid #36bfff;
    border-radius: 0px 0px 20px 20px;
    background: #08bdf4 url('../learning/images/Background.webp') center top / cover repeat-y;
    box-shadow: 0 10px 28px rgba(0, 94, 170, .24);
}

.learning-loading {
    display: grid;
    min-height: 700px;
    place-content: center;
    justify-items: center;
    gap: 18px;
    color: #fff;
    font-size: 24px;
    text-shadow: 0 2px 3px #004f93;
}

.learning-spinner {
    width: 66px;
    height: 66px;
    border: 8px solid rgba(255, 255, 255, .38);
    border-top-color: #ffe900;
    border-radius: 50%;
    animation: learning-spin .75s linear infinite;
}

@keyframes learning-spin { to { transform: rotate(360deg); } }

.learning-dashboard,
.learning-scene {
    width: min(100%, var(--learning-content-width));
    min-height: 1180px;
    margin: 0 auto;
    padding: 18px 0 120px;
    box-sizing: border-box;
}

.learning-stars {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    align-items: center;
    gap: 5px;
    min-height: 0;
    aspect-ratio: 25 / 3;
    padding: 11px 22px;
    border: 0;
    box-sizing: border-box;
    background: transparent url('../learning/images/StarsPanel2.png') center / 100% 100% no-repeat;
    box-shadow: none;
}

.learning-stars img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.learning-reward-star {
    position: fixed;
    z-index: 7000;
    display: block;
    margin: 0;
    object-fit: contain;
    pointer-events: none;
    transform-origin: center;
    will-change: transform, opacity;
}

.learning-stars img.is-reward-hit {
    animation: learning-reward-star-hit .16s ease-out;
}

.learning-stars.is-reward-hit {
    animation: learning-reward-panel-hit .18s ease-out;
}

@keyframes learning-reward-star-hit {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

@keyframes learning-reward-panel-hit {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.learning-levels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
    gap: 4px;
    margin-top: 0px;
}

.learning-level {
    display: grid;
    place-items: center;
    min-height: 78px;
    padding: 6px 6px;
    border: 0;
    color: #00ec24;
    background: url('../learning/images/LevelButton.png') center / 100% 100% no-repeat;
    cursor: pointer;
    font-size: clamp(13px, 4.2vw, 22px);
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 1px #095900;
}

html[lang="hy"] .learning-level {
    font-size: var(--learning-armenian-level-font-size);
}

html[lang="hy"] .learning-level__number {
    display: block;
}

.learning-level.is-active {
    min-height: 88px;
    margin-bottom: -7px;
    background-image: url('../learning/images/LevelButton2.png');
}

.learning-level-title {
    display: grid;
    min-height: 112px;
    place-items: center;
    margin: 7px 0 28px;
    padding: 14px 28px;
    color: #ffd913;
    background: url('../learning/images/LevelTitle.png') center / 100% 100% no-repeat;
    font-size: clamp(20px, 5vw, 27px);
    line-height: 1.12;
    text-align: center;
    text-shadow: 0 1px 1px #052f62;
}

.learning-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 0 28px;
}

.learning-stat {
    display: grid;
    min-height: 260px;
    align-content: center;
    justify-items: center;
    padding: 28px 20px 20px;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    text-align: center;
}

.learning-stat--passed { background-image: url('../learning/images/FramePased+Mistakes.png'); }
.learning-stat--mistakes { background-image: url('../learning/images/FramePased+Mistakes2.png'); }

.learning-stat strong {
    display: grid;
    width: min(130px, 60%);
    aspect-ratio: 1;
    place-items: center;
    background: transparent url('../learning/images/Frame2.png') center / contain no-repeat;
    font-size: clamp(25px, 7vw, 35px);
    line-height: 1;
    text-shadow: 0 1px 1px #00335d;
}

.learning-stat--passed strong { color: #00f521; }
.learning-stat--mistakes strong { color: #ff4717; }

.learning-stat span {
    margin-top: 52px;
    color: #ffdc12;
    font-size: clamp(20px, 5vw, 25px);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 1px #00335d;
}

.learning-actions {
    display: grid;
    gap: 24px;
    padding: 0 28px;
}

.learning-actions--two {
    grid-template-columns: 1fr 1fr;
    margin-top: 28px;
}

.learning-image-button {
    -webkit-appearance: none;
    appearance: none;
    min-height: 86px;
    padding: 12px 24px 19px;
    border: 0;
    color: #fff;
    background-color: transparent;
    background-position: center;
    background-size: 95% 100%;
    background-repeat: no-repeat;
    cursor: pointer;
    font-size: clamp(17px, 5vw, 25px);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
}

.learning-image-button:active { transform: translateY(2px); }
.learning-image-button:disabled { cursor: wait; filter: grayscale(.6); opacity: .72; }
.learning-image-button--progress { background-image: url('../learning/images/ProgressButton.png'); }
.learning-image-button--learn { background-image: url('../learning/images/LearnButton.png'); }
.learning-image-button--start,
.learning-image-button--continue { background-image: url('../learning/images/StartTestingButton.png'); }
.learning-image-button--memorize-continue { background-image: url('../language/images/ChooseLNGButton.png'); }
.learning-image-button--mini-start { background-image: url('../language/images/ChooseLNGButton.png'); }
.learning-image-button--close { background-image: url('../language/images/ChooseLNGButton.png'); }

.learning-image-button--start {
    display: block;
    width: min(680px, calc(100% - 56px));
    min-height: 100px;
    margin: 250px auto 0;
}

.learning-completed {
    margin: 26px auto 0;
    color: #fff36b;
    font-size: 30px;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 2px 3px #003f73;
}

.learning-scene {
    position: relative;
}

.learning-stars--scene {
    margin-top: 0;
}

.learning-back {
    position: absolute;
    z-index: 3;
    top: 118px;
    right: 18px;
    width: 74px;
    height: 74px;
    padding: 0;
    border: 0;
    appearance: none;
    background: transparent url('../learning/images/Back.webp') center / contain no-repeat;
    box-shadow: none;
    cursor: pointer;
    font-size: 0;
}

.learning-scene-panel {
    padding: 22px 34px 70px;
}

.learning-scene-panel.learning-scene-panel--test {
    position: relative;
    padding-top: 0;
}

.learning-scene-panel--learning {
    position: relative;
}

.learning-scene-panel--test .learning-round-bar {
    margin-top: 0;
}

.learning-round-divider {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
    object-fit: contain;
    pointer-events: none;
}

.learning-scene-title {
    display: grid;
    min-height: 142px;
    place-items: center;
    margin: 8px -34px 28px;
    padding: 22px 92px;
    border: 4px solid #006da4;
    border-radius: 26px;
    color: #fffacb;
    background: linear-gradient(#0fa6df, #006ea7);
    font-size: clamp(15px, 5vw, 26px);
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 1px #003e67;
}

.learning-scene-title.learning-scene-title--words-frame {
    position: relative;
    isolation: isolate;
    min-height: 0;
    aspect-ratio: 1000 / 200;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    background: transparent url('../learning/images/WordsFrame2.png') center / 100% 100% no-repeat;
    box-shadow: none;
}

.learning-round-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 74px;
    align-items: center;
    min-height: 0;
    aspect-ratio: 20 / 3;
    margin: 4px -34px 12px;
    padding: 8px 18px 8px 34px;
    border: 0;
    box-sizing: border-box;
    background: transparent url('../learning/images/StarsPanel2.png') center / 100% 100% no-repeat;
    font-size: 38px;
    font-weight: 900;
    direction: ltr;
    text-align: center;
    text-shadow: 0 1px 1px #4d006a;
}

.learning-back--in-bar {
    position: static;
    z-index: auto;
    grid-column: 3;
    justify-self: end;
    width: 70px;
    height: 70px;
}

.learning-correct { color: #0cff00; }
.learning-wrong { color: #ff4717; }

.learning-prompt-word,
.learning-prompt-translation {
    margin: 24px 0 30px;
    color: #ffd31a;
    font-size: clamp(20px, 6vw, 38px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px 1px #004169;
}

.learning-prompt-word.learning-prompt--with-divider,
.learning-prompt-translation.learning-prompt--with-divider {
    margin-bottom: 0;
}

.learning-prompt-divider {
    display: block;
    width: 100%;
    margin: 5px auto 0;
    height: 20px;
}

.learning-options {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.learning-option {
    --learning-option-color: rgba(0 208 255 / 96%);
    position: relative;
    isolation: isolate;
    min-height: 120px;
    aspect-ratio: 4 / 1;
    padding: 18px 25px;
    border: 0;
    border-radius: 0;
    appearance: none;
    box-sizing: border-box;
    color: #fff;
    background: transparent url('../learning/images/TestsButton.png') center / 100% 100% no-repeat;
    box-shadow: none;
    cursor: pointer;
    font-size: clamp(30px, 6vw, 37px);
    font-weight: 900;
    text-shadow: 0 1px 1px #003e67;
}

.learning-option::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background: var(--learning-option-color);
    mix-blend-mode: multiply;
    -webkit-mask: url('../learning/images/TestsButton.png') center / 100% 100% no-repeat;
    mask: url('../learning/images/TestsButton.png') center / 100% 100% no-repeat;
}

.learning-option > span {
    display: inline-block;
    position: relative;
    z-index: 1;
    color: #fff;
    transform: translateY(var(--learning-option-text-offset-y, 0));
}

.learning-option.is-correct { --learning-option-color: rgba(75, 255, 102, 0.96); }
.learning-option.is-wrong { --learning-option-color: rgba(255, 98, 77, 0.96); }

.learning-sound {
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.learning-sound--icon {
    width: 62px;
    height: 62px;
}

.learning-sound--labeled {
    min-width: clamp(110px, 38vw, 150px);
    max-width: 100%;
    min-height: clamp(50px, 15vw, 65px);
    grid-auto-flow: column;
    place-content: center;
    align-items: center;
    gap: clamp(6px, 2.5vw, 12px);
    padding: clamp(4px, 2vw, 6px) clamp(7px, 3vw, 15px);
    border-radius: clamp(10px, 5vw, 10px);
    color: #fff;
    background: #2977cc;
    font-size: clamp(18px, 6vw, 25px);
    font-weight: 900;
    line-height: 1.05;
    text-shadow: 0 2px 2px #004a17;
}

.learning-sound img { width: 52px; height: 52px; }
.learning-sound--labeled img {
    width: clamp(34px, 12vw, 52px);
    height: clamp(34px, 12vw, 52px);
}
.learning-sound--labeled span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.learning-sound:disabled { opacity: .45; }

.learning-word-cards {
    display: grid;
    gap: 18px;
}

.learning-word-card {
    --learning-word-frame-color: rgba(86 250 255);
    position: relative;
    isolation: isolate;
    min-height: 190px;
    aspect-ratio: 1040 / 270;
    padding: 22px 100px 22px 28px;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    background: transparent url('../learning/images/WordsFrame.png') center / 100% 100% no-repeat;
    box-shadow: none;
}

.learning-word-card::before,
.learning-progress-item::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background: var(--learning-word-frame-color, transparent);
    mix-blend-mode: multiply;
    -webkit-mask: url('../learning/images/WordsFrame.png') center / 100% 100% no-repeat;
    mask: url('../learning/images/WordsFrame.png') center / 100% 100% no-repeat;
}

.learning-word-card strong,
.learning-progress-item strong {
    position: relative;
    z-index: 1;
    display: block;
    color: #ffd21b;
    font-size: clamp(30px, 6vw, 37px);
    line-height: 1.05;
    text-shadow: 0 1px 1px #000000;
}

.learning-word-card em,
.learning-progress-item em {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 10px;
    color: #4f86ff;
    font-size: clamp(23px, 4.5vw, 28px);
    font-style: normal;
    font-weight: 900;
}

.learning-word-card span,
.learning-progress-item span {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 22px;
    color: #fff;
    font-size: clamp(22px, 4vw, 25px);
    font-weight: 900;
    line-height: 1.18;
    text-shadow: 0 1px 3px #000000;
}

.learning-word-card .learning-sound,
.learning-progress-item .learning-sound {
    position: absolute;
    z-index: 1;
    top: 18px;
    right: 18px;
    min-width: 62px;
    width: 62px;
    min-height: 62px;
    padding: 4px;
}

.learning-word-card .learning-sound img,
.learning-progress-item .learning-sound img { width: 46px; height: 46px; }

.learning-scene-footer {
    margin-top: 50px;
    text-align: center;
}

.learning-scene-footer .learning-image-button { width: min(560px, 100%); }

.learning-assemble-slots,
.learning-assemble-letters {
    position: relative;
    isolation: isolate;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: clamp(78px, 26vw, 105px);
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    justify-content: flex-start;
    gap: clamp(4px, 1.4vw, 7px);
    margin: clamp(12px, 4.4vw, 22px) 0;
    padding: clamp(7px, 2.4vw, 12px);
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    background: transparent url('../learning/images/WordsFrame2.png') center / 100% 100% no-repeat;
}

.learning-assemble-slots {
    --learning-active-assemble-frame-color: var(--learning-assemble-slots-frame-color);
}

.learning-assemble-letters {
    --learning-active-assemble-frame-color: var(--learning-assemble-letters-frame-color);
}

.learning-assemble-slots::before,
.learning-assemble-letters::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    content: "";
    pointer-events: none;
    background: var(--learning-active-assemble-frame-color, transparent);
    mix-blend-mode: multiply;
    -webkit-mask: url('../learning/images/WordsFrame2.png') center / 100% 100% no-repeat;
    mask: url('../learning/images/WordsFrame2.png') center / 100% 100% no-repeat;
}

.learning-letter {
    --learning-letter-color: var(--learning-letter-frame-color);
    position: relative;
    z-index: 1;
    isolation: isolate;
    display: grid;
    width: clamp(38px, 10.8vw, 54px);
    height: clamp(38px, 10.8vw, 54px);
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    appearance: none;
    box-sizing: border-box;
    color: #fff;
    background: transparent url('../learning/images/LetterButton.png') center / 100% 100% no-repeat;
    box-shadow: none;
    cursor: pointer;
    font-size: clamp(23px, 6.4vw, 32px);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 3px 3px #003f4d;
}

.learning-letter::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background: var(--learning-letter-color);
    mix-blend-mode: multiply;
    -webkit-mask: url('../learning/images/LetterButton.png') center / 100% 100% no-repeat;
    mask: url('../learning/images/LetterButton.png') center / 100% 100% no-repeat;
}

.learning-letter > span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    line-height: 1;
    transform: translateY(var(--learning-letter-text-offset-y));
}
.learning-letter--slot {
    --learning-letter-color: var(--learning-letter-slot-frame-color);
    color: #d9fbff;
    cursor: default;
    opacity: var(--learning-letter-empty-opacity);
}
.learning-letter--slot.is-filled {
    --learning-letter-color: var(--learning-letter-filled-frame-color);
    opacity: 1;
}
.learning-letter.is-correct { --learning-letter-color: var(--learning-letter-correct-frame-color); }
.learning-letter.is-wrong { --learning-letter-color: var(--learning-letter-wrong-frame-color); }

.learning-result {
    margin-top: 70px;
    padding: 38px 28px;
    border: 5px solid #3c4451;
    color: #333;
    background: #fffedc;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .4);
    text-align: center;
}

.learning-result h2 { margin: 0 0 40px; color: #ffb800; font-size: 54px; text-shadow: 0 1px 1px #6d5600; }
.learning-result__counts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-size: 34px; font-weight: 900; }
.learning-result__counts strong { display: block; margin-top: 12px; font-size: 65px; }
.learning-result .learning-stars { margin: 34px -12px; }

.learning-result.learning-result--popup-frame {
    display: flex;
    min-height: 0;
    aspect-ratio: 736 / 1040;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15% 9% 15% 8%;
    box-sizing: border-box;
    background: transparent url('../learning/images/PopupFrame.jpg') center / 100% 100% no-repeat;
    box-shadow: none;
}

.learning-result--mini-intro h2 { margin-bottom: 10px; }
.learning-result--mini-intro .learning-info-message { color: #333; text-shadow: none; }
.learning-result--mini-intro .learning-image-button--mini-start {
    width: var(--learning-mini-start-width);
    max-width: 100%;
    height: var(--learning-mini-start-height);
    min-height: 0;
    flex: 0 0 auto;
    margin: 18px auto 0;
    padding: var(--learning-mini-start-padding);
    font-size: var(--learning-mini-start-font-size);
}

.learning-result .learning-stars--result {
    width: 100%;
    min-height: 0;
    aspect-ratio: auto;
    margin: 35px auto;
    padding: 0;
    background: none;
    box-shadow: none;
}

.learning-result .learning-stars--mini-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.learning-result .learning-stars--mini-result img {
    flex: 0 0 clamp(48px, 12vw, 72px);
    width: clamp(48px, 12vw, 72px);
    max-width: 30%;
}

/* Результат обычного теста начинается сразу под верхними звёздами. */
.learning-scene-panel.learning-scene-panel--test-result {
    padding: 0 0 70px;
}

.learning-result--test-result.learning-result--popup-frame {
    width: 100%;
    margin: 0;
}

.learning-modal {
    position: fixed;
    z-index: 5000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.learning-modal[hidden],
.learning-shell [hidden] { display: none !important; }

.learning-modal__shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 35, 70, .82);
}

.learning-modal__card {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(var(--learning-content-width), 100%);
    max-height: calc(100vh - 20px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 4px solid #37c8ff;
    border-radius: 20px;
    color: #fff;
    background: #087cca url('../learning/images/Background.webp') center / cover;
}

.learning-modal__card h2 {
    margin: 0;
    padding: 10px 10px;
    color: #ffe222;
    background: rgba(0, 92, 164, .82);
    font-size: clamp(22px, 5vw, 30px);
    line-height: 1.18;
    text-align: center;
    text-shadow: 0 1px 1px #00335d;
}

.learning-modal__body { overflow: auto; padding: 1px; }
.learning-modal__footer {
    display: grid;
    place-items: center;
}

.learning-modal__footer > .learning-image-button { width: min(520px, calc(75% - 50px)); margin: 70px auto 0px; padding: 0px 0px 10px 0px; }

.learning-progress-list { display: grid; gap: 1px; }
.learning-progress-item { --learning-word-frame-color: #eaf9ff; position: relative; isolation: isolate; min-height: 150px; aspect-ratio: 1040 / 270; padding: 18px 88px 18px 22px; border: 0; border-radius: 0; box-sizing: border-box; background: transparent url('../learning/images/WordsFrame.png') center / 100% 100% no-repeat; }
.learning-progress-item.is-correct { --learning-word-frame-color: rgba(152 255 162); }
.learning-progress-item.is-incorrect { --learning-word-frame-color: rgba(255 178 171); }
.learning-progress-item strong { font-size: 35px; }
.learning-progress-item em { font-size: 27px; }
.learning-progress-item span { margin-top: 12px; font-size: 25px; }

.learning-info-message { font-size: clamp(15px, 5vw, 25px); font-weight: 900; line-height: 1.35; text-align: center; text-shadow: 0 1px 1px #003d69; margin-top: 70px; }

.learning-toast {
    position: fixed;
    z-index: 6000;
    left: 50%;
    bottom: 100px;
    width: min(520px, calc(100% - 30px));
    transform: translateX(-50%);
    padding: 14px 18px;
    border-radius: 16px;
    color: #fff;
    background: #d83b20;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

/* После ширины учебной области 600px размеры элементов больше не увеличиваются. */
.learning-stage,
.learning-dashboard,
.learning-scene { min-height: 920px; }
.learning-dashboard,
.learning-scene { padding-top: 0px; }
.learning-stars { min-height: 0; padding: 0px 10px; gap: 2px; }
.learning-levels { gap: 0px; }
.learning-level { min-height: 45px; }
.learning-level.is-active { min-height: 50px; }
.learning-level-title { min-height: 40px; margin-bottom: 15px; padding-inline: 12px; }
.learning-stats { gap: 5px; padding: 0 0px; }
.learning-stat { min-height: 100px; padding: 15px 0px 15px; }
.learning-stat span { margin: 3px 0px 5px 0px; }
.learning-actions { gap: 20px; padding: 0px 10px 0px 10px; }
.learning-actions--two { margin-top: 15px; }
.learning-image-button { min-height: 60px; padding: 0px 0px 13px; }
.learning-image-button--start { width: calc(85% - 50px); min-height: 75px; margin-top: 200px; font-size: clamp(20px, 7vw, 27px); letter-spacing: 1px; padding: 0px 0px 10px;}
.learning-back { top: 82px; right: 8px; width: 56px; height: 56px; }
.learning-scene-panel { padding: 12px 12px 50px; }
.learning-scene-title { min-height: 104px; margin: 0px -15px 20px; padding: 10px 15px 15px 15px; border-radius: 14px; }
.learning-round-bar { min-height: 0; margin: 2px -12px 8px; padding: 5px 10px 5px 14px; font-size: 25px; }
.learning-back.learning-back--in-bar { position: static; width: 52px; height: 52px; }
.learning-option { min-height: 82px; }
.learning-word-card { min-height: 145px; padding: 16px 75px 16px 18px; }
.learning-word-card .learning-sound,
.learning-progress-item .learning-sound { top: 1px; right: 7px; width: 52px; min-width: 52px; min-height: 52px; }
.learning-word-card .learning-sound img,
.learning-progress-item .learning-sound img { width: 40px; height: 40px; }
.learning-result { margin-top: 35px; padding: 25px 12px; }
.learning-result h2 { font-size: clamp(15px, 8vw, 45px); }
.learning-result__counts { font-size: clamp(15px, 5vw, 25px); }
.learning-result__counts strong { font-size: clamp(30px, 10vw, 50px); }

/* Адаптивность экрана обычного теста на 10 слов. */
.learning-page {
    /* Отдельный размер шрифта только для армянских кнопок уровней. */
    --learning-armenian-level-font-size: clamp(9px, 3vw, 17px);
    /* Здесь можно отдельно менять толщину Lines.webp под верхними звёздами. */
    --learning-round-divider-height: 30px;
    /* Отрицательное значение поднимает текст в трёх кнопках ответа. */
    --learning-option-text-offset-y: -5px;
    /* RGBA-цвет PNG-рамки «Выберите правильный ответ». */
    --learning-test-title-frame-color: rgba(154 193 255);
    /* RGBA-цвета PNG-рамок на отдельных этапах обучения. */
    --learning-memorize-title-frame-color: rgba(178 199 255);
    --learning-listen-title-frame-color: rgba(178 199 255);
    --learning-choice-title-frame-color: rgba(178 199 255);
    --learning-assemble-title-frame-color: rgba(178 199 255);
    --learning-mini-test-title-frame-color: rgba(178 199 255);
    /* RGBA-цвета двух больших рамок и маленьких рамок букв. */
    --learning-assemble-slots-frame-color: rgba(255, 255, 255, 0);
    --learning-assemble-letters-frame-color: rgba(255, 255, 255, 0);
    --learning-letter-frame-color: rgba(0 192 255);
    --learning-letter-slot-frame-color: rgba(255, 255, 255, 0);
    --learning-letter-empty-opacity: .55;
    --learning-letter-filled-frame-color: rgba(0 255 52);
    --learning-letter-correct-frame-color: rgba(0 255 52);
    --learning-letter-wrong-frame-color: rgba(255 106 84);
    /* Небольшая оптическая поправка положения буквы по вертикали. */
    --learning-letter-text-offset-y: clamp(-3px, -.6vw, -2px);
    /* Отдельные размеры кнопки «Продолжить» после теста на 10 слов. */
    --learning-test-result-continue-width: 85%;
    --learning-test-result-continue-height: 60px;
    --learning-test-result-continue-font-size: clamp(17px, 6vw, 25px);
    --learning-test-result-continue-padding: 0 0 10px;
    /* Отдельные размеры кнопки «Начать тест» во вступлении к мини-тесту. */
    --learning-mini-start-width: 85%;
    --learning-mini-start-height: 60px;
    --learning-mini-start-font-size: clamp(17px, 6vw, 25px);
    --learning-mini-start-padding: 0 0 9px;
    /* Отдельные размеры кнопки «Закрыть» в окне прогресса. */
    --learning-progress-close-width: calc(70% - 50px);
    --learning-progress-close-height: 60px;
    --learning-progress-close-font-size: clamp(17px, 5vw, 23px);
    --learning-progress-close-padding: 0 0 10px;
    --learning-progress-footer-background: rgba(0, 92, 164, .82);
    --learning-progress-edge-divider-height: 30px;
    /* Отдельные размеры кнопки «Продолжить» на экране запоминания. */
    --learning-memorize-continue-width: 70%;
    --learning-memorize-continue-height: 60px;
    --learning-memorize-continue-font-size: clamp(17px, 5vw, 25px);
    --learning-memorize-continue-padding: 0 0 10px;
}

.learning-round-divider {
    height: var(--learning-round-divider-height);
    object-fit: fill;
}

.learning-scene-panel--test .learning-round-bar {
    position: relative;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    aspect-ratio: 25 / 3;
    padding: clamp(3px, 1vw, 6px) clamp(6px, 1.6vw, 10px);
    font-size: clamp(18px, 6vw, 33px);
    line-height: 1;
}

.learning-scene-panel--test .learning-round-bar__stat {
    display: grid;
    min-width: 0;
    place-items: center;
    justify-self: stretch;
}

.learning-scene-panel--test .learning-round-bar__answers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, .8vw, 6px);
}

.learning-scene-panel--test .learning-round-bar__separator {
    color: #fff;
}

.learning-scene-panel--test .learning-back--in-bar,
.learning-scene-panel--test .learning-back.learning-back--in-bar {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: clamp(4px, 1.2vw, 8px);
    grid-column: auto;
    width: clamp(24px, 10vw, 55px);
    height: auto;
    max-width: 100%;
    aspect-ratio: 1;
    transform: translateY(-50%);
}

.learning-scene-panel--test .learning-scene-title--words-frame {
    padding: 15px 20px 22px 20px;
    font-size: clamp(15px, 5vw, 27px);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.learning-scene-title--test-choice {
    --learning-active-title-frame-color: var(--learning-test-title-frame-color);
}

.learning-scene-title--memorize {
    --learning-active-title-frame-color: var(--learning-memorize-title-frame-color);
}

.learning-scene-title--listen-choice {
    --learning-active-title-frame-color: var(--learning-listen-title-frame-color);
}

.learning-scene-title--learning-choice {
    --learning-active-title-frame-color: var(--learning-choice-title-frame-color);
}

.learning-scene-title--assemble {
    --learning-active-title-frame-color: var(--learning-assemble-title-frame-color);
}

.learning-scene-title--mini-test-choice {
    --learning-active-title-frame-color: var(--learning-mini-test-title-frame-color);
}

.learning-scene-title--words-frame::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    content: "";
    pointer-events: none;
    background: var(--learning-active-title-frame-color, transparent);
    mix-blend-mode: multiply;
    -webkit-mask: url('../learning/images/WordsFrame2.png') center / 100% 100% no-repeat;
    mask: url('../learning/images/WordsFrame2.png') center / 100% 100% no-repeat;
}

.learning-scene-title--words-frame > span {
    position: relative;
    z-index: 1;
}

.learning-scene-panel--test .learning-options,
.learning-scene-panel--learning .learning-options {
    width: 100%;
    min-width: 0;
    gap: clamp(10px, 4vw, 22px);
    margin-top: clamp(14px, 4vw, 28px);
}

.learning-scene-panel--test .learning-option,
.learning-scene-panel--learning .learning-option {
    width: 90%;
    max-width: 100%;
    min-width: 0;
    justify-self: center;
    min-height: 0;
    aspect-ratio: 4 / 1;
    padding: clamp(9px, 3.5vw, 18px) clamp(12px, 5vw, 25px);
    font-size: clamp(20px, 6vw, 31px);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.learning-image-button--test-result-continue {
    width: var(--learning-test-result-continue-width);
    height: var(--learning-test-result-continue-height);
    min-height: 0;
    flex: 0 0 auto;
    margin-inline: auto;
    padding: var(--learning-test-result-continue-padding);
    font-size: var(--learning-test-result-continue-font-size);
}

.learning-modal--progress .learning-modal__body {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.learning-modal--progress .learning-progress-list {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.learning-progress-loader {
    display: grid;
    min-height: 58px;
    place-items: center;
    color: #ffe222;
    background: rgba(0, 92, 164, .72);
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 2px #00335d;
}

.learning-modal--progress .learning-progress-item,
.learning-scene-panel--learning .learning-word-card {
    --learning-progress-item-padding-right: clamp(57px, 20vw, 60px);
    --learning-progress-item-padding-left: clamp(14px, 5vw, 15px);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: clamp(100px, 29vw, 110px);
    aspect-ratio: auto;
    padding: clamp(8px, 4vw, 10px) var(--learning-progress-item-padding-right) clamp(17px, 4vw, 20px) var(--learning-progress-item-padding-left);
    overflow: hidden;
}

.learning-modal--progress .learning-progress-item strong,
.learning-scene-panel--learning .learning-word-card strong {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.learning-modal--progress .learning-progress-item em,
.learning-scene-panel--learning .learning-word-card em {
    margin-top: clamp(7px, 2vw, 10px);
    font-size: clamp(18px, 5vw, 23px);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.learning-modal--progress .learning-progress-item span,
.learning-scene-panel--learning .learning-word-card span {
    margin-top: clamp(7px, 2vw, 12px);
    margin-right: calc(var(--learning-progress-item-padding-left) - var(--learning-progress-item-padding-right));
    font-size: clamp(17px, 5vw, 25px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.learning-scene-panel--learning .learning-word-cards {
    gap: 5px;
}

.learning-scene-panel--learning .learning-image-button--memorize-continue {
    width: var(--learning-memorize-continue-width);
    max-width: 100%;
    height: var(--learning-memorize-continue-height);
    min-height: 0;
    margin-inline: auto;
    padding: var(--learning-memorize-continue-padding);
    font-size: var(--learning-memorize-continue-font-size);
}

.learning-modal--progress .learning-modal__footer {
    position: relative;
    height: var(--learning-progress-edge-height, auto);
    box-sizing: border-box;
    background: var(--learning-progress-footer-background);
}

.learning-modal--progress .learning-modal__card > h2 {
    position: relative;
}

.learning-modal--progress .learning-modal__card > h2::after,
.learning-modal--progress .learning-modal__footer::before {
    position: absolute;
    z-index: 3;
    left: 0;
    display: block;
    width: 100%;
    height: var(--learning-progress-edge-divider-height);
    content: "";
    background: transparent url('../../images/Lines.webp') center / 100% 100% no-repeat;
    pointer-events: none;
}

.learning-modal--progress .learning-modal__card > h2::after {
    bottom: 0;
    transform: translateY(50%);
}

.learning-modal--progress .learning-modal__footer::before {
    top: 0;
    transform: translateY(-50%);
}

.learning-modal--progress .learning-modal__footer > .learning-image-button--close {
    width: var(--learning-progress-close-width);
    max-width: 100%;
    height: var(--learning-progress-close-height);
    min-height: 0;
    padding: var(--learning-progress-close-padding);
    font-size: var(--learning-progress-close-font-size);
}

/* Порядок игровых элементов остаётся как в приложении, тексты сохраняют RTL. */
html[dir="rtl"] :is(
    .learning-stars,
    .learning-levels,
    .learning-stats,
    .learning-actions--two,
    .learning-result__counts
){
    direction:ltr;
}
html[dir="rtl"] :is(
    .learning-level__label,
    .learning-stat,
    .learning-actions--two .learning-image-button,
    .learning-result__counts > span
){
    direction:rtl;
}
html[dir="rtl"] :is(.learning-assemble-slots, .learning-assemble-letters){
    direction:ltr;
}
html[dir="rtl"] .learning-letter > span{
    direction:ltr;
    unicode-bidi:isolate;
}
