/* ----------------------------------------------------- */
/* Roboto Mono */
@font-face {
    font-family: 'Roboto Mono';
    src: url('resources/fonts/roboto/RobotoMono-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Mono';
    src: url('resources/fonts/roboto/RobotoMono-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Mono';
    src: url('resources/fonts/roboto/RobotoMono-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Mono';
    src: url('resources/fonts/roboto/RobotoMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Mono';
    src: url('resources/fonts/roboto/RobotoMono-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Mono';
    src: url('resources/fonts/roboto/RobotoMono-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Mono';
    src: url('resources/fonts/roboto/RobotoMono-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
/* ----------------------------------------------------- */
/* SPACELAND */
@font-face {
    font-family: 'Spaceland Ten';
    src:url('resources/fonts/spaceland-ten.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


body {margin:0;padding:0;font-family: 'Roboto Mono', sans-serif;font-size:14px;line-height: 1.4;color: #ffffff;box-sizing: border-box;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background: #333333;}
div, p, span, h1, h2, h3, h4, ol {vertical-align: baseline;margin:0;padding:0;box-sizing: border-box;}
*{margin:0; padding:0;box-sizing: border-box;}
#mover{display:none;}
img{max-width:100%;vertical-align:middle;}
.blk{display:block;}
.hide{display: none;}
a {color:#3a84df;outline:none;}
a:hover {color:#b22222;}
a:focus {outline:none;}
.unselectable {-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}
ul, li {margin: 0;padding: 0;list-style: none;}
h1 {color:#fff;text-align: left;font-size: 30px;line-height: 1.2;}
h1 span {display:block;}
h1 span:first-child {color:#FAD201;}
h2 {color:#fff;text-align: left;font-size: 22px;line-height: 1.2;width: 100%;text-transform: uppercase;background-image: url(resources/img/title-bg.png);background-position: right top;background-repeat: no-repeat;background-size: auto 80%;}
h2 span:first-child {color:#FAD201;}

.specification {font-weight: 100; text-align: left; margin-top: 22px;}
.next-mission {display: none;font-weight: 700;width: 100%;height: 50px;font-size: 16px;background:#F3BC12;margin-top: 22px;color: #000;}
.next-mission span {width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;}

#gameHeader {background: #3D3D3F;color: white;display: flex;align-items: center;justify-content: space-between;padding: 16px 20px;background-image: url(resources/img/header-bg.png);background-position: center;background-repeat: no-repeat;background-size: cover;position: relative;z-index: 2;}
#gameHeader .title {text-transform: uppercase;margin: 0px auto;display: flex;flex-direction: column;align-items: center;justify-content: center;text-decoration: none;}
#gameHeader .title p.h1 {font-size: 29px;font-weight: 700; color: #F3BC12;line-height: 100%;}
#gameHeader .title p.h2 {font-size: 15px;font-weight: 300; color: #E7E7E7;letter-spacing: 16%;line-height: 100%;}
#gameHeader .logo img {width: 160px;}
#gameHeader .lang {display: flex;flex-direction: row;align-items: center;color: #fff;justify-content: space-between;position: absolute;top: 50%;right: 20px;transform: translateY(-50%);}
#gameHeader .lang span {display: block;line-height: 1;}
#gameHeader .lang div {font-weight: 400;font-size: 15px;}
#gameHeader .lang a {display: block;color: #FAD201;text-decoration: none;line-height: 1;font-size: 18px;}
#gameHeader .lang .active {cursor: default;color: #FAD201;}
/* #gameHeader .lang .ua {margin-right: 12px;} */
#gameHeader::after {content: '';position: absolute;top: 100%;left: 0px;width: 100%;height: 12px;background-image: url(resources/img/top-line.svg);background-position: left center;background-size: auto 100%;}

#gameFooter {background: #212121;color: white;display: flex;align-items: flex-start;justify-content: flex-start;padding: 28px 0px 20px 0px;flex-direction: column;background-image: url(resources/img/footer-bg.png);background-position: center;background-repeat: no-repeat;background-size: cover;}
#gameFooter .title {text-transform: uppercase;display: flex;flex-direction: column;align-items: center;justify-content: center;text-decoration: none;padding: 0px 18px;}
#gameFooter .title p.h1 {font-size: 29px;font-weight: 700; color: #F3BC12;line-height: 100%;}
#gameFooter .title p.h2 {font-size: 15px;font-weight: 300; color: #E7E7E7;letter-spacing: 16%;line-height: 100%;}
#gameFooter .logo {padding: 0 22px;}
#gameFooter .logo img {width: 220px;}
#gameFooter .author {font-weight: 700;font-size: 14px;margin-top: 22px;padding: 0 18px;}
#gameFooter .author span {display:block;margin-bottom: 10px;font-weight: 400;}
#gameFooter .author .slogan{color: #FAD201;font-size: 15px;}
#gameFooter .copyright {width: 100%;border-top: 1px solid #989898;font-weight: 300;font-size: 15px;color: #989898;margin-top: 18px;padding-top: 16px;padding-left: 10px;padding-right: 10px; text-align: center;display: flex;flex-direction: column;align-items: center;justify-content: flex-start;}
#gameFooter .copyright span {display: block;}
#gameFooter .copyright span:nth-child(2) {margin-top: 4px;}
#gameFooter .copyright a {color: #989898;text-decoration: none;}
#gameFooter .copyright a:hover {text-decoration: underline;}

#questContainer {position: relative;width: 100%;overflow: hidden;background-image: url(resources/img/main-bg.png);background-size: cover;background-position: 0% 0%;background-repeat: no-repeat;padding-bottom: 62px;}
#questContainer::after {content: '';position: absolute;left: 0px;bottom: 0px;width: 100%;height: 12px;background-image: url(resources/img/top-line.svg);background-position: left center;background-size: auto 100%;}

#intro {margin-top: 0;}
#intro .img-preview {margin-top: 24px; margin-bottom: 20px;}
#intro .deco-bttm {width: 100%; text-align: right; position: relative; right: -20px; margin-top: 22px;}
#intro .deco-bttm img {width: 180px;}
#intro p {font-weight: 400;text-align: left;margin-top: 20px;line-height: 1.3;font-size: 16px;}
#start {font-weight: 700;width: 100%;height: 50px;font-size: 20px;display: flex;background:#FAD201;align-items: center;justify-content: center;color: #000000;letter-spacing: 8%;}
#progressBar {position: absolute;opacity: 0;transform: translateX(100%);transition: transform 0.7s ease-in-out, opacity 1.7s ease-in-out;display: flex;justify-content: center;margin-top: 28px;width: calc(100% - 40px);margin: 28px 20px 0px;box-sizing: border-box;background-image: url(resources/img/progress-line.png);background-position: left center;background-size: auto 100%;background-color: #FAD201;border-radius: 5px;}
#progressBar.active {opacity: 1; transform: translateX(0);}
.progress-step {width: 16.666%;height: 6px;background: transparent;transition: background 0.3s;position: relative;}
.progress-step:first-child {border-radius: 5px 0px 0px 5px;}
.progress-step:last-child {border-radius: 0px 5px 5px 0px;}
.progress-step.active {background: #FAD201;}
.progress-step.active:not(:has(~ .active))::after {
    content: '';
    position: absolute;
    top: -6px;
    right: -3px;
    display: block;
    border: 1px solid #2a2a2a;
    background: #FAD201;
    width: 4px;
    height: calc(100% + 10px);
    border-radius: 5px;
}
.progress-step.active:last-child::after{display: none;}
.quest-screen {position: absolute;width: 100%;opacity: 0;transform: translateX(100%);transition: transform 0.5s ease-in-out, opacity 0.3s ease-in-out;display: flex;flex-direction: column;align-items: flex-start;justify-content: center;text-align: center;padding: 54px 20px 0px 20px;box-sizing: border-box;}
.quest-screen .col {width: 100%; display: contents;}
.quest-screen.active {opacity: 1;transform: translateX(0);position: relative;}
.quest-screen.prev {transform: translateX(-100%); opacity: 0;}
.quest-screen .description {font-weight: 400;text-align: left;margin-top: 22px;line-height: 1.3;font-size: 16px;}
.quest-screen .img {margin-top: 22px; margin-bottom: 16px;position:relative;}
.quest-screen .img:after {content: '';position: absolute;left: 0px;top: 100%;width: 100%;height: 12px;background-image: url(resources/img/top-line.svg);background-position: left center;background-size: auto 100%;}
#mission-1.quest-screen .img:after {bottom: 0; right: 5px;}
#mission-2.quest-screen .img:after {bottom: 0px;right: auto;left: 0px;transform: scaleX(-1);}
#mission-3.quest-screen .img:after {bottom: -24px; right: 5px;}
#mission-4.quest-screen .img:after {bottom: 0; right: 5px;}
#mission-5.quest-screen .img:after {bottom: 0; right: 5px;}
#mission-6.quest-screen .img:after {bottom: 0; right: 5px;}
.quest-screen .audio {font-weight: 700; width: 100%; height: 44px; font-size: 13px; display: flex; background: #ffffff; align-items: center; justify-content: center; color: #000;}
.quest-screen .task {text-align: left; margin-top: 32px;}
.quest-screen .task h3 {text-align: left;font-size: 26px;line-height: 1;color: #F3BC12;}
.quest-screen .task p {font-weight: 400;text-align: left;margin-top: 12px;line-height: 1.3;font-size: 16px;}
.quest-screen .task p.qst {font-weight: 400;}
.answers-container {margin-top: 12px; width: 100%;}
.answers-container div {padding: 13px 15px;margin: 5px 0;border: 2px solid #333333;background-color: #000;transition: background 0.3s, border-color 0.3s;font-weight: 500;text-align: left;margin-top: 12px;width: 100%;line-height: 1.2;font-size: 16px;min-height: 50px;display: flex;align-items: center;}
.answers-container div::before {content: '';border: 2px solid #333333;border-radius: 100%;width: 20px;min-width: 20px;height: 20px;margin-right: 10px;background-position: center center;background-repeat: no-repeat;background-size: 61%;}
.answers-container div.selected {background: #241B00; border-color: #F3BC12;}
.answers-container div.selected::before {border-color: #F3BC12;background-image: url(resources/img/disc-yellow.png);}
.answers-container div.correct {background: #232D25; border-color: #7BF312;}
.answers-container div.correct::before {border-color: #7BF312;background-image: url(resources/img/disc-green.png);}
.answers-container div.wrong {background: #2D1F1F; border-color: #FF0000;}
.answers-container div.wrong::before {border-color: #FF0000;background-image: url(resources/img/disc-red.png);}
#verify {margin-top: 10px;font-weight: 700;width: 100%;height: 50px;background: #333333;font-size: 14px;}
#verify span {width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;}
#verify.selected {background: #F3BC12;color: #000000;}
.confirm-ua {font-size: 13px;}
.confirm-en {font-size: 13px;}
.answer {margin-top: 10px;font-weight: 700;width: 100%;height: 50px;font-size: 14px;}
.answer span {width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;}
.answer.correct {background: #eaf5ddfc; color: #3f9b42;}
.answer.wrong {background: #DFBFBC; color: #A02B2B;}
.explanation {margin-top: 22px;background: #2A2820;text-align: left;padding: 22px 18px;display: none;border-left: 2px solid #EDC944;}
.explanation h3 {font-size: 22px;line-height: 1;color: #EDC944;}
.explanation p {font-weight: 400;margin-top: 16px;line-height: 1.3;font-size: 16px;}
.explanation img {margin-top: 16px;}
.explanation .player {padding: 12px 14px;border: 1px solid #F3BC12;margin-bottom: 20px;margin-top: 20px;border-radius: 0px;}
.explanation .player .controls {display: flex;align-items: center;gap: 14px;}
.explanation .player .controls .play-pause {cursor: pointer;border: none;background: transparent;color: #000000;width: 24px;min-width: 24px;height: 24px;display: flex;align-items: center;justify-content: center;}
.explanation .player .controls .play-pause span {display: flex;align-items: center;justify-content: center;width: 100%;height: 100%;}
.explanation .player .controls .play-pause span svg {width: 100%;height: 100%;fill: #F3BC12;}
.explanation .player .controls .play-pause span.pause-icon {display: none;}
.explanation .player .controls .play-pause.playing span.play-icon {display: none;}
.explanation .player .controls .play-pause.playing span.pause-icon {display: flex;}
.explanation .player .controls .progress {flex-grow: 1;height: 6px;background: #D7D7D8;border-radius: 5px;cursor: pointer;}
.explanation .player .controls .progress .progress-filled {height: 100%;background: #F3BC12;width: 0%;border-radius: 5px;position: relative;}
.explanation .player .controls .progress .progress-filled::after {content: '';width: 12px;height: 12px;position: absolute;right: 0px;top: 50%;transform: translate(50%, -50%);background: #F3BC12;border-radius: 100%;}
#end {padding-bottom: 42px;}
#end h2 {text-align: center;background-image: none;}
#end .result {display: flex; flex-direction: column; align-items: center; margin-top: 16px;background-color: #262520;border: 2px solid #F3BC12;padding: 16px;}
#end .result span.final_result.big {font-size: 60px;font-weight: 700;color: #fff;line-height: 1;}
#end .stars {display: flex; justify-content: space-around; align-items: flex-start; width: 200px;}
#end .stars img {display: block; width: 52px;aspect-ratio: 1/1}
#end .result p {font-weight: 400;text-align: center;margin-top: 12px;font-size: 16px;color: #d9d9d9;}
#end .final-text {font-weight: 400;text-align: left;margin-top: 22px;line-height: 1.3;font-size: 16px;}
#end .final-box {display: flex;flex-direction: column;align-items: center;justify-content: center;}
#share {font-weight: 700;width: 100%;height: 50px;display: flex;background: #FAD201;align-items: center;justify-content: center;margin-top: 22px;color: #000;font-size: 14px;}
#again {margin-top: 52px; border: 2px solid #ffffff; font-weight: 700; text-align: center; width: 100%; height: 50px; display: flex; align-items: center; justify-content: center;font-size: 14px;}

@media screen and (max-width: 350px) {
#share {font-size: 12px;}
}

/* - !!!!!!!!!!!! - - - 320 px - - - !!!!!!!!!!!! - */
@media screen and (max-width: 320px) {
.quest-screen {padding: 46px 18px 0px 18px;}
#gameHeader {padding: 10px 18px;}
#gameFooter .copyright {font-size: 12px;}
.confirm-en {font-size: 12px;}
}

/* - !!!!!!!!!!!! - - - 375px - - - !!!!!!!!!!!! - */
@media screen and (min-width: 375px) {
h1 {font-size: 34px;}
h2 {font-size: 26px;}
#start {height: 60px;font-size: 24px;}
#intro p {font-size: 18px;}
.quest-screen .description {font-size: 18px;}
.quest-screen .task p {font-size: 18px;}
.answers-container div {font-size: 18px;min-height: 60px;}
.answers-container div::before {width: 24px;min-width: 24px;height: 24px;}
#verify {height: 60px;font-size: 18px;}
.answer {height: 60px;font-size: 18px;}
.next-mission {height: 60px;font-size: 18px;}
.explanation p {font-size: 18px;}
.explanation h3 {font-size: 26px;}
#end .result p {font-size: 18px;}
#end .final-text {font-size: 18px;}
#gameFooter .author {font-size: 18px;}
#gameFooter .author .slogan {font-size: 18px;}
#share {height: 60px;font-size: 18px;}
#again {height: 60px;font-size: 18px;}
}

/* - !!!!!!!!!!!! - - - 410px - - - !!!!!!!!!!!! - */
@media screen and (min-width: 410px) {
h1 {font-size: 37px;}
h2 {font-size: 29px;}
#start {height: 70px;font-size: 28px;}
#intro p {font-size: 19px;}
.quest-screen .description {font-size: 19px;}
.quest-screen .task h3 {font-size: 29px;}
.quest-screen .task p {font-size: 19px;}
.answers-container div {font-size: 19px;min-height: 70px;}
.answers-container div::before {width: 26px;min-width: 26px;height: 26px;}
#verify {height: 70px;font-size: 19px;}
.answer {height: 70px;font-size: 19px;}
.next-mission {height: 70px;font-size: 19px;}
.explanation p {font-size: 19px;}
#end .result p {font-size: 19px;}
#end .final-text {font-size: 19px;}
#gameHeader {padding: 10px 26px;}
.quest-screen {padding: 54px 26px 0px 26px;}
#gameFooter .logo {padding: 0 0px 0 26px;}
#gameFooter .author {padding: 0 26px;}
#progressBar {margin-left:26px;margin-right: 26px;width: calc(100% - 52px);}
.explanation h3 {font-size: 28px;}
#gameFooter .title {padding: 0px 26px;}
#gameFooter .title p.h1 {font-size: 42px;}
#gameFooter .title p.h2 {font-size: 20px;}
#gameFooter .author {font-size: 19px;}
#gameFooter .author .slogan {font-size: 19px;}
#gameFooter .copyright {padding-left: 26px;padding-right: 26px;}
#share {height: 70px;font-size: 19px;}
#again {height: 70px;font-size: 19px;}
}

/* - !!!!!!!!!!!! - - - 540px - - - !!!!!!!!!!!! - */
@media screen and (min-width: 540px) {
#gameHeader {padding: 10px 40px;}
#gameHeader .logo img {width: 170px;}
#intro {margin-top: 20px;}
#questContainer {width: 500px;margin: 0 auto;}
#progressBar {margin-top: 38px;}
#gameFooter .title {padding: 0px 46px;}
#gameFooter .logo {padding: 0 0px 0 46px;}
#gameFooter .author {padding: 0 46px;}
.quest-screen {margin-top: 62px; padding: 20px 26px 0px 26px;}
#gameFooter .copyright {padding-left: 46px;padding-right: 46px;}
body:before {content:'';width:100%;height:100%;position:fixed;top:0;left:0;z-index: -1;}
.explanation .player {padding: 14px 20px;margin-bottom: 28px;border-width: 2px;}
.explanation .player .controls {gap: 22px;}
.explanation .player .controls .play-pause {width: 36px;min-width: 36px;height: 36px;}
.explanation .player .controls .progress {height: 8px;}
.explanation .player .controls .progress .progress-filled::after {width: 16px;height: 16px;}
}

/* - !!!!!!!!!!!! - - - 1010 px - - - !!!!!!!!!!!! - */
@media screen and (min-width: 1010px) {
#bossContainer {width: 500px; margin: 40px auto; box-shadow: 0 0 10px 0 #00000078; background: #333; border-radius: 8px; overflow: hidden; position: relative;}
#gameHeader {width: 420px;margin: 0 auto;}
#gameFooter .title {padding: 0px 36px;}
#gameFooter .logo {padding: 0 0px 0 36px;}
#gameFooter .author {padding: 0 0 0 36px;}
#gameFooter .copyright {padding-left: 36px;padding-right: 36px;}
#start:hover {cursor:pointer;border: 2px solid #000;}
.answers-container div:hover {background: #000000; border-color: #ffffff;cursor: pointer;}
.answers-container div:hover::before {border-color: #ffffff;}
.answers-container div.selected:hover {background: #241B00; border-color: #F3BC12;cursor: pointer;}
.answers-container div.selected:hover::before {border-color: #F3BC12;background-image: url(resources/img/disc-yellow.png);}
.next-mission:hover {cursor:pointer;border: 2px solid #000;}
#verify.selected:hover {cursor:pointer;border: 2px solid #000;}
.answers-container div.disabled {pointer-events: none;}
#share:hover {cursor:pointer;border: 2px solid #000;}
#again:hover {cursor:pointer;border: 2px solid #FAD201;color: #FAD201;}
}

/* - !!!!!!!!!!!! - - - 1200 px DESKTOP - - - !!!!!!!!!!!! - */
/* Триколонковий flexbox-макет.
   Кожна .quest-screen тепер містить .col-left, .col-center, .col-right */
@media screen and (min-width: 1200px) {

    /* Головний контейнер на всю ширину */
    #bossContainer {
        width: 100%;
        max-width: 1400px;
        max-width: none;
        margin: 24px auto;
        margin: 0px;
        border-radius: 12px;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
    }

    #gameHeader {
        width: 100%;
        padding: 16px 40px;
    }
    #gameHeader .title p.h1 {font-size: 36px;}
    #gameHeader .title p.h2 {font-size: 18px;}

    #gameHeader .lang {
        right: 60px;
    }

    #questContainer {
        background-image: url(resources/img/main-bg-desctop.png);
        width: 100%;
        padding-bottom: 80px;
        flex: 1;
    }

    #gameFooter .author {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 0px 40px;
    }

    #gameFooter .author span {
        width: 100%;
        margin: 0px;
    }

    #gameFooter .author span::first-letter {
        text-transform: capitalize;
    }

    #progressBar {
        max-width: 800px;
        max-width: none;
        width: calc(100% - 80px);
        margin: 38px 40px 0;
    }

    /* === Основна секція місії: flex-рядок з переносом === */
    .quest-screen {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 24px 32px;
        max-width: 1360px;
        max-width: none;
        max-width: 2500px;
        margin: 40px auto 0;
        padding: 20px 40px 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Заголовок h2 — на всю ширину рядка */
    .quest-screen h2 {
        flex: 0 0 100%;
        font-size: 32px;
        padding: 8px 0;
    }

    /* === Три колонки === */
    .quest-screen .col {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    /* Плавний перерозподіл ширини при появі/зникненні правої колонки
       — тільки в секціях місій, не на intro */
    .quest-screen[id^="mission-"] .col {
        transition: flex-basis 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                    flex-grow 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                    opacity 0.45s ease-out;
    }

    /* Ліва колонка — опис + зображення */
    .quest-screen .col-left {
        flex: 1 1 0;
        min-width: 0;
        gap: 20px;
        position: sticky;
        top: 60px;
    }

    /* Центральна колонка — питання, відповіді, кнопка */
    .quest-screen .col-center {
        flex: 1 1 0;
        min-width: 0;
        gap: 0;
        position: sticky;
        top: 60px;
    }

    /* Права колонка — пояснення
       За замовчуванням (поки немає .is-revealed-section на секції) — має flex: 0 і не займає місця.
       Не використовуємо display:none, щоб transition працював.
       ВАЖЛИВО: правило застосовується ТІЛЬКИ до секцій місій (mission-1…mission-10),
       щоб не ховати праву колонку на #intro, де вона завжди має бути видимою. */
    .quest-screen[id^="mission-"] .col-right {
        flex: 0 1 0;
        min-width: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
    }

    /* Коли на секції з'являється клас .is-revealed-section
       (додається JS-ом разом з показом .explanation) — права колонка розгортається */
    .quest-screen[id^="mission-"].is-revealed-section .col-right {
        flex: 1 1 0;
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
    }

    /* Поки правої колонки немає — ліва й центральна мають по 50% простору.
       Це вже реалізовано через flex: 1 1 0 у col-left/col-center — вони самі
       розділять простір, що залишився. Коли col-right стане flex: 1 1 0,
       усі три плавно перейдуть до по ~33%. */

    /* === Стилі вмісту колонок === */

    /* Опис місії */
    .quest-screen .description {
        font-size: 17px;
        margin-top: 0;
    }

    /* Зображення */
    .quest-screen .img {
        margin-top: 0;
        margin-bottom: 0;
    }
    .quest-screen .img img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Блок запитання */
    .quest-screen .task {
        margin-top: 0;
    }
    .quest-screen .task h3 {font-size: 28px;}
    .quest-screen .task p {font-size: 17px;}

    /* Варіанти відповідей */
    .answers-container {
        margin-top: 16px;
    }
    .answers-container div {
        font-size: 16px;
        min-height: 56px;
        padding: 12px 16px;
    }

    /* Кнопка "Підтвердити" */
    .quest-screen #verify {
        height: 56px;
        font-size: 16px;
        margin-top: 16px;
    }

    /* Повідомлення "Вірно/Невірно" */
    .quest-screen .answer {
        height: 56px;
        font-size: 16px;
        margin-top: 10px;
    }

    /* Блок пояснення */
    .explanation {
        margin-top: 0;
        padding: 24px 24px;
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        max-height: none;
        overflow-y: auto;
    }
    .explanation h3 {font-size: 24px;}
    .explanation p {font-size: 15px;}

    /* Декоративна лінія під зображенням */
    #mission-1.quest-screen .img:after,
    #mission-3.quest-screen .img:after,
    #mission-4.quest-screen .img:after,
    #mission-5.quest-screen .img:after,
    #mission-6.quest-screen .img:after {bottom: 0; right: 0;}
    #mission-2.quest-screen .img:after {bottom: 0; right: auto; left: 0;}

    /* Кнопка "ДАЛІ" — на всю ширину рядка внизу, обмежена і центрована */
    .quest-screen .next-mission {
        flex: 0 0 100%;
        max-width: 400px;
        max-width: none;
        margin: 16px auto 0;
        height: 60px;
        font-size: 18px;
    }

    /* === INTRO — двоколонковий макет: зліва заголовок+фото+кнопка, справа текст === */
    #intro {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 24px 40px;
        max-width: 1360px;
        max-width: none;
        max-width: 2500px;
        margin: 40px auto 0;
        padding: 20px 40px 0;
    }
    /* На intro .col показуємо як звичайні колонки (скидаємо display: contents з мобільного) */
    #intro .col {
        display: flex;
        flex-direction: column;
        flex: 1 1 0;
        min-width: 0;
        box-sizing: border-box;
    }
    #intro .col-left {
        gap: 20px;
    }
    #intro .col-right {
        gap: 16px;
    }
    #intro h1 {
        text-align: left;
        font-size: 44px;
    }
    #intro h1 span {text-align: left; display: block;}
    #intro .img-preview {
        width: 100%;
        margin-top: 0;
        margin-bottom: 0;
    }
    #intro p {
        font-size: 22px;
        text-align: left;
        margin-top: 0;
    }
    #intro #start {
        height: 64px;
        font-size: 22px;
        margin-top: 0;
    }

    /* === END — фінальний екран === */
    #end {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 720px;
        margin: 40px auto 0;
        padding: 20px 40px 0;
    }
    #end .final-box {
        width: 100%;
        max-width: 600px;
    }
    #end h2 {
        font-size: 28px;
        text-align: center;
    }
    #again, #share {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Футер */
    #gameFooter .title {padding: 0 40px;}
    #gameFooter .author {padding: 0 40px;}
    #gameFooter .copyright {padding-left: 40px; padding-right: 40px;}
}

/* - !!!!!!!!!!!! - - - 1600px (дуже широкі монітори) - - - !!!!!!!!!!!! - */
@media screen and (min-width: 1600px) {
    .quest-screen {gap: 32px 48px;}
    .quest-screen .description {font-size: 18px;}
    .quest-screen .task p {font-size: 18px;}
    .answers-container div {font-size: 18px;}
    .explanation p {font-size: 18px;}
}

/* ============================================================ */
/* === Тригер 3D-моделі (картинка з бейджем) === */
/* ============================================================ */
.sketchfab-trigger {
    position: relative;
    display: block;
    cursor: pointer;
    overflow: hidden;
}
.sketchfab-trigger img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.sketchfab-trigger:hover img,
.sketchfab-trigger:focus-visible img {
    transform: scale(1.02);
    filter: brightness(0.85);
}
.sketchfab-trigger-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(243, 188, 18, 0.95);
    color: #000;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    pointer-events: none;
}
.sketchfab-trigger-badge svg {
    width: 16px;
    height: 16px;
}
.sketchfab-trigger::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F3BC12'><path d='M8 5v14l11-7z'/></svg>") center/24px no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.sketchfab-trigger:hover::after,
.sketchfab-trigger:focus-visible::after {
    opacity: 1;
}
 
/* ============================================================ */
/* === Модальне вікно 3D-моделі === */
/* ============================================================ */
.model-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.model-modal.is-open {
    display: flex;
}
.model-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}
.model-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    max-height: 100%;
    background: #1a1a1a;
    border: 2px solid #F3BC12;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalAppear 0.25s ease-out;
}
@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
.model-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #262520;
    border-bottom: 1px solid #3a3a3a;
    gap: 16px;
}
.model-modal__title {
    color: #F3BC12;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    margin: 0;
    text-align: left;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.model-modal__close {
    background: transparent;
    border: 1px solid #F3BC12;
    color: #F3BC12;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}
.model-modal__close:hover,
.model-modal__close:focus-visible {
    background: #F3BC12;
    color: #000;
    outline: none;
}
.model-modal__body {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #000;
    display: flex;
}
.model-modal__body iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: 0;
    display: block;
}
 
/* Для десктопа — фіксована висота модалки, щоб iframe не був занадто малим */
@media screen and (min-width: 768px) {
    .model-modal__dialog {
        height: 85vh;
        max-height: 800px;
    }
}
 
/* Для мобільного — модалка на весь екран */
@media screen and (max-width: 767px) {
    .model-modal {
        padding: 0;
    }
    .model-modal__dialog {
        height: 100%;
        max-width: none;
        border: none;
    }
    .model-modal__title {
        font-size: 14px;
    }
}

/* ============================================================ */
/* === Плавна поява блоку з правильною відповіддю === */
/* ============================================================ */
/* Коли JS показує .explanation (inline display: block), ми робимо
   два кадри анімації:
   1. .explanation.is-revealing — стартовий стан (невидимо, стиснуто)
   2. .explanation.is-revealed  — кінцевий стан (видимо, розгорнуто)
   Між цими класами спрацьовує CSS transition. */

.explanation {
    transition:
        opacity 0.45s ease-out,
        max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.45s ease-out,
        margin-top 0.45s ease-out,
        border-left-width 0.3s ease-out;
    overflow: hidden;
    will-change: opacity, max-height, transform;
}

/* Стартовий стан — одразу після появи display:block */
.explanation.is-revealing {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    transform: translateY(-8px);
    border-left-width: 0;
}

/* Кінцевий стан — трансформується до цього через transition */
.explanation.is-revealed {
    opacity: 1;
    max-height: 3000px; /* достатньо багато, щоб вмістити будь-який контент */
    transform: translateY(0);
}

/* Після завершення анімації знімаємо overflow, щоб sticky й скрол працювали нормально */
.explanation.is-done {
    overflow: visible;
    max-height: none;
}