:root {
    color-scheme: dark;
    --bg: #0b0b0d;
    --panel: #131318;
    --panel-2: #1a1a20;
    --text: #f5f5f2;
    --muted: #9c9ca6;
    --border: #303039;
    --accent: #ffffff;
    --success: #baf7c7;
    --danger: #ffb6b6;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button { font: inherit; }

.page-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: max(22px, env(safe-area-inset-top)) 18px max(26px, env(safe-area-inset-bottom));
}

.quiz-card {
    width: min(100%, 560px);
    background: var(--panel);
    border: 1px solid #222229;
    border-radius: 28px;
    padding: 26px 20px 24px;
    box-shadow: 0 28px 70px rgba(0,0,0,.28);
}

.brand-block { margin-bottom: 30px; text-align: center; }
.brand {
    font-size: clamp(2rem, 9vw, 3.2rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: .16em;
    margin-left: .16em;
}
.kicker {
    margin-top: 10px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .19em;
}
.question {
    margin: 0 auto;
    max-width: 480px;
    text-align: center;
    font-size: clamp(1.42rem, 5.9vw, 2rem);
    line-height: 1.35;
    font-weight: 760;
    text-wrap: balance;
}
.instruction {
    margin: 18px 0 20px;
    text-align: center;
    color: var(--muted);
    font-size: .98rem;
}
.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.answer-btn {
    min-height: 72px;
    padding: 15px 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    transition: transform .08s ease, border-color .15s ease, background .15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.answer-btn:hover { border-color: #696975; }
.answer-btn:active { transform: scale(.975); }
.answer-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.answer-btn:disabled { opacity: .55; cursor: wait; }
.answer-label { font-size: clamp(1.08rem, 4.8vw, 1.28rem); font-weight: 740; }

.result-view { text-align: center; }
.result-icon {
    width: 74px;
    height: 74px;
    margin: 2px auto 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2.7rem;
    line-height: 1;
    font-weight: 500;
}
.result-view.is-correct .result-icon, .result-view.is-correct .result-title { color: var(--success); }
.result-view.is-wrong .result-icon, .result-view.is-wrong .result-title { color: var(--danger); }
.result-title { margin: 0; font-size: 2rem; letter-spacing: .08em; }
.correct-answer { margin: 14px 0 0; font-size: 1.05rem; }
.explanation {
    max-width: 470px;
    margin: 18px auto 24px;
    color: #d4d4d8;
    line-height: 1.58;
    font-size: 1rem;
}
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}
.stats > div {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 10px;
}
.stats strong { display: block; font-size: 1.65rem; line-height: 1.1; }
.stats span { display: block; margin-top: 5px; color: var(--muted); font-size: .9rem; }
.total-answers { margin: 17px 0 0; color: var(--muted); font-size: .92rem; }
.tomorrow { margin: 28px 0 0; font-weight: 700; }
.error-message { text-align: center; color: var(--danger); line-height: 1.5; }

@media (max-width: 380px) {
    .page-shell { padding-left: 12px; padding-right: 12px; }
    .quiz-card { padding-left: 15px; padding-right: 15px; border-radius: 22px; }
    .answers { gap: 9px; }
    .answer-btn { min-height: 66px; }
}

@media (prefers-reduced-motion: reduce) {
    .answer-btn { transition: none; }
}
