/* Тест «Возраст мозга»: своя тема поверх css/app.css. Взрослая аудитория 40+: крупнее шрифт, спокойные цвета, большие кнопки. */
/* Переменные задаём на :root (этот файл подключён только на страницах теста): иначе html остаётся с фоном детских тестов */
:root, body.t-brain {
  --bg: #f3f5fb; --card: #ffffff; --ink: #161a2e; --muted: #5d647d; --line: #dfe4f1;
  --accent: #3657e0; --accent-ink: #ffffff; --accent-soft: #e3e9ff;
  --ok: #17865c; --warn: #c2452d;
}
body.t-brain { font-size: 17px; }
.t-brain .btn { box-shadow: 0 6px 0 #2540b0; }
.t-brain .btn:active { box-shadow: 0 3px 0 #2540b0; }
.t-brain .btn.line, .t-brain .btn.ghost { box-shadow: none; }
.t-brain .btn.line { box-shadow: inset 0 0 0 2px var(--line); }
.t-brain .tag { background: var(--accent-soft); color: #2540b0; }
.t-brain .spinner { border-color: rgba(54, 87, 224, .22); border-top-color: var(--accent); }
.t-brain .points li::before { background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16 8' fill='none' stroke='%233657e0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.t-brain .price-card { background: #fff; }
.t-brain .renew { background: #eef1fa; font-size: 15px; }
.t-brain .consent-line { font-size: 13px; line-height: 1.45; color: var(--ink); margin: 0; }
.brain h3 { font-size: 18px; margin-top: 4px; }
.brain .lead { font-size: 19px; line-height: 1.45; }
.brain .calc { padding: 22vh 0 0; display: grid; gap: 18px; }
.brain .paywall { display: grid; gap: 14px; margin-top: 4px; }
.brain .emo .opt { display: flex; align-items: center; gap: 12px; }
.brain .opt .em { font-style: normal; font-size: 24px; flex: none; }

/* Первый экран */
.b-hero-art { align-self: center; width: min(52vw, 210px); aspect-ratio: 1; }
.b-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.b-facts li { background: var(--card); border-radius: 16px; padding: 12px 8px; display: grid; gap: 3px; align-content: start; text-align: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.b-facts b { font-size: 17px; line-height: 1.15; color: var(--accent); }
.b-facts span { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.b-preview { position: sticky; top: 0; z-index: 40; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0; padding: 6px 10px; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #ffe45c; background: #161a2e; }

/* Возраст */
.b-age-in { font-size: 34px; text-align: center; font-weight: 800; letter-spacing: .02em; min-height: 72px; }

/* Экран перед заданием */
.b-intro { display: grid; gap: 14px; padding-top: 4vh; }
.b-intro .tag, .b-intro .small { justify-self: start; }
.b-intro .ic { font-size: 54px; line-height: 1; }
.b-intro h1 { font-size: 30px; line-height: 1.12; }
.b-intro p { font-size: 19px; line-height: 1.45; }
.b-dots { display: flex; gap: 6px; }
.b-dots i { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.b-dots i.on { background: var(--accent); }

/* Игры */
.g { display: grid; gap: 14px; flex: 1; align-content: start; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.g-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 17px; }
.g-count { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
.g-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.g-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 8px; transition: width .12s linear; }
.g-body { display: grid; gap: 18px; align-content: start; padding-top: 2vh; }
.g-say { text-align: center; font-size: 20px; font-weight: 700; min-height: 28px; }
.g-big { display: grid; place-items: center; min-height: 150px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); font-size: 64px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; transition: box-shadow .1s; }
.g-big.ok { box-shadow: inset 0 0 0 4px var(--ok); }
.g-big.bad { box-shadow: inset 0 0 0 4px var(--warn); }
.g-big.arrows { font-size: 54px; }
.g-big.arrows span { white-space: nowrap; letter-spacing: .12em; }
.g-big.arrows b { color: var(--ink); }
.g-big.seq { font-size: 30px; padding: 0 10px; text-align: center; }
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.g-three.four { grid-template-columns: repeat(2, 1fr); }
.gbtn { min-height: 84px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line); font-size: 30px; font-weight: 800; touch-action: manipulation; }
.gbtn:active { transform: translateY(2px); box-shadow: inset 0 0 0 2.5px var(--accent); background: var(--accent-soft); }
.gbtn[disabled] { opacity: .45; }
.gbtn.num { font-size: 28px; font-variant-numeric: tabular-nums; }
.gbtn.miss { box-shadow: inset 0 0 0 3px var(--warn); }
.g-two.tall .gbtn { min-height: 150px; font-size: 34px; }
.tiles { display: grid; grid-template-columns: repeat(var(--side), 1fr); gap: 8px; width: min(100%, 380px); margin: 0 auto; }
.tile { aspect-ratio: 1; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); touch-action: manipulation; }
.tile.lit { background: var(--accent); box-shadow: none; }
.tile.hit { background: var(--ok); box-shadow: none; }
.tile.miss { background: var(--warn); box-shadow: none; }
.oddgrid { display: grid; grid-template-columns: repeat(var(--side), 1fr); gap: 6px; width: min(100%, 380px); margin: 0 auto; }
.oc { aspect-ratio: 1; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-size: clamp(20px, 7vw, 30px); font-weight: 700; font-family: Georgia, "Times New Roman", serif; touch-action: manipulation; }
.oc.miss { box-shadow: inset 0 0 0 3px var(--warn); }
.pad { width: 100%; min-height: 46vh; border-radius: 26px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: #8b93ad; touch-action: manipulation; }
.pad.go { background: var(--ok); }
.pad.soon { background: var(--warn); }
.pad.shown { background: var(--ink); font-size: 40px; font-variant-numeric: tabular-nums; }
.g-quit { align-self: center; }

/* Результат */
.b-age { background: linear-gradient(160deg, #3657e0, #5b3fd6); color: #fff; border-radius: 24px; padding: 22px 18px; display: grid; gap: 6px; text-align: center; }
.b-age .lbl { font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.b-age .num { font-size: 92px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.b-age .num small { font-size: 22px; font-weight: 700; letter-spacing: 0; margin-left: 6px; opacity: .85; }
.b-age .delta { justify-self: center; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 16px; }
.b-age .real { font-size: 15px; opacity: .85; }
.b-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b-two > div { background: var(--card); border-radius: 16px; padding: 14px 12px; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; gap: 4px; align-content: start; }
.b-two span { font-size: 13px; color: var(--muted); line-height: 1.25; }
.b-two b { font-size: 20px; }
.b-bars { display: grid; gap: 12px; }
.b-bar { display: grid; grid-template-columns: 138px 1fr 62px; align-items: center; gap: 10px; font-size: 16px; }
.b-bar span { font-weight: 700; white-space: nowrap; }
.b-bar i { height: 14px; border-radius: 14px; background: var(--line); overflow: hidden; }
.b-bar i b { display: block; height: 100%; border-radius: 14px; background: var(--accent); }
.b-bar em { font-style: normal; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.b-bars.locked { position: relative; }
.b-bars.locked .b-bar i b { background: #b9c0d6; filter: blur(4px); }
.b-bars.locked .b-bar em { filter: blur(5px); color: var(--muted); }
.b-lock { text-align: center; font-size: 14px; color: var(--muted); }

/* План и цена */
.b-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b-pick .opt { text-align: center; min-height: 64px; }
.b-pick .opt small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.b-weeks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.b-weeks li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: center; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; }
.b-weeks b { color: var(--accent); font-size: 14px; }
.paywall .b-weeks li::before, .paywall .b-bars li::before { content: none; }
.paywall .b-weeks li { display: grid; }
.b-plans { display: grid; gap: 10px; }
.b-plan { position: relative; display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; text-align: left; border-radius: 16px; padding: 14px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.b-plan.sel { box-shadow: inset 0 0 0 3px var(--accent); background: #f7f9ff; }
.b-plan .dot { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px #b9c0d6; }
.b-plan.sel .dot { box-shadow: inset 0 0 0 7px var(--accent); }
.b-plan .nm { display: grid; gap: 2px; }
.b-plan .nm b { font-size: 18px; }
.b-plan .nm small { font-size: 13.5px; color: var(--muted); }
.b-plan .pr { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.b-plan .best { position: absolute; top: -11px; right: 12px; background: var(--ok); color: #fff; font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.b-guar { display: flex; gap: 10px; align-items: flex-start; background: #e9f6ef; color: #145c40; border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.4; font-weight: 600; }
.b-guar::before { content: "✓"; font-weight: 900; }
.t-brain .fold { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 0 16px; }
.t-brain .fold summary { list-style: none; cursor: pointer; padding: 15px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.t-brain .fold summary::-webkit-details-marker { display: none; }
.t-brain .fold summary::after { content: "+"; font-size: 24px; color: var(--accent); line-height: 1; }
.t-brain .fold[open] summary::after { content: "−"; }
.t-brain .fold[open] { padding-bottom: 16px; }
.t-brain .fold p { font-size: 16px; line-height: 1.45; }
.t-brain .sticky-pay { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -6px 24px rgba(22, 26, 46, .14); transform: translateY(110%); transition: transform .2s; }
.t-brain .sticky-pay.on { transform: none; }
.t-brain .sticky-pay span { display: grid; font-size: 14px; color: var(--muted); }
.t-brain .sticky-pay span b { font-size: 20px; color: var(--ink); }
.t-brain .sticky-pay .btn { width: auto; margin: 0; padding: 12px 22px; min-height: 50px; }
.has-sticky { padding-bottom: 96px !important; }

/* Кабинет подписчика */
.b-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.b-streak { font-weight: 800; font-size: 15px; color: #a14a00; background: #ffecd6; border-radius: 999px; padding: 5px 12px; }
.b-card { background: var(--card); border-radius: 20px; padding: 18px; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; gap: 12px; }
.b-card.hot { box-shadow: inset 0 0 0 2.5px var(--accent); }
.b-card h2 { font-size: 21px; line-height: 1.2; }
.b-agerow { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.b-agerow .n { font-size: 56px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.b-agerow .d { font-weight: 700; color: var(--muted); }
.b-chart { width: 100%; height: auto; display: block; }
.b-glist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.b-glist li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; background: var(--bg); border-radius: 14px; padding: 10px 12px; font-size: 16px; }
.b-glist .gi { font-size: 22px; text-align: center; }
.b-glist .gn { display: grid; }
.b-glist .gn small { color: var(--muted); font-size: 13px; }
.b-glist .ok { color: var(--ok); font-weight: 900; font-size: 20px; }
/* не .mini: это имя занято в общем app.css (сетка отчёта детских тестов) и растягивало кнопку за край карточки */
.b-glist .b-mini { white-space: nowrap; min-height: 40px; padding: 6px 14px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); font-weight: 700; font-size: 15px; }
.b-res { display: grid; gap: 10px; text-align: center; padding-top: 6vh; }
.b-res .big { font-size: 60px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.b-res .pb { justify-self: center; background: #e9f6ef; color: #145c40; border-radius: 999px; padding: 5px 14px; font-weight: 800; font-size: 15px; }
.b-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.b-tips li { font-size: 16px; line-height: 1.45; padding-left: 14px; border-left: 3px solid var(--accent-soft); }

@media (max-height: 640px) { .g-big { min-height: 110px; font-size: 52px; } .gbtn { min-height: 68px; } .pad { min-height: 40vh; } .b-age .num { font-size: 76px; } }

/* Меню предпросмотра (только при CONFIG.brain.live = false) */
.b-demo[open] { display: grid; gap: 8px; }
.b-demo .btn { min-height: 46px; font-size: 16px; }
/* Переключатель языка на первом экране (предпросмотр; в живом режиме — когда в CONFIG.brain.langs больше одного языка) */
.b-langs { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: -6px; }
.b-langs button { min-height: 34px; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.b-langs button.on { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
