/*
 * TapBios simplified game presentation.
 *
 * Loaded after game.css so it can flatten the card-on-card chrome without a
 * specificity fight. Brings the play surfaces in line with the bio and menu
 * pages: the background colour is the page, content sits directly on it, and
 * headings use the display face.
 */

/* ---- No bubble: content sits on the page background ---- */
.game-card,
.game-hero-card,
.game-header.game-hero-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.layout-game .game-shell {
    width: min(100%, 34rem);
    margin: 0 auto;
    padding: clamp(2rem, 7vw, 4rem) 1.25rem 1.5rem;
}

.game-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* A rule between the intro and the interactive part, instead of two cards. */
.game-stack > .game-card + .game-card,
.game-stack > .game-header + .game-card {
    padding-top: 1.5rem;
    border-top: 1px solid var(--page-border, var(--color-border));
}

/* ---- Type ---- */
.layout-game .game-header h1,
.layout-game .game-card h1,
.layout-game .game-card h2 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.layout-game .game-header h1 {
    font-size: clamp(1.9rem, 6vw, 2.5rem);
    margin: 0.25rem 0 0.75rem;
}

.layout-game .game-card h2 {
    font-size: 1.25rem;
    margin: 0 0 1rem;
}

.layout-game .game-header .eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--page-text-subtle, var(--text-subtle));
    margin: 0;
}

.layout-game .game-lead {
    font-size: 1.0625rem;
    color: var(--page-text-secondary, var(--text-secondary));
    margin: 0 0 0.5rem;
}

.layout-game .game-supporting-text {
    font-size: 0.9375rem;
    color: var(--page-text-subtle, var(--text-subtle));
    margin: 0;
}

/* ---- Controls ---- */
.layout-game .btn-block,
.layout-game .btn.btn-block {
    width: 100%;
    min-height: 3.25rem;
    border-radius: var(--tb-radius-md, 12px);
    font-size: 1rem;
    font-weight: 700;
}

.layout-game .game-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.layout-game .game-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--page-text-secondary, var(--text-secondary));
}

/* The consent row was a boxed panel wrapping a checkbox and a sentence. */
.layout-game .checkbox-label {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 400;
    line-height: 1.5;
}

.layout-game .checkbox-label input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    min-height: 0;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--page-primary, var(--color-primary));
}

/* ---- Spin wheel ---- */
#spin-pointer {
    color: var(--page-primary, var(--color-primary));
    line-height: 1;
}

#spin-canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* ---- Memory / match boards ---- */
.layout-game .memory-grid,
.layout-game .cm-columns {
    gap: 0.6rem;
}

.layout-game .memory-card,
.layout-game .cm-card {
    border-radius: var(--tb-radius-md, 12px);
    border: 1px solid var(--page-border, var(--color-border));
    background: var(--page-surface, rgba(127, 127, 127, 0.08));
}

/* ---- Results ---- */
.layout-game .game-score-display {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
}

@media (max-width: 575.98px) {
    .layout-game .game-shell {
        padding-inline: 1.1rem;
    }
}

/* ---- Fewer screens of the same words -------------------------------
   The register step already shows brand, title, description and
   instructions. The intro panel that follows repeated all of it before a
   single "Start" button, so the player read the same screen twice. Keep the
   title and the action; drop the duplicated brand furniture. */
#memory-intro .game-brand-logo,
#memory-intro .game-eyebrow,
#cm-intro .game-brand-logo,
#cm-intro .game-eyebrow,
#rr-intro .game-brand-logo,
#rr-intro .game-eyebrow,
#tap-intro .game-brand-logo,
#tap-intro .game-eyebrow {
    display: none;
}

#memory-intro h1,
#cm-intro h1,
#rr-intro h1,
#tap-intro h1 {
    font-size: clamp(1.6rem, 5vw, 2rem);
    margin-top: 0;
}

#memory-intro .muted.small,
#cm-intro .muted.small {
    margin-bottom: 1.25rem;
}

/* ---- Play surfaces get room ---- */
/* :not([hidden]) matters: a bare display:flex here beats the UA sheet's
   [hidden] { display:none }, which made every game render its board and its
   intro at the same time. */
#memory-playing:not([hidden]),
#cm-playing:not([hidden]),
#rr-playing:not([hidden]),
#tap-playing:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* theme-vars.php emits `.layout-game .game-card { background: var(--tb-card-bg,
   var(--page-surface-strong)) }` inline in <head>, after this file, so it wins
   on source order at equal specificity. One more level clears it. */
.layout-game .game-shell .game-card,
.layout-game .game-shell .game-hero-card,
.layout-game .game-stack .game-card,
.layout-game .game-stack .game-hero-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

/* game.css's .checkbox-label loses to .layout-game .game-form label above,
   which stacks it. Put the box back beside its sentence. */
.layout-game .game-form .checkbox-label {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.65rem;
}
