/* Everything inside the games panel. Dark ink, one brand accent, one accent per game. */
.games {
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f8f6f1;
    --dim: #a3a7b0;
    --accent: var(--brand);
    padding: 18px 18px 16px;
    gap: 18px;
}
@media (min-width: 1024px) {
    .games {
        padding: 24px 24px 20px;
    }
}
.mono {
    font-family: var(--mono);
}

/* ---- Bar: the wordmark, once ---- */
.games-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    flex: none;
}
.games-brand {
    display: block;
    color: inherit;
    border-radius: 2px;
}
.games-brand svg {
    height: 14px;
    width: auto;
    display: block;
}
.games-brand:focus-visible,
.btn:focus-visible,
.tile:focus-visible,
.pad button:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

/* ---- Views ---- */
.views {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}
.view {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: view-in 0.2s ease-out;
}
.view[hidden] {
    display: none;
}
@keyframes view-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Buttons ---- */
.btn {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 12px 20px;
    min-height: 44px;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background-color 0.15s,
        color 0.15s,
        border-color 0.15s;
}
.btn-primary {
    background: #fff;
    color: var(--dark);
}
.btn-primary:hover {
    background: var(--brand);
    color: #fff;
}
.btn-primary:active {
    background: #23808d;
    color: #fff;
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--line-strong);
}
.btn-outline:hover {
    border-color: #fff;
    color: #fff;
}
.btn-ghost {
    background: none;
    border: 0;
    color: var(--dim);
    padding: 8px 10px 8px 6px;
    min-height: 36px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    border-radius: 4px;
}
.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--a, var(--accent));
}
.hint {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
}
kbd {
    font: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    padding: 1px 6px;
    white-space: nowrap;
}
@media (pointer: coarse) {
    .only-fine {
        display: none !important;
    }
}
@media (pointer: fine) {
    .only-coarse {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .view,
    .over {
        animation: none;
    }
    .tile,
    .btn {
        transition: none;
    }
}

/*
 * Light chrome for the public /arcade page. Tokens match the site
 * (grey-background, ink text, white cards). Brief and stage stay the dark
 * cabinet — the play surface — so both themes exist on one class.
 */
.games--light {
    background: var(--grey-background);
    color: var(--dark);
    --text: #1b273a;
    --dim: #5a5d66;
    --line: rgba(0, 0, 0, 0.08);
    --line-strong: rgba(0, 0, 0, 0.16);
    padding: 0;
    gap: 12px;
}
@media (min-width: 1024px) {
    .games--light > * {
        max-width: none;
    }
}
.games--light .btn-primary {
    background: var(--dark);
    color: #fff;
}
.games--light .btn-primary:hover {
    background: var(--brand);
    color: #fff;
}
.games--light .btn-ghost:hover {
    color: var(--dark);
    background: rgba(0, 0, 0, 0.06);
}
.games--light .btn-outline {
    color: var(--dark);
}
.games--light .btn-outline:hover {
    border-color: var(--dark);
    color: var(--dark);
}
.games--light kbd {
    background: rgba(0, 0, 0, 0.06);
}

.games--light [data-view='brief'],
.games--light [data-view='stage'] {
    background: var(--dark);
    color: var(--grey-light);
    --text: #f8f6f1;
    --dim: #a3a7b0;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    overflow: hidden;
    min-height: 0;
    padding: 18px;
}
.games--light .brief-body {
    flex: 1;
    min-height: 0;
    margin: 0;
}
/* /arcade is a normal page at its content's height (owner, 2026-10-11): the shelf and the brief grow and the page
   scrolls, instead of each scrolling inside a screen-high panel squeezed by the footer. A run still takes over the
   window (play.css .is-takeover). */
.games--light .home-body,
.games--light .brief-body {
    flex: none;
    overflow: visible;
}
.games--light .brief-art {
    /* The brief is a card in a light page here, so the art takes less of the height */
    --art-h: min(40vh, 360px);
}
.games--light .brief-top {
    min-width: 0;
}
.games--light .brief-stats {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.games--light [data-view='brief'] .btn-ghost:hover,
.games--light [data-view='stage'] .btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.games--light [data-view='brief'] .btn-primary,
.games--light [data-view='stage'] .btn-primary {
    background: #fff;
    color: var(--dark);
}
/* The brief and the stage are dark even on a light page: the pause menu's Restart and Sound and the card's
   Another game were dark text on dark glass */
.games--light [data-view='brief'] .btn-outline,
.games--light [data-view='stage'] .btn-outline {
    color: var(--text);
}
.games--light [data-view='brief'] .btn-outline:hover,
.games--light [data-view='stage'] .btn-outline:hover {
    border-color: #fff;
    color: #fff;
}
