/* Chimp Test playfield (Phase 6, inside the shared game shell). */
.ch-stage { display: grid; grid-template-rows: auto auto auto; justify-items: center; align-items: center; gap: var(--rb-space-3); min-height: calc(var(--rb-stage-height) + 52px); }
.ch-phase { display: inline-flex; align-items: center; min-height: 32px; margin: 0; padding: .25rem .875rem; border-radius: var(--rb-radius-pill); background: var(--rb-surface-soft); color: var(--rb-text-secondary); font-size: var(--rb-fs-sm); font-weight: var(--rb-fw-bold); }
.ch-phase.is-watch { background: var(--rb-primary-soft); color: var(--rb-primary); }
.ch-phase.is-input, .ch-phase.is-success { background: var(--rb-success-bg); color: var(--rb-success); }
.ch-phase.is-error { background: var(--rb-danger-bg); color: var(--rb-danger); }

.ch-board {
    container-type: inline-size;
    display: grid; grid-template-columns: repeat(var(--ch-columns, 4), minmax(0, 1fr)); gap: clamp(4px, 1.4cqi, 10px);
    width: min(100%, 320px); aspect-ratio: 1;
    padding: clamp(.375rem, .25rem + .8vw, .75rem);
    border-radius: var(--rb-radius-lg); background: var(--rb-surface-soft);
    touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
/* Empty grid cells: faint slots so the layout is visible but never mistaken for a tile. */
.ch-cell { border-radius: clamp(6px, 2cqi, 14px); background: color-mix(in srgb, var(--rb-border) 35%, transparent); }
.ch-tile {
    display: grid; place-items: center; min-width: 0; padding: 0;
    border: 2px solid color-mix(in srgb, var(--rb-primary) 30%, var(--rb-border)); border-radius: clamp(6px, 2cqi, 14px);
    background: var(--rb-surface); color: var(--rb-primary); box-shadow: var(--rb-shadow-xs);
    font-size: 1.25rem; font-size: calc(100cqi / var(--ch-columns, 4) * .42); font-weight: var(--rb-fw-extrabold); line-height: 1; font-variant-numeric: tabular-nums;
    cursor: default; -webkit-tap-highlight-color: transparent;
    transition: transform var(--rb-duration-fast) ease, background-color var(--rb-duration-fast) ease, border-color var(--rb-duration-fast) ease;
}
.ch-board.is-input .ch-tile:not(:disabled) { cursor: pointer; }
.ch-board.is-input .ch-tile:not(:disabled):hover { border-color: var(--rb-primary); }
.ch-board.is-input .ch-tile:not(:disabled):active { transform: scale(.95); }
.ch-tile:focus-visible { z-index: 1; outline: 3px solid var(--rb-focus-ring); outline-offset: 2px; }
.ch-tile:disabled { opacity: 1; }
/* Numbers hidden: the numbered squares become solid blank tiles. */
.ch-board.is-hidden .ch-tile.is-numbered:not(.is-correct):not(.is-revealed) { border-color: var(--rb-primary); background: var(--rb-primary); }
/* Classic mode (CLASSIC_EMPTY_CELLS): every square looks the same once hidden. */
.ch-board.is-classic.is-hidden .ch-tile:not(.is-correct):not(.is-revealed) { border-color: color-mix(in srgb, var(--rb-primary) 30%, var(--rb-border)); background: var(--rb-surface); }
.ch-tile.is-correct { border-color: #047857; background: #059669; color: #fff; }
.ch-tile.is-wrong { border-color: #b91c1c; background: #dc2626; color: #fff; }
.ch-tile.is-revealed { color: var(--rb-text); }
.ch-tile.is-expected { border: 3px dashed var(--rb-success); background: var(--rb-success-bg); color: var(--rb-success); }
.ch-feedback { min-height: 2.9em; margin: 0; color: var(--rb-text-secondary); font-size: var(--rb-fs-sm); line-height: 1.45; text-align: center; }
.rb-game[data-state="start"] .ch-board { opacity: .75; }
@media (prefers-reduced-motion: reduce) { .ch-tile { transition: none; } }
