/* The arcade home's shelf and side cards (core/home.js, homeCards.js): the pills, the grid of games (each card is
   tile.css), "Your arcade" with the install inside it, and "Play together". Tokens (--card, --pill-on…) are home.css's. */

.home-shelf {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---- The pills: one shelf at a time, scrolling sideways on a phone ---- */
.shelf-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    background: var(--card);
}
/* contain: its own width never sizes the panel (the offline page's panel grows to its content): it scrolls instead */
.shelf-pills {
    display: flex;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    contain: inline-size;
}
.shelf-pills::-webkit-scrollbar {
    display: none;
}
.pill {
    flex: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.pill:hover {
    background: var(--card-2);
}
.pill[aria-pressed='true'] {
    background: var(--pill-on);
    color: var(--pill-on-ink);
}
.pill:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.pill-count {
    font-family: var(--mono);
    font-size: 11px;
    opacity: 0.65;
}
.shelf-bar > .hint {
    flex: none;
    padding-right: 8px;
}
@media (max-width: 899px) {
    .shelf-bar > .hint {
        display: none;
    }
}

/* ---- The grid: two across on a phone, three on a tablet, four on a wide screen ---- */
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (min-width: 760px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}
@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }
}

/* ---- "Play together": one device, online, controllers ---- */
.together {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.together h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading);
    padding-left: 4px;
}
.together-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}
@media (min-width: 900px) {
    .together-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}
.together-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    background: var(--card);
}
.together-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--heading);
}
.together-card p {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text);
}
.together-card p strong {
    font-weight: 600;
}
.together-card .hint {
    color: var(--dim);
}
.together-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--card-2);
    color: var(--heading);
}
.together-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.together-go {
    align-self: flex-start;
    margin-top: auto;
}

/* ---- "Your arcade": who is playing, the figures, the install ---- */
.mine {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    background: var(--card);
    min-width: 0;
}
@media (min-width: 1100px) {
    .mine {
        padding: 20px;
    }
}
.mine-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.mine-head h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading);
}
.mine-head .hint strong {
    font-weight: 500;
    color: var(--text);
}
.mine-head img {
    width: 64px;
    height: auto;
    flex: none;
}
.mine-stats {
    display: flex;
    gap: 8px;
}
.mine-keys {
    margin-top: auto;
}

/* ---- The install, inside "Your arcade": how much of the arcade is here, and the button to fetch the rest ---- */
.install-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: var(--card-2);
}
.install-text {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 2px;
}
.install-text strong {
    font-size: 13px;
    color: var(--heading);
}
.install-bar {
    flex-basis: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}
.install-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
    transition: width 0.3s ease;
}
