/* Game Guide (Views/Game/GameGuide): the rule book. Builds on legal.css (contents list beside a readable document). */

.gg-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
}

.gg-shell .legal-doc {
    max-width: 58rem;
}

.gg-shell .legal-doc h3 {
    color: var(--mp-text);
    scroll-margin-top: 7rem;
}

/* Numbered how-to lists: the number sits in a badge so a step reads as one block. */
.gg-steps {
    list-style: none;
    counter-reset: gg-step;
    padding-left: 0;
    display: grid;
    gap: .6rem;
}

    .gg-steps > li {
        counter-increment: gg-step;
        position: relative;
        padding: .6rem .8rem .6rem 3rem;
        border: 1px solid rgba(247, 211, 122, .18);
        border-radius: .8rem;
        background: rgba(255, 255, 255, .03);
    }

        .gg-steps > li + li {
            margin-top: 0;
        }

        .gg-steps > li::before {
            content: counter(gg-step);
            position: absolute;
            left: .8rem;
            top: .6rem;
            display: grid;
            place-items: center;
            width: 1.6rem;
            height: 1.6rem;
            border-radius: 50%;
            background: var(--mp-gold, #f7d37a);
            color: #1b1330;
            font-size: .8rem;
            font-weight: 900;
        }

/* Tables: scroll sideways on a phone rather than squeezing. */
.gg-table-wrap {
    overflow-x: auto;
    margin: .8rem 0 1.2rem;
    border: 1px solid rgba(247, 211, 122, .18);
    border-radius: .8rem;
}

.gg-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-size: .92rem;
}

    .gg-table th,
    .gg-table td {
        padding: .55rem .75rem;
        text-align: left;
        vertical-align: top;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        color: var(--mp-muted);
    }

    .gg-table thead th {
        color: var(--mp-gold, #f7d37a);
        font-size: .74rem;
        font-weight: 900;
        letter-spacing: .1em;
        text-transform: uppercase;
        background: rgba(255, 255, 255, .04);
    }

    .gg-table tbody th {
        color: var(--mp-text);
        font-weight: 800;
        white-space: nowrap;
    }

    .gg-table tbody tr:last-child th,
    .gg-table tbody tr:last-child td {
        border-bottom: 0;
    }

.gg-sub {
    margin-left: .35rem;
    color: var(--mp-muted);
    font-weight: 600;
}

/* Term lists and call-outs. */
.gg-dl {
    display: grid;
    grid-template-columns: minmax(8rem, max-content) 1fr;
    gap: .35rem 1rem;
    margin: .6rem 0 1.2rem;
}

    .gg-dl dt {
        color: var(--mp-text);
        font-weight: 800;
    }

    .gg-dl dd {
        margin: 0;
        color: var(--mp-muted);
    }

.gg-note {
    padding: .7rem .9rem;
    border-left: 3px solid var(--mp-gold, #f7d37a);
    border-radius: .4rem;
    background: rgba(247, 211, 122, .07);
}

.gg-figure {
    margin: .8rem 0 1.2rem;
    text-align: center;
}

    .gg-figure a {
        display: block;
        max-width: 900px;
        margin: 0 auto;
    }

    .gg-figure img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 14px;
        border: 1px solid rgba(247, 211, 122, .25);
    }

    .gg-figure figcaption {
        margin-top: .5rem;
        font-size: .85rem;
        color: var(--mp-muted);
    }

@media (max-width: 900px) {
    .gg-dl {
        grid-template-columns: 1fr;
        gap: 0;
    }

        .gg-dl dd {
            margin-bottom: .6rem;
        }
}

/* On paper: just the rules, no navigation or buttons, and every table on the page. */
@media print {
    .gg-hero-actions,
    .legal-toc {
        display: none !important;
    }

    .gg-shell {
        display: block;
    }

    .gg-shell .legal-doc,
    .gg-table-wrap {
        max-width: none;
        overflow: visible;
        background: #fff !important;
        box-shadow: none;
        border-color: #bbb;
    }

        .gg-shell .legal-doc h2,
        .gg-shell .legal-doc h3,
        .gg-table thead th,
        .gg-table tbody th,
        .gg-shell .legal-doc strong,
        .gg-dl dt {
            color: #000 !important;
        }

        .gg-shell .legal-doc p,
        .gg-shell .legal-doc li,
        .gg-table td,
        .gg-table th,
        .gg-dl dd {
            color: #222 !important;
        }

    .gg-table {
        min-width: 0;
    }

        .gg-table tr {
            break-inside: avoid;
        }

    .gg-figure img {
        max-width: 60%;
        margin: 0 auto;
    }
}
