:root {
    color-scheme: light dark;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--tg-theme-bg-color, #f3f4f6);
    color: var(--tg-theme-text-color, #111827);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, select { font: inherit; }

.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 18px 14px calc(32px + env(safe-area-inset-bottom));
}

.card {
    background: var(--tg-theme-secondary-bg-color, #ffffff);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.hidden { display: none; }

h1 { margin-top: 0; font-size: 32px; }
h2 { font-size: 21px; }
p { line-height: 1.45; }
label { display: block; margin: 18px 0 8px; font-weight: 600; }

select, button {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    border: 0;
    padding: 12px 14px;
}

select {
    background: var(--tg-theme-bg-color, #f3f4f6);
    color: var(--tg-theme-text-color, #111827);
}

button { cursor: pointer; margin-top: 12px; font-weight: 700; }
button:disabled { opacity: .55; cursor: default; }

.primary {
    background: var(--tg-theme-button-color, #2481cc);
    color: var(--tg-theme-button-text-color, #ffffff);
}

.secondary {
    background: var(--tg-theme-bg-color, #e5e7eb);
    color: var(--tg-theme-text-color, #111827);
}

.answers { display: grid; gap: 12px; margin-top: 22px; }
.answers button { margin: 0; text-align: left; }

.progress {
    height: 8px;
    background: var(--tg-theme-bg-color, #e5e7eb);
    border-radius: 999px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0;
    background: var(--tg-theme-button-color, #2481cc);
    transition: width .2s ease;
}

.score { font-size: 64px; font-weight: 800; margin: 8px 0; }
.muted { opacity: .65; }
.small { font-size: 13px; opacity: .7; }
.break-all { overflow-wrap: anywhere; }
li { margin: 8px 0; line-height: 1.35; }
