/* The games home (core/home.js, homeCards.js): the tokens, the title band and its controls, the lead card. The
   pills, "Your arcade" and "Play together" are shelf.css; a game card is tile.css. Drawn like the site's own pages
   (Figma "🐹 Arcade": D | Arcade, M | Arcade): grey cards on the page grey, a level lighter inside, no borders. */

/* ---- Tokens: the offline page's dark panel, and the light /arcade page ---- */
.games {
    --card: #25262b;
    --card-2: #2e3036;
    --card-hover: #2e3036;
    --pill-on: #fff;
    --pill-on-ink: var(--dark);
    --btn-bg: transparent;
    --btn-line: rgba(255, 255, 255, 0.28);
    --lead-ink: var(--brand-bright);
    --heading: #fff;
}
.games--light {
    --card: var(--grey-light);
    --card-2: #f5f5f5;
    /* a lilac hover: a lighter grey disappears against the page grey */
    --card-hover: #d4cad8;
    --pill-on: var(--dark);
    --pill-on-ink: #fff;
    --btn-bg: #fff;
    --btn-line: var(--dark);
    --lead-ink: #0a6b5e;
    --heading: var(--dark);
}

/* ---- Title band: the site's PublicPageHead — the name, the controls on the right, one line under it ---- */
.home-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: none;
}
.home-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    padding: 8px;
    border-radius: 8px;
    background: var(--card);
}
.home-head h1 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--heading);
    padding-left: 4px;
}
.lede {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    max-width: 720px;
}
@media (min-width: 1024px) {
    .home-band {
        padding: 12px;
    }
    .lede {
        font-size: 14px;
        margin-left: 8px;
    }
}

/* The controls in the band: the 2D / 3D switch (core/look.js) as a segmented pill, then the key menu's button
   (keyMenu.js) and the music switch (music.js) as the site's outline buttons. They outrank brief.css's .seats. */
.home-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.games .home-tools .seats {
    gap: 0;
    padding: 0;
    border: 0;
}
.games .home-tools .seats button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text);
}
.games .home-tools .seats.look-switch {
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: var(--card-2);
}
.games .home-tools .look-switch button {
    justify-content: center;
    min-width: 48px;
    color: var(--dim);
}
.games .home-tools .look-switch button[aria-checked='true'] {
    background: var(--pill-on);
    color: var(--pill-on-ink);
}
.games .home-tools .keys-open button,
.games .home-tools .music-switch button {
    padding: 8px 14px;
    border: 1px solid var(--btn-line);
    border-radius: 4px;
    background: var(--btn-bg);
}
.games .home-tools .keys-open button:hover,
.games .home-tools .music-switch button:hover {
    background: var(--card-2);
}

.home-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}
/* Set by home.js when the shelf is taller than the panel: the fade says "more below" */
.home-body.is-scrollable {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}
.status {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--dim);
}

/* ---- The top row: the lead card, and "Your arcade" beside it on a wide screen ---- */
.home-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}
@media (min-width: 1100px) {
    .home-top {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 24px;
    }
}
.home-lead {
    display: flex;
    min-width: 0;
}

/* The lead card: the picture large, then what the game is, where you are in it, and Play */
.tile.tile--wide {
    flex: 1;
    padding: 8px;
}
.tile--wide .tile-art {
    aspect-ratio: 16 / 9;
}
.tile--wide .tile-body {
    gap: 10px;
    padding: 14px 8px 8px;
}
@media (min-width: 760px) {
    .tile.tile--wide {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: 24px;
        padding: 12px;
    }
    .tile--wide .tile-body {
        padding: 8px 8px 4px 0;
    }
}
.tile-lead {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lead-ink);
}
.tile--wide .tile-name {
    font-size: clamp(24px, 2.6vw, 32px);
}
.tile--wide .tile-blurb {
    font-size: 13px;
    color: var(--text);
    -webkit-line-clamp: 3;
    line-clamp: 3;
}
.tile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.stat {
    flex: 1 1 0;
    min-width: 88px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--card-2);
}
.stat > span {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
}
.stat strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--heading);
}
.tile-cta {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 10px 16px;
}
.tile-cta svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
}
