/* Top 100 spoiler guard (kindacritic/ui_spoil.py). Tokens only.
 *
 * Two wrappers: details.spoil for blocks, span.spoil-chip for cover chips. The head script
 * adds `seen-<list slug>` to <html> for each localStorage['kc-seen-<list slug>'] key. A guard
 * opens once every list it names (data-spoil) is seen; chips belong to the Kinda Funny list.
 * Without JavaScript a tap on the summary reveals. */

.spoil { margin: 0; min-width: 0; }
.spoil > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
                   gap: 12px; padding: 12px 14px; color: var(--ink-2);
                   font-size: var(--t-meta); line-height: 1.35; font-weight: 600;
                   background: var(--surface); border: 1px solid var(--hairline);
                   border-radius: var(--r-lg); }
.spoil > summary::-webkit-details-marker { display: none; }
.spoil > summary:hover { border-color: var(--ink-muted); color: var(--ink); }
.spoil > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.spoil-seal { flex: none; display: inline-flex; }
.spoil-seal .badge-medal { width: 44px; height: 44px; margin: 0; }
.spoil-label { min-width: 0; }

/* A reveal is one way: once open, the badge or list replaces the summary. */
.spoil[open] > summary { display: none; }
html.seen-kf-top-100-games-2026 .spoil[data-spoil="kf-top-100-games-2026"] > summary { display: none; }
/* Seen already: show a closed guard's content at once, before the script opens it. */
html.seen-kf-top-100-games-2026 .spoil[data-spoil="kf-top-100-games-2026"]:not([open])::details-content {
  content-visibility: visible; display: block; }

/* Cover chips cannot be <details>: they sit inside the card's link. */
.spoil-chip { display: none; }
html.seen-kf-top-100-games-2026 .spoil-chip { display: contents; }

/* The title page's reveal line sits in the header's text column, 16px under the panels. */
.spoil-line { margin-top: 16px; }
.spoil-line .spoil > summary { display: inline-flex; padding: 8px 14px 8px 8px; border-radius: 999px; }
.spoil-line .spoil[open] > summary { display: none; }
/* The line grows the band past the poster, so the band needs no extra room below it. */
.bd-header:has(.spoil-line) + * { margin-top: 32px; }
.spoil-line .spoil-seal .badge-medal { width: 28px; height: 28px; }
/* Once revealed the summary is gone and the result takes its place, styled like the pill. */
.spoil-result { display: inline-flex; align-items: center; gap: 12px; margin: 0;
                padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface);
                border: 1px solid var(--hairline); font-size: var(--t-meta); font-weight: 600;
                line-height: 1.35; color: var(--ink); }
.spoil-result a { color: var(--accent); text-decoration: none; }
.spoil-results { display: flex; flex-wrap: wrap; gap: 8px; }
.spoil-results .spoil-result { padding-right: 16px; }

/* On /achievements/ the guard sits where the holder list goes. */
.ach-body .spoil > summary { background: var(--raised); padding: 12px 14px; border-radius: var(--r-md); }
