:root {
    --bg: #111214;
    --bg2: #1b1d21;
    --line: #2c2f35;
    --text: #e9e9ea;
    --muted: #9aa0a8;
    --accent: #f4c400;
    --accent-ink: #111214;
    --danger: #d9534f;
    --ok: #3fb950;
    --r: 10px;
    --text-2: #d6d8dc;
    --accent-text: #f4c400;
    --top-bg: rgba(14,15,17,.82);
    --heading: #ffffff;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent-text); }
img, video { max-width: 100%; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* Шапка */
.top { border-bottom: 1px solid var(--line); background: rgba(17,18,20,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.top__in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { color: var(--accent-ink); background: var(--accent); font-weight: 800; letter-spacing: .08em; padding: 6px 12px; text-decoration: none; font-size: 15px; }
.logo span { font-weight: 600; }
.langs { display: flex; gap: 4px; }
.langs a { color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 6px; font-size: 14px; }
.langs a.on, .langs a:hover { color: var(--text); background: var(--bg2); }

/* Кнопки и формы */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--r);
       padding: 12px 22px; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--accent); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--small { padding: 8px 14px; font-size: 14px; }
label { display: block; margin: 0 0 12px; color: var(--muted); font-size: 14px; }
input[type=text], input[type=email], input:not([type]) {
    display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.hint { color: var(--muted); font-size: 14px; }
.error { color: #ff8a80; font-size: 14px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--text); text-decoration: none; margin: 2px 4px 2px 0; }

/* Каталог */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.15; margin: 0 0 8px; }
.hero p { color: var(--muted); margin: 0; max-width: 640px; }
.sub { margin: 40px 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding-bottom: 8px; }
.card { display: block; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--text); transition: transform .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card__img { aspect-ratio: 16/10; background: #222 center/cover no-repeat; }
.card__body { padding: 14px 16px 16px; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; margin: 6px 0; }
.meta.big { font-size: 16px; color: var(--text-2); }
.lock { color: var(--accent-text); letter-spacing: 2px; }
.price { font-weight: 800; color: var(--accent-text); margin: 8px 0 0; font-size: 18px; }
.price.big { font-size: 28px; }
.price small { font-size: 14px; color: var(--muted); font-weight: 400; }

/* Страница квеста */
.banner { background: #222 center/cover no-repeat; position: relative; }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.85), rgba(0,0,0,.35)); }
.banner__in { position: relative; padding: 72px 16px 56px; }
.banner h1 { font-size: clamp(30px, 6vw, 54px); margin: 0 0 8px; line-height: 1.1; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.twocol { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; padding-top: 32px; padding-bottom: 40px; }
.prose { min-width: 0; overflow-wrap: anywhere; }
.prose img { height: auto; }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 20px; scroll-margin-top: 80px; }
.panel h2 { margin: 0 0 12px; font-size: 20px; }
ol.leaders { padding: 0; margin: 0 0 10px; counter-reset: n; }
ol.leaders li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); counter-increment: n; }
ol.leaders li span::before { content: counter(n) ". "; color: var(--muted); }
.page { padding-top: 40px; padding-bottom: 60px; }
.center { text-align: center; }
.code { font-size: 26px; letter-spacing: 3px; color: var(--accent); }
.table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; font-size: 14px; }

/* Игра */
.game-body { background-attachment: fixed; background-size: cover; background-position: center; }
.game { padding-top: 16px; padding-bottom: 40px; max-width: 860px; }
.gbar { position: sticky; top: 68px; z-index: 5; backdrop-filter: blur(6px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
        background: rgba(0,0,0,.6); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
.gbar__time { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 800; color: var(--accent); }
.gbar__time small { font-size: 13px; color: #ff8a80; font-weight: 600; }
.share { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 14px; color: var(--muted); }
.share input { flex: 1; min-width: 0; margin: 0; padding: 8px 10px; font-size: 13px; }
.gpanel { background: rgba(27,29,33,.94); padding: 22px; }
.gpanel h2 { margin-top: 0; }
.q { font-size: 18px; white-space: pre-line; overflow-wrap: anywhere; }
.media { display: grid; gap: 12px; margin: 16px 0; }
.media img, .media video { max-width: 100%; height: auto; border-radius: var(--r); display: block; margin: 0 auto; }
.media video { width: 100%; }
.media__item { display: block; justify-self: center; width: 100%; }
.media__item--medium { max-width: 60%; }
.media__item--small { max-width: 280px; }
.media__item--small img, .media__item--medium img { width: 100%; image-rendering: auto; }
@media (max-width: 640px) { .media__item--medium { max-width: 100%; } }
.media audio { width: 100%; }
.embed { position: relative; aspect-ratio: 16/9; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--r); }
.answer { display: flex; gap: 10px; margin: 12px 0 6px; }
.answer input { margin: 0; font-size: 18px; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hintbox { width: 100%; background: rgba(244,196,0,.1); border-left: 3px solid var(--accent); padding: 10px 12px; border-radius: 6px; white-space: pre-line; }
.hintbox img { display: block; margin-top: 8px; border-radius: 6px; }
.solved { background: rgba(63,185,80,.12); border-left: 3px solid var(--ok); padding: 12px 14px; border-radius: 6px; margin: 12px 0 16px; white-space: pre-line; }
.solved b { color: var(--ok); display: block; margin-bottom: 4px; }
.result { font-size: 22px; }

/* Подвал */
.foot { border-top: 1px solid var(--line); margin-top: 40px; color: var(--muted); font-size: 14px; }
.foot__in { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 20px 16px; }
.foot a { color: var(--muted); }

@media (max-width: 860px) {
    .twocol { grid-template-columns: 1fr; }
    .banner__in { padding: 48px 16px 40px; }
    .answer { flex-direction: column; }
    .answer .btn { width: 100%; }
    .gbar__time { font-size: 20px; }
}

/* Страница после оплаты */
.thanks .copyline { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 4px 0 18px; }
.thanks .email { font-size: 18px; overflow-wrap: anywhere; }
.thanks .hint { margin-bottom: 4px; }

/* Разделы страниц */
.section { padding-top: 40px; }
.section h2 { font-size: clamp(22px, 3.2vw, 30px); margin: 0 0 16px; }
.lead { font-size: 18px; color: var(--text-2); max-width: 760px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li { counter-increment: s; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 16px 56px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); }
.steps--compact { grid-template-columns: 1fr; gap: 10px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 6px 0 6px 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.who { margin: 0; display: grid; gap: 12px; }
.who dt { font-weight: 700; }
.who dd { margin: 2px 0 0; color: var(--muted); }
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.review { margin: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.review blockquote { margin: 0 0 10px; }
.review figcaption { color: var(--accent); font-weight: 700; }
.promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(120deg, #2a2408, var(--bg2)); border: 1px solid var(--accent); border-radius: var(--r); padding: 22px; }
.promo h2 { margin: 0 0 6px; }
.promo p { margin: 0; color: var(--text-2); max-width: 640px; }
.faq details { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--text-2); }
.prose-block p { color: var(--text-2); max-width: 860px; }
.crumbs { font-size: 14px; color: var(--muted); padding-top: 14px; padding-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 4px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 24px; }
.facts div { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.main h2 { margin-top: 28px; }
.main h2:first-child { margin-top: 0; }

select { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.sample { margin: 20px 0; }
.sample img { width: 100%; height: auto; border-radius: var(--r); display: block; }
.sample figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }
.cert h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.15; margin: 8px 0 10px; }

/* Карточка и баннер: настоящие картинки (ленивая загрузка, LCP) */
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card__img { overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner { overflow: hidden; }
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::before { z-index: 1; }
.banner__in { z-index: 2; }

@media (max-width: 860px) {
    .two { grid-template-columns: 1fr; }
}

/* Превью сертификата (повторяет PDF) */
.certprev { position: relative; aspect-ratio: 210 / 148; background: radial-gradient(circle at 96% -12%, #1f1b07 0 30%, transparent 30.5%), #111214; border-radius: var(--r); overflow: hidden; display: grid; grid-template-columns: 1.7fr 1fr; gap: 4%; padding: 6% 7%; font-size: clamp(9px, 1.45vw, 14px); }
.certprev__frame { position: absolute; inset: 3.5%; border: 2px solid var(--accent); pointer-events: none; }
.certprev__left, .certprev__right { position: relative; display: flex; flex-direction: column; gap: .35em; }
.certprev .logo { font-size: .85em; align-self: flex-start; }
.certprev small { color: var(--muted); font-size: .75em; }
.certprev__title { font-size: 2.1em; line-height: 1.1; margin-top: .8em; color: #fff; }
.certprev__games { color: var(--accent); font-size: 1.5em; }
.certprev__code { margin-top: .8em; border: 1px dashed var(--accent); background: var(--bg2); padding: .6em .9em; }
.certprev__code b { display: block; font-size: 1.7em; letter-spacing: .12em; color: #fff; }
.certprev__right { justify-content: center; border-left: 1px solid var(--line); padding-left: 6%; }
.certprev__right b { color: var(--accent); }
.certprev__right ol { margin: .3em 0 0; padding-left: 1.2em; color: var(--text-2); font-size: .85em; line-height: 1.4; }
.certprev__right li { margin-bottom: .5em; }

/* Шапка страницы квеста: баннер целиком (16:9, текст на картинке не перекрываем) + информация */
.qhero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: end; padding-top: 8px; padding-bottom: 0; }
.qhero__media { position: relative; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: 0 18px 40px rgba(0,0,0,.45); isolation: isolate; }
.qhero__media::before, .slide__media::before { content: ""; position: absolute; inset: -30px; background: var(--bg) center / cover no-repeat; filter: blur(26px) brightness(.55); z-index: -1; }
.qhero__media img { width: 100%; height: 100%; object-fit: contain; display: block; position: relative; }
.qhero__info { display: flex; flex-direction: column; }
.qhero__info h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.08; margin: 0 0 12px; }
.qhero__info .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.qhero__info .actions .btn { padding-left: 10px; padding-right: 10px; }
.qhero + .twocol { padding-top: 24px; }
.qhero__info .lead { font-size: 16px; margin: 10px 0; }
.gamelang { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.gamelang__label { color: var(--muted); font-size: 14px; margin-right: 2px; }
.gamelang__opt { padding: 5px 12px; border-radius: 99px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.gamelang__opt:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.gamelang__opt.is-on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
@media (max-width: 860px) {
    .qhero { grid-template-columns: 1fr; gap: 16px; align-items: start; }
}

/* Карусель на главной */
.hero--compact { padding: 36px 0 18px; }
.carousel { position: relative; margin-top: 8px; }
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 16px; }
.carousel__track::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 32px; align-items: center;
         padding: 40px 92px; min-height: 420px; overflow: hidden; isolation: isolate; background: #0b0c0d; }
.slide__bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(34px) saturate(1.25) brightness(.42); transform: scale(1.1); z-index: -2; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.15), rgba(0,0,0,.65)); z-index: -1; }
.slide__media { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 24px 60px rgba(0,0,0,.55); isolation: isolate; }
.slide__media img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .6s ease; }
.slide__media:hover img { transform: scale(1.03); }
.slide__kicker { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 14px; margin: 0 0 10px; }
.slide__title { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; margin: 0 0 12px; }
.slide__text { color: var(--text-2); margin: 0 0 18px; }
.slide__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.slide__foot .price { margin: 0; }
.carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
                 background: rgba(17,18,20,.7); color: #fff; font-size: 30px; line-height: 1; backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.carousel__nav:hover { background: var(--accent); color: var(--accent-ink); }
.carousel__nav--prev { left: 26px; }
.carousel__nav--next { right: 26px; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.carousel__dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: width .25s, background .25s; }
.carousel__dots button[aria-selected="true"] { width: 28px; background: var(--accent); }
.carousel.is-single .carousel__nav, .carousel.is-single .carousel__dots { display: none; }
@media (max-width: 860px) {
    .slide { grid-template-columns: 1fr; gap: 16px; padding: 16px 16px 22px; min-height: 0; }
    .carousel__nav { display: none; }
}

/* Сюжет квеста */
.story { max-width: 720px; }
.story p { margin: 0 0 14px; line-height: 1.7; color: var(--text-2); }
.story__lead { font-size: 19px; line-height: 1.6 !important; color: var(--heading) !important; padding-left: 16px; border-left: 3px solid var(--accent); }
.before { margin: 22px 0 6px; background: linear-gradient(135deg, rgba(244,196,0,.08), rgba(244,196,0,.02)); border: 1px solid rgba(244,196,0,.35); border-radius: var(--r); padding: 16px 18px; }
.before h3 { margin: 0 0 10px; font-size: 16px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.before ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.before li { position: relative; padding-left: 28px; }
.before__note::before { content: "!"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.before__tip::before { content: "🎬"; position: absolute; left: 0; top: 0; }

/* Текст под слайдером на главной */
.carousel { margin-top: 20px; }
.intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; align-items: center; padding-top: 44px; }
.intro h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -.01em;
            background: linear-gradient(90deg, #fff 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro .lead { font-size: 18px; line-height: 1.65; color: var(--text-2); margin: 0; }
.intro__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.intro__stats li { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.intro__stats b { display: block; font-size: 28px; line-height: 1.1; color: var(--accent); }
.intro__stats span { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; } }

/* ===== Шапка и меню ===== */
.top { background: var(--top-bg); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.top__in { height: 66px; }
.logo { border-radius: 6px; box-shadow: 0 6px 18px rgba(244,196,0,.25); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link { position: relative; color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s; }
.nav__link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav__link:hover { color: var(--heading); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__cta { margin-left: 8px; padding: 8px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--accent-ink); background: var(--accent); box-shadow: 0 6px 18px rgba(244,196,0,.28); transition: transform .15s, box-shadow .15s; }
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(244,196,0,.38); }
.langs { margin-left: 10px; padding: 3px; border-radius: 99px; background: rgba(255,255,255,.06); }
.langs a { padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.langs a.on { background: #fff; color: var(--accent-ink); }
.burger { display: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: rgba(255,255,255,.07); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .2s; }
.burger span:nth-child(1) { top: 14px; } .burger span:nth-child(2) { top: 20px; } .burger span:nth-child(3) { top: 26px; }
.nav-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.top__link { display: none !important; }
@media (max-width: 960px) {
    .burger { display: block; }
    .nav { position: fixed; left: 0; right: 0; top: 66px; height: calc(100dvh - 66px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 28px;
           background: #0e0f11; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
    .nav-open .nav { transform: none; opacity: 1; pointer-events: auto; }
    .nav-open { overflow: hidden; }
    .nav__link { padding: 12px 8px; font-size: 17px; border-bottom: 1px solid rgba(255,255,255,.05); border-radius: 0; }
    .nav__link::after { display: none; }
    .nav__cta { margin: 12px 0 0; text-align: center; padding: 12px; font-size: 16px; }
    .langs { margin: 12px 0 0; align-self: center; }
}

/* ===== Попап пробной игры ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trial { width: min(760px, calc(100% - 32px)); padding: 0; border: 1px solid rgba(244,196,0,.35); border-radius: 18px; background: #15171a; color: var(--text);
         display: none; grid-template-columns: 0.9fr 1.1fr; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.trial[open] { display: grid; animation: trial-in .35s ease-out; }
.trial::backdrop { background: rgba(5,6,7,.72); backdrop-filter: blur(4px); }
@keyframes trial-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.trial__art { position: relative; min-height: 100%; background: #000; }
.trial__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.trial__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, #15171a); }
.trial__body { padding: 30px 30px 26px 10px; }
.trial__kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: rgba(244,196,0,.1); padding: 4px 10px; border-radius: 99px; }
.trial h2 { font-size: 26px; line-height: 1.15; margin: 12px 0 10px; }
.trial p { color: var(--text-2); margin: 0 0 16px; }
.trial form { display: grid; gap: 10px; }
.trial input { margin: 0; }
.trial__more { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--muted); }
.trial__close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.trial__close:hover { background: rgba(255,255,255,.18); }
@media (max-width: 640px) {
    .trial[open] { grid-template-columns: 1fr; }
    .trial__art { height: 150px; min-height: 0; }
    .trial__art::after { background: linear-gradient(180deg, transparent 40%, #15171a); }
    .trial__body { padding: 6px 20px 22px; }
}

/* Блок о пробной игре на странице квеста */
.trialbox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 26px;
            padding: 16px 18px; border-radius: var(--r); border: 1px dashed rgba(244,196,0,.5); background: rgba(244,196,0,.05); }
.trialbox b { display: block; margin-bottom: 4px; }
.trialbox p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 520px; }

/* Страницы ошибок */
.errpage { padding-top: 80px; padding-bottom: 80px; }
.errpage__code { font-size: 96px; font-weight: 800; line-height: 1; margin: 0 0 12px; color: var(--accent); }
.errpage h1 { margin: 0 0 8px; }

/* Режим проверки в тестовой комнате */
.testbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; padding: 10px 14px; border-radius: var(--r);
           background: #2a1d4a; border: 1px solid #7c5cff; color: #e9e3ff; }
.testbar select { width: auto; flex: 1 1 260px; margin: 0; padding: 8px 10px; }
.testbar__answer code { background: rgba(255,255,255,.12); padding: 3px 8px; border-radius: 6px; color: #fff; font-size: 15px; }


/* ===== Темы ===== */
/* Блоки поверх картинок всегда тёмные — в любой теме. */
.slide, .trial, .certprev, .game-body, .testbar {
    --bg: #111214; --bg2: #1b1d21; --line: #2c2f35; --text: #e9e9ea; --text-2: #d6d8dc; --muted: #9aa0a8;
    --accent-text: #f4c400; --heading: #ffffff; color-scheme: dark;
}
.slide, .certprev { color: var(--text); }
html[data-theme="light"] {
    --bg: #f6f5f1; --bg2: #ffffff; --line: #e4e1d8; --text: #1a1c20; --text-2: #3c424b; --muted: #6b7280;
    --accent-text: #9a7000; --top-bg: rgba(255,255,255,.86); --heading: #111214; color-scheme: light;
}
html[data-theme="light"] body:not(.game-body) { background: var(--bg); }
html[data-theme="light"] .top { border-bottom-color: var(--line); }
html[data-theme="light"] .burger { background: rgba(0,0,0,.06); }
html[data-theme="light"] .burger span { background: var(--text); }
html[data-theme="light"] .langs { background: rgba(0,0,0,.06); }
html[data-theme="light"] .langs a.on { background: #111214; color: #fff; }
html[data-theme="light"] .intro h1 { background: linear-gradient(90deg, #111214 55%, #b88700); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .card, html[data-theme="light"] .panel, html[data-theme="light"] .review,
html[data-theme="light"] .faq details, html[data-theme="light"] .steps li, html[data-theme="light"] .facts div,
html[data-theme="light"] .intro__stats li { box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); }
html[data-theme="light"] .promo { background: linear-gradient(120deg, #fff4c2, #ffffff); }
html[data-theme="light"] .before { background: linear-gradient(135deg, rgba(244,196,0,.16), rgba(244,196,0,.05)); }
html[data-theme="light"] .trialbox { background: rgba(244,196,0,.1); }
html[data-theme="light"] .btn--ghost { color: var(--text); }
html[data-theme="light"] .nav-open .nav, html[data-theme="light"] .nav { background-color: transparent; }
@media (max-width: 960px) { html[data-theme="light"] .nav { background: #ffffff; } }
html[data-theme="light"] .crumbs a, html[data-theme="light"] .foot a { color: var(--muted); }
html[data-theme="light"] .qhero__media, html[data-theme="light"] .slide__media { box-shadow: 0 18px 40px rgba(0,0,0,.18); }
html[data-theme="light"] .error { color: #c0392b; }

/* Переключатель темы */
.theme-toggle { width: 38px; height: 38px; margin-left: 8px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
                background: rgba(255,255,255,.08); color: var(--text); transition: background .2s, transform .2s; }
.theme-toggle:hover { background: rgba(255,255,255,.16); transform: rotate(-12deg); }
html[data-theme="light"] .theme-toggle { background: rgba(0,0,0,.06); }
html[data-theme="light"] .theme-toggle:hover { background: rgba(0,0,0,.12); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: block; }
html[data-theme="light"] .theme-toggle .i-moon { display: none; }
@media (max-width: 960px) { .theme-toggle { margin: 12px auto 0; } }

/* Ссылка для команды на телефоне — поле на отдельной строке */
@media (max-width: 640px) {
    .share { flex-wrap: wrap; }
    .share > span { flex-basis: 100%; }
    .share input { flex: 1 1 auto; }
}

/* Просмотр картинки в игре */
.media a[data-zoom], .hintbox a[data-zoom] { cursor: zoom-in; }
.zoom { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5,6,7,.92); }
.zoom::backdrop { background: transparent; }
.zoom[open] { display: block; animation: zoom-in .2s ease-out; }
@keyframes zoom-in { from { opacity: 0; } to { opacity: 1; } }
.zoom__stage { width: 100%; height: 100%; display: grid; place-items: center; padding: 56px 16px 16px; box-sizing: border-box; overflow: auto; }
.zoom__stage img { max-width: 100%; max-height: calc(100dvh - 72px); border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); cursor: zoom-in; }
.zoom.is-full .zoom__stage { place-items: start center; }
.zoom.is-full .zoom__stage img { max-width: none; max-height: none; cursor: zoom-out; }
.zoom__close { position: fixed; top: 12px; right: 14px; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.zoom__close:hover { background: rgba(255,255,255,.26); }

/* Допродажа на финише */
.upsell { margin-top: 28px; padding: 20px; border-radius: var(--r); border: 1px solid rgba(244,196,0,.4); background: linear-gradient(135deg, rgba(244,196,0,.1), rgba(244,196,0,.02)); text-align: left; }
.upsell h3 { margin: 0 0 4px; font-size: 22px; }
.upsell__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.upsell__item { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s; }
.upsell__item.is-chosen { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(244,196,0,.35); }
.upsell__item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.upsell__body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.upsell__body small { color: var(--muted); }
.upsell__price s { color: var(--muted); font-size: 14px; }
.upsell__price b { color: var(--accent); font-size: 20px; }
.upsell__body .btn { justify-self: start; margin-top: 4px; }
.upsell__form { display: flex; flex-wrap: wrap; gap: 10px; }
.upsell__form input { flex: 1 1 240px; margin: 0; }
.upsell__note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* Ссылка для команды: свернуть/развернуть */
.share[hidden] { display: none; }
.share__hide { flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.share__hide:hover { background: rgba(255,255,255,.24); }
.share__show { display: inline-block; margin: 10px 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.share__show:hover { color: var(--text); border-color: var(--muted); }
.share__show[hidden] { display: none; }

.upsell__form[hidden] { display: none; }
.upsell__badge { display: inline-block; margin: 0 0 10px; padding: 4px 10px; border-radius: 99px; background: #2a1d4a; border: 1px solid #7c5cff; color: #e9e3ff; font-size: 12px; font-weight: 700; }
