:root {
    --bt-bg: #f6f7f2;
    --bt-ink: #1e2528;
    --bt-muted: #657072;
    --bt-line: #d8ded8;
    --bt-panel: #ffffff;
    --bt-green: #1d7f62;
    --bt-teal: #127a89;
    --bt-red: #bd3c37;
    --bt-amber: #c47a17;
    --bt-blue: #315f9d;
    --bt-shadow: 0 12px 28px rgba(33, 43, 40, 0.12);
}

body {
    background: var(--bt-bg);
}

.bt-shell {
    color: var(--bt-ink);
    min-height: 100vh;
    padding: 22px;
    font-family: Inter, Arial, sans-serif;
}

.bt-top,
.bt-hero,
.bt-board-wrap {
    max-width: 1180px;
    margin: 0 auto;
}

.bt-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.bt-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--bt-ink);
    font-weight: 800;
    text-decoration: none;
}

.bt-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.bt-scorebar,
.bt-status,
.bt-kid-panel,
.bt-adult-panel,
.bt-insight-panel,
.bt-controls,
.bt-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bt-scorebar > div,
.bt-status > div,
.bt-kid-panel > div,
.bt-adult-panel > div,
.bt-insight-panel > div {
    min-width: 82px;
    padding: 10px 12px;
    border: 1px solid var(--bt-line);
    background: rgba(255, 255, 255, 0.78);
    border-radius: 8px;
}

.bt-label {
    display: block;
    color: var(--bt-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.bt-scorebar strong,
.bt-status strong,
.bt-kid-panel strong,
.bt-adult-panel strong,
.bt-insight-panel strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
}

.bt-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    padding: 30px 0 22px;
    border-top: 1px solid var(--bt-line);
}

.bt-kicker {
    margin: 0 0 6px;
    color: var(--bt-green);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.bt-hero h1 {
    max-width: 820px;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: 0;
}

.bt-copy {
    max-width: 680px;
    margin: 14px 0 0;
    color: var(--bt-muted);
    font-size: 17px;
    line-height: 1.5;
}

.bt-controls {
    align-items: stretch;
    padding: 12px;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-radius: 8px;
    box-shadow: var(--bt-shadow);
}

.bt-controls label {
    min-width: 130px;
}

.bt-controls span {
    display: block;
    margin-bottom: 6px;
    color: var(--bt-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.bt-controls select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--bt-line);
    border-radius: 6px;
    color: var(--bt-ink);
    background: #fdfdfb;
    font-size: 15px;
}

.bt-modes {
    max-width: 1180px;
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.bt-mode {
    min-height: 84px;
    padding: 14px;
    border: 1px solid var(--bt-line);
    border-radius: 8px;
    background: var(--bt-panel);
    color: var(--bt-ink);
    text-align: left;
    cursor: pointer;
}

.bt-mode span {
    display: block;
    font-size: 17px;
    font-weight: 800;
}

.bt-mode small {
    display: block;
    margin-top: 4px;
    color: var(--bt-muted);
    font-size: 13px;
}

.bt-mode.is-active {
    border-color: var(--bt-green);
    box-shadow: inset 0 0 0 2px rgba(29, 127, 98, 0.16);
}

.bt-workouts {
    max-width: 1180px;
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.bt-workouts button {
    min-height: 74px;
    padding: 14px;
    border: 1px solid rgba(18, 122, 137, 0.25);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #eff8f6 100%);
    color: var(--bt-ink);
    text-align: left;
    cursor: pointer;
}

.bt-workouts span {
    display: block;
    color: var(--bt-teal);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.bt-workouts strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
}

.bt-board-wrap {
    padding: 18px;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-radius: 8px;
    box-shadow: var(--bt-shadow);
}

.bt-status {
    justify-content: space-between;
    margin-bottom: 14px;
}

.bt-kid-panel {
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #f0cf72;
    border-radius: 8px;
    background: #fff8de;
}

.bt-adult-panel {
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid rgba(49, 95, 157, 0.32);
    border-radius: 8px;
    background: #eef4ff;
}

.bt-insight-panel {
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid rgba(18, 122, 137, 0.24);
    border-radius: 8px;
    background: #edf8f5;
}

.bt-kid-panel[hidden] {
    display: none;
}

.bt-adult-panel[hidden] {
    display: none;
}

.bt-kid-panel > div {
    flex: 1;
    border-color: rgba(196, 122, 23, 0.28);
}

.bt-adult-panel > div {
    flex: 1;
    border-color: rgba(49, 95, 157, 0.24);
}

.bt-insight-panel > div {
    flex: 1;
    border-color: rgba(18, 122, 137, 0.2);
}

.bt-shell.is-kids .bt-hero {
    border-top-color: #f0cf72;
}

.bt-shell.is-adults .bt-hero {
    border-top-color: rgba(49, 95, 157, 0.36);
}

.bt-shell.is-kids .bt-kicker,
.bt-shell.is-kids .bt-mode.is-active span {
    color: var(--bt-amber);
}

.bt-shell.is-adults .bt-kicker,
.bt-shell.is-adults .bt-mode.is-active span {
    color: var(--bt-blue);
}

.bt-shell.is-adults .bt-mode.is-active {
    border-color: var(--bt-blue);
    box-shadow: inset 0 0 0 2px rgba(49, 95, 157, 0.14);
}

.bt-shell.is-kids .bt-mode.is-active {
    border-color: var(--bt-amber);
    box-shadow: inset 0 0 0 2px rgba(196, 122, 23, 0.16);
}

.bt-board {
    min-height: 430px;
    display: grid;
    place-items: center;
    padding: 18px;
    border: 1px solid var(--bt-line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fbfcfa 0%, #eef4ef 100%);
    overflow: hidden;
}

.bt-actions {
    justify-content: flex-end;
    margin-top: 14px;
}

.bt-primary,
.bt-secondary {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 7px;
    font-weight: 800;
    cursor: pointer;
}

.bt-primary {
    border: 1px solid var(--bt-green);
    background: var(--bt-green);
    color: #fff;
}

.bt-secondary {
    border: 1px solid var(--bt-line);
    background: #fff;
    color: var(--bt-ink);
}

.bt-grid {
    width: min(100%, 520px);
    aspect-ratio: 1;
    display: grid;
    gap: 8px;
}

.bt-tile,
.bt-pad,
.bt-choice,
.bt-answer {
    border: 1px solid var(--bt-line);
    border-radius: 8px;
    background: #fff;
    color: var(--bt-ink);
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.bt-tile {
    min-width: 0;
}

.bt-tile.is-lit,
.bt-tile.is-picked {
    background: var(--bt-amber);
    border-color: var(--bt-amber);
}

.bt-tile.is-correct,
.bt-choice.is-correct,
.bt-answer.is-correct {
    background: var(--bt-green);
    border-color: var(--bt-green);
    color: #fff;
}

.bt-tile.is-wrong,
.bt-choice.is-wrong,
.bt-answer.is-wrong {
    background: var(--bt-red);
    border-color: var(--bt-red);
    color: #fff;
}

.bt-math,
.bt-stroop,
.bt-sequence,
.bt-word,
.bt-logic,
.bt-rapid {
    width: min(100%, 760px);
    display: grid;
    gap: 18px;
    justify-items: center;
}

.bt-question {
    font-size: clamp(42px, 10vw, 96px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.bt-subtext {
    color: var(--bt-muted);
    font-size: 16px;
}

.bt-answers,
.bt-choices {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.bt-answer,
.bt-choice {
    min-height: 66px;
    padding: 8px;
    font-size: 20px;
    font-weight: 900;
}

.bt-word .bt-question,
.bt-logic .bt-question,
.bt-rapid .bt-question {
    font-size: clamp(30px, 5vw, 58px);
    line-height: 1.08;
}

.bt-rapid-meter {
    width: min(100%, 520px);
    height: 10px;
    overflow: hidden;
    border: 1px solid var(--bt-line);
    border-radius: 999px;
    background: #fff;
}

.bt-rapid-fill {
    height: 100%;
    background: var(--bt-blue);
    transition: width 0.18s ease;
}

.bt-rapid-score {
    color: var(--bt-blue);
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.bt-stroop-word {
    font-size: clamp(52px, 12vw, 112px);
    font-weight: 900;
    line-height: 1;
}

.bt-pads {
    width: min(100%, 560px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bt-pad {
    aspect-ratio: 1.2;
}

.bt-pad[data-color="green"] {
    background: rgba(29, 127, 98, 0.16);
}

.bt-pad[data-color="teal"] {
    background: rgba(18, 122, 137, 0.16);
}

.bt-pad[data-color="red"] {
    background: rgba(189, 60, 55, 0.16);
}

.bt-pad[data-color="amber"] {
    background: rgba(196, 122, 23, 0.18);
}

.bt-pad.is-lit[data-color="green"] {
    background: var(--bt-green);
}

.bt-pad.is-lit[data-color="teal"] {
    background: var(--bt-teal);
}

.bt-pad.is-lit[data-color="red"] {
    background: var(--bt-red);
}

.bt-pad.is-lit[data-color="amber"] {
    background: var(--bt-amber);
}

.bt-pad.is-lit {
    transform: scale(0.97);
}

.bt-message {
    max-width: 660px;
    color: var(--bt-muted);
    font-size: 18px;
    line-height: 1.45;
    text-align: center;
}

.bt-message-title {
    display: block;
    margin-bottom: 8px;
    color: var(--bt-ink);
    font-size: 28px;
    font-weight: 900;
}

.bt-intro {
    width: min(100%, 760px);
    display: grid;
    gap: 16px;
}

.bt-achievements {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.bt-achievement {
    padding: 7px 10px;
    border: 1px solid rgba(18, 122, 137, 0.22);
    border-radius: 999px;
    background: #fff;
    color: var(--bt-teal);
    font-size: 12px;
    font-weight: 900;
}

.bt-review {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.bt-review div {
    padding: 10px;
    border: 1px solid var(--bt-line);
    border-radius: 8px;
    background: #fff;
}

.bt-review span {
    display: block;
    color: var(--bt-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.bt-review strong {
    display: block;
    margin-top: 5px;
    color: var(--bt-ink);
    font-size: 16px;
}

.bt-intro-head {
    text-align: center;
}

.bt-intro-head h2 {
    margin: 0;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.05;
}

.bt-intro-head p {
    margin: 8px auto 0;
    max-width: 560px;
    color: var(--bt-muted);
    line-height: 1.45;
}

.bt-intro-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.bt-intro-card {
    min-height: 96px;
    padding: 12px;
    border: 1px solid var(--bt-line);
    border-radius: 8px;
    background: #fff;
}

.bt-intro-card span {
    display: block;
    color: var(--bt-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.bt-intro-card strong {
    display: block;
    margin-top: 6px;
    font-size: 17px;
    line-height: 1.2;
}

.bt-hint {
    padding: 10px 14px;
    border: 1px solid rgba(18, 122, 137, 0.25);
    border-radius: 8px;
    background: rgba(18, 122, 137, 0.08);
    color: var(--bt-teal);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.bt-adult-note {
    padding: 10px 14px;
    border: 1px solid rgba(49, 95, 157, 0.24);
    border-radius: 8px;
    background: rgba(49, 95, 157, 0.08);
    color: var(--bt-blue);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.bt-progress {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.bt-dot {
    width: 16px;
    height: 16px;
    border: 1px solid var(--bt-line);
    border-radius: 999px;
    background: #fff;
}

.bt-dot.is-done {
    background: var(--bt-amber);
    border-color: var(--bt-amber);
}

@media (max-width: 860px) {
    .bt-shell {
        padding: 14px;
    }

    .bt-top,
    .bt-hero,
    .bt-status {
        align-items: stretch;
        flex-direction: column;
    }

    .bt-top,
    .bt-hero {
        display: flex;
    }

    .bt-scorebar,
    .bt-controls,
    .bt-kid-panel,
    .bt-adult-panel,
    .bt-insight-panel,
    .bt-status {
        flex-wrap: wrap;
    }

    .bt-scorebar > div,
    .bt-kid-panel > div,
    .bt-adult-panel > div,
    .bt-insight-panel > div,
    .bt-status > div {
        flex: 1;
    }

    .bt-modes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-workouts {
        grid-template-columns: 1fr;
    }

    .bt-board {
        min-height: 360px;
        padding: 12px;
    }

    .bt-answers,
    .bt-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-intro-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-review {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .bt-modes,
    .bt-controls,
    .bt-workouts,
    .bt-actions {
        grid-template-columns: 1fr;
        display: grid;
    }

    .bt-mode,
    .bt-primary,
    .bt-secondary {
        width: 100%;
    }

    .bt-intro-grid {
        grid-template-columns: 1fr;
    }
}
