html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    color: #eff8ff;
    background: #14314b;
    font-family: "Trebuchet MS", Arial, sans-serif;
}

body {
    font-size: 16px;
}

[hidden] {
    display: none !important;
}

.mobile-shell {
    width: 92%;
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 0;
}

.topbar,
.card {
    width: 100%;
    background: #0b1e33;
    border: 2px solid #2f6f8c;
    border-radius: 16px;
    box-sizing: border-box;
}

.topbar {
    position: relative;
    min-height: 5.2em;
    padding: 1em;
}

.topbar-main {
    display: block;
    padding-right: 8.8em;
}

.topbar-actions {
    position: absolute;
    right: 1em;
    top: 1em;
    width: 7.8em;
    text-align: right;
}

.eyebrow {
    margin: 0 0 0.45em 0;
    color: #ffd166;
    font-size: 0.75em;
    font-weight: bold;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.topbar h1 {
    margin: 0;
    color: #ffffff;
    font-size: 1.85em;
    line-height: 1.05;
}

.header-name-button {
    display: block;
    width: 9.5em;
    height: 2.45em;
    margin-top: 0.55em;
    padding: 0;
    border: 1px solid #3a7893;
    font-size: 0.82em;
    font-weight: bold;
    line-height: 2.35em;
    text-align: center;
    box-sizing: border-box;
}

.main-stack {
    margin-top: 14px;
}

.card {
    margin-bottom: 14px;
    padding: 1.1em;
    overflow: hidden;
}

.card h2,
.card h3 {
    margin: 0.3em 0 0.65em 0;
    color: #ffffff;
}

.supporting-text {
    margin: 0.6em 0 1em 0;
    color: #bfd6e5;
    font-size: 0.96em;
    line-height: 1.35;
}

.input-label {
    display: block;
    margin-bottom: 0.45em;
    color: #bfd6e5;
    font-weight: bold;
}

#nameInput {
    width: 100%;
    padding: 0.85em 2%;
    color: #eff8ff;
    background: #14314b;
    border: 1px solid #3a7893;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 1em;
    box-sizing: border-box;
}

.form-actions {
    margin-top: 0.8em;
}

.primary-button,
.ghost-button,
.answer-button {
    border: 1px solid #3a7893;
    border-radius: 6px;
    font-family: "Trebuchet MS", Arial, sans-serif;
    cursor: pointer;
}

.primary-button,
.ghost-button {
    display: inline-block;
    padding: 0.75em 1em;
    font-weight: bold;
}

.primary-button {
    color: #14202b;
    background: #ffd166;
    border-color: #ffd166;
}

.ghost-button {
    color: #eff8ff;
    background: #14314b;
}

.status-pill,
.phase-badge {
    display: inline-block;
    padding: 0.55em 0.75em;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}

.status-pill {
    display: block;
    width: 9.5em;
    height: 2.45em;
    margin-bottom: 0.5em;
    padding: 0;
    color: #bfd6e5;
    background: #14314b;
    border: 1px solid #3a7893;
    font-size: 0.82em;
    line-height: 2.35em;
    box-sizing: border-box;
}

.back-to-apps-button {
    display: block;
    width: 9.5em;
    height: 2.45em;
    padding: 0;
    color: #eff8ff;
    background: #14314b;
    border: 1px solid #3a7893;
    border-radius: 6px;
    font-size: 0.82em;
    font-weight: bold;
    line-height: 2.35em;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.status-good {
    color: #59e3c1;
}

.status-warn {
    color: #ffd166;
}

.status-bad {
    color: #ff7474;
}

.meta-row,
.leaderboard-header {
    position: relative;
    min-height: 3.8em;
}

.meta-row.subtle {
    min-height: 2.8em;
    color: #bfd6e5;
    font-size: 0.9em;
}

.phase-badge {
    color: #ffd166;
    background: #1f3d52;
    border: 1px solid #856b2b;
    font-size: 0.78em;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.timer-block {
    position: absolute;
    right: 0;
    top: 0;
    text-align: right;
}

.timer-label {
    display: block;
    color: #bfd6e5;
    font-size: 0.72em;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.timer-value {
    display: block;
    color: #ffffff;
    font-size: 3.2em;
    font-weight: bold;
    line-height: 0.85;
}

#scoreValue {
    position: static;
    display: block;
    margin-top: 0.28em;
    padding-right: 8em;
    text-align: left;
}

.question-title {
    margin: 0.6em 0 0.65em 0;
    color: #ffffff;
    font-size: 1.5em;
    line-height: 1.18;
}

.answers-grid,
.leaderboard-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.answer-button {
    position: relative;
    display: block;
    width: 100%;
    min-height: 3.4em;
    margin: 0 0 0.65em 0;
    padding: 0.75em;
    color: #eff8ff;
    background: #14314b;
    text-align: left;
    box-sizing: border-box;
}

.answer-button.selected {
    background: #403924;
    border-color: #ffd166;
}

.answer-button.correct {
    background: #163c34;
    border-color: #59e3a7;
}

.answer-button.incorrect {
    background: #4b2026;
    border-color: #ff7474;
}

.answer-index,
.leaderboard-rank {
    float: left;
    width: 2em;
    height: 2em;
    margin-right: 0.7em;
    color: #ffd166;
    background: #0b1e33;
    border: 1px solid #4b88a1;
    border-radius: 6px;
    font-weight: bold;
    line-height: 2em;
    text-align: center;
}

.answer-label {
    display: block;
    margin: 0.2em 5.8em 0 2.9em;
    font-size: 1em;
    line-height: 1.25;
}

.answer-trailing {
    position: absolute;
    right: 0.75em;
    top: 1.05em;
    width: 5.2em;
    color: #bfd6e5;
    font-size: 0.82em;
    font-weight: bold;
    text-align: right;
}

.result-panel,
.leaderboard-panel {
    margin-top: 1em;
    padding-top: 0.9em;
    border-top: 1px solid #2f6f8c;
}

.result-panel p {
    margin: 0 0 0.55em 0;
}

.leaderboard-item {
    position: relative;
    min-height: 2.5em;
    margin-bottom: 0.55em;
    padding: 0.65em;
    color: #eff8ff;
    background: #14314b;
    border: 1px solid #3a7893;
}

.leaderboard-item.you {
    background: #403924;
    border-color: #ffd166;
}

.leaderboard-item.winner {
    background: #163c34;
    border-color: #59e3a7;
}

.leaderboard-main {
    display: block;
    margin-right: 5.8em;
}

.leaderboard-main strong {
    display: block;
    padding-top: 0.2em;
}

.leaderboard-score {
    position: absolute;
    right: 0.7em;
    top: 0.85em;
    color: #bfd6e5;
    font-weight: bold;
}

.winner-badge {
    display: inline-block;
    margin-top: 0.3em;
    padding: 0.22em 0.5em;
    color: #ffd166;
    background: #0b1e33;
    border: 1px solid #856b2b;
    font-size: 0.72em;
    font-weight: bold;
    text-transform: uppercase;
}

@media screen and (max-width: 430px) {
    body {
        font-size: 14px;
    }

    .mobile-shell {
        width: 90%;
    }

    .topbar h1 {
        font-size: 1.35em;
    }

    .topbar-main {
        padding-right: 7.8em;
    }

    .topbar-actions {
        width: 6.9em;
    }

    .header-name-button,
    .status-pill,
    .back-to-apps-button {
        width: 6.9em;
    }
}

.topbar .header-name-button,
.topbar .status-pill,
.topbar .back-to-apps-button {
    height: 2.45em;
    padding: 0;
    border: 1px solid #3a7893;
    background: #14314b;
    color: #eff8ff;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 0.82em;
    font-weight: bold;
    line-height: 2.35em;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.topbar .status-pill {
    display: block;
    margin-bottom: 0.5em;
    color: #59e3c1;
}

.topbar .header-name-button,
.topbar .back-to-apps-button {
    display: block;
}

.topbar .header-name-button {
    width: 7.8em;
    margin-top: 0.55em;
}

.topbar .status-pill,
.topbar .back-to-apps-button {
    width: 100%;
}

@media screen and (max-width: 430px) {
    .topbar .header-name-button {
        width: 6.9em;
    }
}