/* ------------------------------------------------------------------ Browse
 *
 * Everything the site grew when it went from six games to thirty-six: the
 * catalogue's shelves and filters, a page per game, the rating notice, the
 * privacy page, player pages, and the footer that carries the link to them.
 *
 * It sits on top of app.css and shell.css and borrows their variables rather
 * than restating any colour. Nothing in here is required for a page to work —
 * every screen it styles is readable without it.
 */

/* ---------------------------------------------------------------- shared */

/* An anchor styled as a button. app.css only reaches the <button> element. */
a.button.secondary {
    background: transparent; color: var(--fg); border: 1px solid var(--line);
}
body.shellpage a.button.secondary {
    background: var(--panel); color: var(--ink); border: 1px solid var(--panel-line);
}
.button.ghost {
    background: var(--panel); color: var(--ink); border: 1px solid var(--panel-line);
}
.button.ghost:hover { background: rgba(255, 255, 255, .12); filter: none; }

.tile-dot { opacity: .5; margin: 0 .1rem; }
.tile-rating {
    justify-self: start; margin-top: .35rem;
    font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    padding: .1rem .4rem; border-radius: .3rem;
}
.rating-teen  { background: rgba(251, 191, 36, .18); color: #fbbf24; }
.rating-adult { background: rgba(244, 114, 182, .18); color: #f472b6; }
.pill.rating-teen, .pill.rating-adult { border-color: currentColor; }

/* ---------------------------------------------------------------- catalogue */

.browse-filters {
    display: grid; gap: .85rem; margin: 0 0 1.5rem;
    padding: 1rem; border-radius: 1rem;
    background: var(--panel); border: 1px solid var(--panel-line);
}
.browse-families { display: flex; flex-wrap: wrap; gap: .4rem; }
.famchip {
    display: inline-block; padding: .38rem .8rem; border-radius: 999px;
    font-size: .82rem; font-weight: 600; text-decoration: none;
    color: var(--ink-dim, var(--muted));
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--panel-line, var(--line));
}
.famchip:hover { color: var(--ink, var(--fg)); background: rgba(255, 255, 255, .1); }
.famchip.on {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, #6366f1, #ec4899);
}

.browse-row {
    display: grid; gap: .7rem; align-items: end;
    grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
    .browse-row { grid-template-columns: 2fr 1fr 1fr auto; }
}
.browse-field { display: grid; gap: .2rem; min-width: 0; }
.browse-field label {
    margin: 0; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--ink-dim, var(--muted));
}
.browse-field input, .browse-field select { margin: 0; }
.browse-actions { display: flex; gap: .6rem; align-items: center; }
.browse-actions button { margin: 0; }
.browse-clear { font-size: .85rem; text-decoration: none; color: var(--ink-dim, var(--muted)); }
.browse-clear:hover { text-decoration: underline; }
.browse-count { margin: 0; }
.browse-empty { margin: 2rem 0; }

/* A shelf. The first one sits tight under the filters rather than a third of a
   screen below them, which is what .block's top margin would otherwise do. */
.famgroup:first-child { margin-top: 1.5rem; }
.famgroup[hidden] { display: none; }

/* ---------------------------------------------------------------- shelves on the front page */

.shelves {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: .7rem;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.shelves a {
    display: grid; gap: .2rem; height: 100%; padding: .9rem 1rem;
    border-radius: .9rem; text-decoration: none; color: inherit;
    background: var(--panel); border: 1px solid var(--panel-line);
}
.shelves a:hover { border-color: rgba(255, 255, 255, .22); }
.shelves strong { letter-spacing: -0.01em; }
.shelf-count {
    margin-top: .3rem; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: #ec4899;
}

/* ---------------------------------------------------------------- a game's page */

.gamehead {
    display: grid; gap: 1.5rem; align-items: center; grid-template-columns: 1fr;
    padding: 1.5rem; border-radius: 1.15rem;
    border: 1px solid var(--panel-line);
    background:
        radial-gradient(24rem 14rem at 92% 10%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%),
        var(--panel);
}
@media (min-width: 44rem) {
    .gamehead { grid-template-columns: 8rem 1fr; padding: 2rem 2.25rem; }
}
.gamehead-art {
    display: grid; place-items: center; aspect-ratio: 1; width: 100%; max-width: 8rem;
    border-radius: 1.3rem; overflow: hidden;
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--accent) 92%, #fff),
        color-mix(in srgb, var(--accent) 40%, #120a18));
    box-shadow: 0 16px 34px -18px color-mix(in srgb, var(--accent) 90%, transparent);
}
.gamehead-art .featured-glyph { font-size: 3.25rem; }
.gamehead-shelf { margin: 0 0 .3rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.gamehead-shelf a { color: var(--ink-dim); text-decoration: none; }
.gamehead-shelf a:hover { color: var(--ink); }
.gamehead h1 { margin: 0 0 .3rem; font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -0.025em; }
.gamehead-tagline { margin: 0 0 1rem; color: var(--ink-dim); font-size: 1.05rem; }
.gamehead-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 .5rem; }
.gamehead-cta .button { margin-top: 0; }

.gamesummary { margin: 0; font-size: 1.05rem; max-width: 44rem; }

.gamehow { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; counter-reset: none; }
.gamehow li {
    display: grid; grid-template-columns: 2rem 1fr; gap: .9rem; align-items: start;
    padding: .9rem 1rem; border-radius: .9rem;
    background: var(--panel); border: 1px solid var(--panel-line);
}
.gamehow p { margin: 0; }

/* ---------------------------------------------------------------- rating notice */

.ratingnotice { max-width: 34rem; }
.ratingnotice h1 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 .75rem; }
.ratinglede { font-size: 1.05rem; margin: 0 0 1rem; }
.ratingout { margin-top: 1rem; }
.ratingout a { font-size: .9rem; color: var(--ink-dim); }

.adultcheck { margin-top: 1.75rem; }
.adultcheck h2 { margin: 0 0 .5rem; font-size: 1rem; }
.adultcheck p { margin: 0 0 .6rem; }
.checkline {
    display: flex; gap: .6rem; align-items: flex-start; margin: .75rem 0;
    font-weight: 500;
}
.checkline input { width: auto; margin: .25rem 0 0; flex: 0 0 auto; }
.setupmeta { margin-top: -.5rem; }

/* ---------------------------------------------------------------- prose pages */

.prose { max-width: 46rem; }
.prose .lede { font-size: 1.1rem; line-height: 1.55; margin: 0 0 .5rem; }
.prose .block:first-of-type { margin-top: 2rem; }
.prose p { max-width: 44rem; }
.prose .howto-warn { margin-top: 1rem; }
.limits { display: grid; gap: .7rem; margin: 0; padding-left: 1.15rem; }
.limits li { line-height: 1.55; }

/* ---------------------------------------------------------------- player pages */

.profile { max-width: 30rem; }
.profile-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.25rem; }
.profile-head h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; }
.profile-head p { margin: .2rem 0 0; }
.profile-face {
    display: grid; place-items: center; width: 3.25rem; height: 3.25rem; flex: 0 0 auto;
    border-radius: 50%; font-size: 1.3rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #6366f1, #ec4899);
}

/* ---------------------------------------------------------------- footer */

.sitefoot {
    margin-top: 3.5rem; padding-top: 1.1rem;
    border-top: 1px solid var(--panel-line, var(--line));
}
.sitefoot nav { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-bottom: .5rem; }
.sitefoot a { font-size: .875rem; text-decoration: none; color: var(--ink-dim, var(--muted)); }
.sitefoot a:hover { color: var(--ink, var(--fg)); text-decoration: underline; }
.sitefoot p { margin: 0; }

/* ---------------------------------------------------------------- admin: content packs */

.packtable td details summary { cursor: pointer; padding: .1rem 0; }
.packtable td details[open] summary { margin-bottom: .6rem; font-weight: 600; }
.packtable td form { max-width: 34rem; }
.packtable td label { margin-top: .75rem; }
.packview { margin: 0; display: grid; gap: .35rem; }
.packview dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.packview dd { margin: 0 0 .4rem; white-space: pre-wrap; }
