/* Layout shared by every game page. */
.game-breadcrumb { margin-bottom: 8px; }
.game-breadcrumb a { text-decoration: none; }

.game-intro { color: var(--muted); }

.game { max-width: 640px; margin: 0 auto; }

.game-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}

.game-button {
    margin-left: auto;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.game-button:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

.game-message { min-height: 1.5em; font-weight: 600; text-align: center; }

/* Records panel (top records + my best), shared by every game. */
.game-records {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    max-width: 640px;
    margin: 24px auto 0;
}

.game-records__col {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.game-records h2 { margin: 0 0 8px; font-size: 1.05rem; }

.game-records__list { margin: 0; padding-left: 1.5em; font-variant-numeric: tabular-nums; }

.game-records__list li { padding: 2px 0; }

.game-records__list li > span:last-child { float: right; color: var(--muted); }

.game-records__list li.is-me { font-weight: 600; }

.game-records__list .game-records__empty { list-style: none; margin-left: -1.5em; color: var(--muted); }

.game-records__best { margin: 0; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.game-records__meta { margin: 4px 0 0; color: var(--muted); }

.game-actions { display: flex; gap: 8px; margin-left: auto; }
.game-actions .game-button { margin-left: 0; }

.game-button--secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.game-mode {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
}

.game.is-demo .game-mode { border-color: #f29900; }

/* Shown to visitors who aren't logged in: what the game helps + how to play. */
.game-about {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: start;
    max-width: 960px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.game-about__gif { display: block; width: 100%; height: auto; border-radius: var(--radius); }

.game-about__text h2 { margin: 0 0 4px; font-size: 1.1rem; }
.game-about__text h2 + * { margin-top: 0; }

.game-about__cta { margin-top: 16px; }
.game-about__cta p { margin: 0 0 12px; }
