/* Home only (index.html): intro, first-game hint, players filter, card grid, master tools, footer. */

.home-intro {
    max-width: 680px;
    margin: 0 auto 28px;
    text-align: center;
    color: #ffffff;
}

.home-intro h1 {
    margin-bottom: 12px;
}

.home-lead {
    font-size: 1.15em;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.home-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
    margin-top: 14px;
    padding: 0;
    list-style: none;
    counter-reset: home-step;
    font-weight: 600;
}

.home-steps li {
    counter-increment: home-step;
    white-space: nowrap;
}

.home-steps li::before {
    content: counter(home-step) ". ";
}

.home-start {
    max-width: 680px;
    margin: 0 auto 24px;
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
}

.home-start p {
    flex: 1 1 260px;
    line-height: 1.45;
}

.home-start-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 700;
    color: #1d1d3a;
    background: #ffffff;
    text-decoration: none;
}

.home-start-link:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 3px;
}

.players-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.players-filter-label {
    font-weight: 700;
    margin-right: 4px;
}

.players-filter button {
    min-width: 48px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
}

.players-filter button[aria-pressed="true"] {
    color: #1d1d3a;
    background: #ffffff;
}

.players-filter button:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

.players-filter-status {
    min-height: 1.5em;
    margin: 8px 0 18px;
    text-align: center;
    color: #ffffff;
    font-size: 0.95em;
}

/* Cards: a grid on wide screens, compact cards on phones. */
.game-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.game-selection .game-card,
.home-tools .game-card {
    width: auto;
    min-height: 300px;
    padding: 36px 28px;
}

.game-selection .game-card h2 {
    font-size: 2em;
    margin-bottom: 12px;
}

.game-selection .game-card p {
    font-size: 1.05em;
}

.game-card.is-unsuited::before {
    background: rgba(0, 0, 0, 0.78);
}

.game-selection .game-card .game-fit {
    margin-top: 8px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: 700;
    color: #1d1d3a;
    background: #ffd700;
    text-shadow: none;
}

.game-card .game-meta {
    margin-top: 10px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
}

.game-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.game-card-actions .howto-button {
    margin-top: 0;
}

/* Looks like a button; the click lands on the title's stretched ::after, which opens the game. */
.game-card-play {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 26px;
    border-radius: 8px;
    font-weight: 700;
    color: #1d1d3a;
    background: #ffffff;
}

.home-tools {
    max-width: 680px;
    margin: 36px auto 0;
}

.home-tools-title {
    margin-bottom: 10px;
    font-size: 0.95em;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
}

.home-tools .game-card {
    min-height: 0;
    padding: 24px;
}

.home-tools .game-card h2 {
    font-size: 1.6em;
    margin-bottom: 8px;
}

.home-tools .game-card p {
    font-size: 1em;
}

/* One quiet footer instead of a banner plus a white box. */
.site-footer {
    max-width: 1200px;
    margin: 40px auto 0;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    color: #ffffff;
}

.site-footer-thanks {
    margin-bottom: 6px;
}

.site-footer a {
    color: #ffffff;
}

.site-footer .site-footer-star {
    padding: 12px 4px;
    color: #ffd700;
    font-weight: 600;
}

@media (max-width: 768px) {
    .container {
        padding: 24px 4px;
    }

    .home-intro h1 {
        font-size: 2.2em;
    }

    .game-selection {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .game-selection .game-card,
    .home-tools .game-card {
        max-width: none;
        min-height: 0;
        padding: 22px 18px;
        align-items: flex-start;
        text-align: left;
    }

    .game-selection .game-card h2 {
        font-size: 1.6em;
        margin-bottom: 6px;
    }

    .game-card-actions {
        justify-content: flex-start;
    }
}
