/* ── Mode sections ── */
.mode-section { margin: 32px auto 0; max-width: 1080px; text-align: left; }
.mode-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border, #E5E7EB);
}
.mode-header h2 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text, #1F2933);
    margin: 0;
}
.mode-badge {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 12px;
    color: #fff;
}
.mode-badge.compete { background: var(--primary, #2563EB); }
/* WCAG fix: white on #10B981 (emerald-500) is only 2.54:1 — use darker bg */
.mode-badge.train { background: #065f46; }  /* emerald-900: white gives 7.3:1 */

/* ── Game cards grid ── */
.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    gap: 14px;
    margin-bottom: 8px;
}
/* Center-justified variant: caps tile width and centers the row of tiles
   so the grid doesn't stretch full-width on desktop or feel left-anchored. */
.game-cards.game-cards-centered {
    grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
    justify-content: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.game-cards.game-cards-centered .game-card {
    text-align: center;
}
.game-cards.game-cards-centered .game-card-tags {
    justify-content: center;
}
.game-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 12px;
    padding: 18px 16px 14px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
    text-align: left;
    text-decoration: none;
    display: block;
    color: inherit;
}
.game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow, 0 4px 16px rgba(0,0,0,0.08));
}
.game-card-name {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text, #1F2933);
    margin-bottom: 4px;
}
.game-card-desc {
    font-size: 0.78em;
    color: var(--text-secondary, #6B7280);
    line-height: 1.3;
}
.game-card-tags {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.game-tag {
    font-size: 0.65em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 8px;
    background: #EFF6FF;
    /* WCAG fix: #2563EB (blue-600) on #EFF6FF (blue-50) = 3.38:1, fails 4.5.
       Use blue-800 (#1e40af) = 5.77:1 on #EFF6FF. */
    color: #1e40af;
}
.game-tag.h2h { background: #FEF3C7; color: #92400E; }
.game-tag.memory { background: #F0FDF4; color: #166534; }
.game-tag.math { background: #FFF7ED; color: #9A3412; }
.game-tag.speed { background: #FDF2F8; color: #9D174D; }

.category-label {
    color: var(--text-secondary, #6B7280);
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 18px 0 8px;
}

/* Skill-tree home grouping (Batch 4 of the AI-review punch-list).
   Stronger than .category-label so guest landing readers can scan groups
   at a glance instead of seeing one undifferentiated tile column. */
.home-section-header {
    color: var(--text, #1F2933);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 28px 0 12px;
    padding-bottom: 6px;
    text-align: center;
    border-bottom: 2px solid #DBEAFE;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
@media (prefers-color-scheme: dark) {
    .home-section-header {
        color: #F1F5F9;
        border-bottom-color: #1e3a8a;
    }
}

.quick-stats {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.mode-hint {
    font-size: 0.78em;
    color: var(--text-secondary, #6B7280);
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    .game-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .game-card { padding: 14px 12px 10px; }
    .game-card-name { font-size: 0.92em; }
}

/* Tagline + sign-up CTA copy used in the logged-out landing view. */
.home-tagline {
    color: #4B5563;
    margin-top: -8px;
    font-size: 1.05em;
}
.home-signup-cta {
    color: #4B5563;
    font-size: 0.9em;
}

@media (prefers-color-scheme: dark) {
    .home-tagline,
    .home-signup-cta { color: #cbd5e1; }
}
