/* /game: single-page game. Builds on style.css (cue buttons, game box). */
.gm {
    --gm-red: red;
    --gm-green: green;
    position: relative;
}

.gm-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    min-height: 1.2rem;
    margin-bottom: 0.9rem;
    font-size: 0.7rem;
    color: var(--text-primary);
}

.gm-session {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.gm-session span {
    width: 7px;
    height: 7px;
}

.gm-session .w { background: var(--accent-green); }
.gm-session .l { background: var(--error-red); opacity: 0.8; }

.gm-report {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.gm-report a {
    color: var(--text-primary);
}

.gm-bar {
    width: 70px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.gm-bar span {
    display: block;
    height: 100%;
    background: var(--accent-green);
    transition: width 0.6s ease;
}

.gm-heading {
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.gm-cues {
    margin: 1.1rem auto !important;
}

.gm-cue {
    transition: background 0.12s ease, border-color 0.12s ease, opacity 0.2s ease;
}

.gm-cue.gm-picked {
    border-color: #fff !important;
    border-width: 2px;
}

.gm-cue.gm-biased {
    background: var(--gm-red) !important;
    color: #fff;
    font-weight: 700;
    opacity: 1 !important;
}

.gm-cue.gm-dim {
    opacity: 0.35 !important;
}

.gm-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-primary);
    opacity: 0.6;
}

kbd {
    font-family: inherit;
    font-size: 0.66rem;
    border: 1px solid var(--line);
    padding: 0 0.25rem;
    text-transform: uppercase;
}

.gm-outcome {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.gm-reveal {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin: 0 auto 0.9rem;
    max-width: none;
}

.gm-reveal b {
    text-transform: uppercase !important;
}

.gm-recap {
    display: inline-block;
    margin: 0 auto 0.8rem;
    text-align: left;
}

.gm-recap-title {
    font-size: 0.68rem;
    margin-bottom: 0.3rem;
}

.gm-row {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
}

.gm-lab {
    width: 1rem;
    font-size: 0.66rem;
    text-transform: uppercase !important;
}

.gm-cell {
    width: 14px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gm-cell.avail { border-color: rgba(255, 255, 255, 0.28); }
.gm-cell.red { background: var(--gm-red); border-color: var(--gm-red); }
.gm-cell.green { background: var(--gm-green); border-color: var(--gm-green); }

.gm-row.biased .gm-lab {
    color: var(--error-red);
    font-weight: 700;
}

.gm-tag {
    font-size: 0.6rem;
    color: var(--error-red);
    margin-left: 0.4rem;
}

#gm-result-view {
    text-align: center;
}

.gm-note {
    font-size: 0.78rem;
    color: var(--text-primary);
    min-height: 1.2em;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.gm-note a {
    color: var(--accent-green);
}

.gm-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gm-next kbd {
    margin-left: 0.4rem;
    border-color: rgba(248, 113, 113, 0.4);
}

.gm-toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    border: 1px solid var(--accent-green);
    background: #000;
    color: var(--accent-green);
    font-size: 0.82rem;
    padding: 0.6rem 1.1rem;
    z-index: 30;
}

.gm-toast.show {
    animation: gm-toast 3.2s ease forwards;
}

@keyframes gm-toast {
    0% { opacity: 0; transform: translate(-50%, 10px); }
    10%, 85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; }
}

.gm-burst {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 25;
}



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

@media (max-width: 600px) {
    .gm {
        flex-direction: column;
    }
}

.gm-face {
    text-transform: uppercase !important;
}

.gm-mode {
    font-size: 0.68rem;
    text-align: center;
    margin-bottom: 0.2rem;
}

.gm-error {
    text-align: center;
    font-size: 0.8rem;
    color: var(--error-red);
}

/* the final inference decision sits on a lighter grey box, so it reads differently from the sampling rounds */
.gm-box.final-game-box {
    background: #333;
    border-color: #555;
}

.gm-box.final-game-box .final-choice-btn {
    background: #000;
}

.gm-box.final-game-box .final-choice-btn:hover:not(:disabled) {
    background: #0d0d0d;
}
