/*
Theme Name: Sims Archives
Theme URI: https://www.simsarchives.com/
Description: A modern, fast, clean and SEO-friendly WordPress theme designed specifically for the Sims Archives plugin. Neutral palette with The Sims 3 plumbob green as accent. Flat design, no glow, no glossy gradients — just clear typography, generous whitespace, and snappy performance.
Author: Sims Archives Team
Author URI: https://www.simsarchives.com/
Version: 5.3.0
Requires PHP: 7.4
Tested up to: 6.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain: sims-archives
Tags: archive, custom-post-types, two-columns, accessibility-ready, translation-ready
*/

/* =========================================================
   1. DESIGN TOKENS — Modern, clean palette
   ========================================================= */
:root {
    /* ----- Neutral base ----- */
    --c-bg:           #FAFAF7;   /* warm off-white page background */
    --c-surface:      #FFFFFF;   /* card/panel background */
    --c-surface-2:    #F3F3EE;   /* alt surface (e.g. striped rows) */
    --c-border:       #E5E5DF;   /* thin borders */
    --c-border-2:     #D4D4CC;   /* slightly stronger border */

    /* ----- Text ----- */
    --c-ink:          #1A1A17;   /* primary text */
    --c-ink-2:        #3A3A35;   /* secondary text */
    --c-muted:        #6B6B62;   /* muted text */
    --c-muted-2:      #98988E;   /* even more muted */

    /* ----- Accent: Sims 3 plumbob green ----- */
    --c-accent:       #82C341;   /* the iconic Sims 3 lime green */
    --c-accent-h:     #6FB02E;   /* hover */
    --c-accent-l:     #E6F4D4;   /* subtle background tint */
    --c-accent-d:     #4D8019;   /* dark text version, AA-compliant */

    /* ----- Sims 3 secondary accent: warm orange ----- */
    --c-warm:         #F39C12;
    --c-warm-l:       #FEF5E6;

    /* ----- States ----- */
    --c-focus:        var(--c-accent-d);

    /* ----- Typography ----- */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', Consolas, monospace;

    /* ----- Sizes ----- */
    --radius-sm:   4px;
    --radius:      8px;
    --radius-lg:   14px;
    --radius-pill: 999px;

    /* ----- Layout ----- */
    --container:  1200px;
    --container-w:1380px;
    --gutter:     clamp(1rem, 3vw, 2rem);

    /* ----- Shadows — extremely subtle ----- */
    --shadow-sm:  0 1px 2px rgba(26, 26, 23, 0.05);
    --shadow:     0 1px 3px rgba(26, 26, 23, 0.06), 0 4px 12px rgba(26, 26, 23, 0.04);

    /* ----- Easing ----- */
    --ease: cubic-bezier(.4, 0, .2, 1);
}

/* =========================================================
   1b. DARK THEME — The Sims 2 inspired blues
   ----------------------------------------------------------
   Default theme. Inspired by the official Sims 2 website palette:
   deep navy outer background, mid-blue panels, lighter blue accents,
   white text. The plumbob green accent is preserved.
   Applied to <html data-theme="dark"> (the default in header.php).
   ========================================================= */
[data-theme="dark"] {
    --c-bg:           #1A3F7C;   /* deep navy page bg */
    --c-surface:      #2D5BA8;   /* mid blue panel */
    --c-surface-2:    #3970C0;   /* alt panel (slightly lighter) */
    --c-border:       #5483C7;   /* visible blue border on dark */
    --c-border-2:     #6A95D1;

    --c-ink:          #FFFFFF;
    --c-ink-2:        #E0EAF8;
    --c-muted:        #A2BFE0;
    --c-muted-2:      #7896BC;

    --c-accent:       #82C341;   /* plumbob green — kept identical */
    --c-accent-h:     #95D454;
    --c-accent-l:     rgba(130, 195, 65, 0.18); /* tinted bg for chip-accent */
    --c-accent-d:     #ADDB6F;   /* lighter green for AA contrast on dark */

    --c-warm:         #FFA133;
    --c-warm-l:       rgba(255, 161, 51, 0.15);

    /* Shadows are barely visible on dark; tone them down */
    --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow:     0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   2. RESET + BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
img, svg, video, picture { max-width: 100%; display: block; height: auto; }
button { font: inherit; }

a {
    color: var(--c-accent-d);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    transition: color .12s var(--ease);
}
a:hover { color: var(--c-ink); }

:focus-visible {
    outline: 2px solid var(--c-focus);
    outline-offset: 2px;
    border-radius: 3px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 .65em;
    color: var(--c-ink);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.875rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.25rem); }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }
small { font-size: .875rem; color: var(--c-muted); }

hr {
    border: 0;
    border-top: 1px solid var(--c-border);
    margin: 2rem 0;
}

::selection {
    background: var(--c-accent);
    color: var(--c-ink);
}

/* =========================================================
   3. LAYOUT PRIMITIVES
   ========================================================= */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
}
.container-wide { max-width: var(--container-w); }
.section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.spacer { flex: 1; }

/* =========================================================
   4. BUTTONS — Flat, no glow
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.2rem;
    background: var(--c-accent);
    color: var(--c-ink);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid var(--c-accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease);
    white-space: nowrap;
}
.btn:hover,
.btn:focus-visible {
    background: var(--c-accent-h);
    border-color: var(--c-accent-h);
    color: var(--c-ink);
}
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }

.btn-secondary {
    background: var(--c-surface);
    color: var(--c-ink);
    border-color: var(--c-border-2);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--c-surface-2);
    border-color: var(--c-ink-2);
    color: var(--c-ink);
}

.btn-ghost {
    background: transparent;
    color: var(--c-ink);
    border-color: transparent;
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: var(--c-surface-2);
    color: var(--c-ink);
}

.btn-dark {
    background: var(--c-ink);
    color: var(--c-surface);
    border-color: var(--c-ink);
}
.btn-dark:hover,
.btn-dark:focus-visible {
    background: #000;
    color: var(--c-surface);
    border-color: #000;
}

/* =========================================================
   5. CARDS / PANELS
   ========================================================= */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.card-flush { padding: 0; overflow: hidden; }

/* =========================================================
   6. CHIPS / TAGS
   ========================================================= */
.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .65rem;
    background: var(--c-surface);
    color: var(--c-ink-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-pill);
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .12s var(--ease), border-color .12s var(--ease);
    white-space: nowrap;
}
.chip:hover {
    background: var(--c-accent-l);
    border-color: var(--c-accent);
    color: var(--c-accent-d);
}
.chip-accent {
    background: var(--c-accent-l);
    color: var(--c-accent-d);
    border-color: transparent;
    font-weight: 600;
}
.chip-warm {
    background: var(--c-warm-l);
    color: var(--c-warm);
    border-color: transparent;
    font-weight: 600;
}
.chip-dark {
    background: var(--c-ink);
    color: var(--c-surface);
    border-color: var(--c-ink);
}

/* =========================================================
   7. HEADER (sticky, clean)
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--c-border);
}
.site-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 64px;
    padding-block: .65rem;
}
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    color: var(--c-ink);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
.site-logo:hover { color: var(--c-ink); }
.plumbob {
    /* Tiny plumbob diamond — pure CSS, no image required */
    display: inline-block;
    width: 16px;
    height: 20px;
    background: var(--c-accent);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    flex-shrink: 0;
    transition: transform .25s var(--ease);
}
.site-logo:hover .plumbob {
    transform: rotate(45deg);
}

.site-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-nav ul,
.site-nav .menu {
    display: flex;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    color: var(--c-ink-2);
    text-decoration: none;
    font-weight: 500;
    font-size: .93rem;
    padding: .5rem .85rem;
    border-radius: var(--radius);
    transition: background .12s var(--ease), color .12s var(--ease);
}
.site-nav a:hover {
    background: var(--c-surface-2);
    color: var(--c-ink);
}
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
    background: var(--c-ink);
    color: var(--c-surface);
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
}
.icon-btn {
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--c-ink-2);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .12s var(--ease), color .12s var(--ease);
    text-decoration: none;
}
.icon-btn:hover {
    background: var(--c-surface-2);
    color: var(--c-ink);
}

.mobile-toggle {
    display: none;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-ink);
    cursor: pointer;
}
.mobile-toggle svg { margin: 0 auto; }

@media (max-width: 880px) {
    .mobile-toggle { display: grid; place-items: center; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--c-bg);
        border-bottom: 1px solid var(--c-border);
        padding: .85rem var(--gutter) 1.25rem;
        flex-direction: column;
        align-items: stretch;
    }
    .site-nav.is-open { display: flex; }
    .site-nav ul, .site-nav .menu {
        flex-direction: column;
        gap: .1rem;
    }
    .site-nav a {
        padding: .65rem .85rem;
        font-size: 1rem;
    }
}

/* =========================================================
   8. FOOTER
   ========================================================= */
.site-footer {
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    margin-top: 4rem;
    padding-block: 3rem 1.5rem;
}
.site-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 720px) { .site-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
    color: var(--c-ink);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .85rem;
    font-weight: 700;
}
.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.site-footer a {
    color: var(--c-ink-2);
    text-decoration: none;
    font-size: .92rem;
}
.site-footer a:hover { color: var(--c-accent-d); text-decoration: underline; }
.site-footer-bottom {
    border-top: 1px solid var(--c-border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .85rem;
    color: var(--c-muted);
}
.site-footer-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    color: var(--c-ink);
    margin-bottom: .85rem;
}

/* =========================================================
   9. SKIP LINK + A11Y
   ========================================================= */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--c-ink);
    color: var(--c-surface);
    padding: .75rem 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; color: var(--c-surface); }
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* =========================================================
   10. PROSE (page templates, about sections)
   ========================================================= */
.prose {
    line-height: 1.75;
    font-size: 1.02rem;
    color: var(--c-ink-2);
}
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.75rem; color: var(--c-ink); }
.prose h3 { margin-top: 1.25rem; color: var(--c-ink); }
.prose a {
    color: var(--c-accent-d);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}
.prose a:hover { color: var(--c-ink); }
.prose img { border-radius: var(--radius); margin-block: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }

/* =========================================================
   11. EYEBROW (small label above headings)
   ========================================================= */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-accent-d);
    margin-bottom: .65rem;
}
.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--c-accent);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    display: inline-block;
}

/* =========================================================
   12. PAGE HEADER (titre + description on archives, search, etc.)
   ========================================================= */
.page-header {
    padding-block: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2rem);
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 2rem;
}
.page-header h1 { margin-bottom: .5rem; }
.page-header-desc {
    color: var(--c-muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0;
}

/* =========================================================
   13. STATS ROW (small inline numbers below page headers)
   ========================================================= */
.stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.stat strong {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--c-ink);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat span {
    display: block;
    margin-top: .15rem;
    font-size: .82rem;
    color: var(--c-muted);
    font-weight: 500;
}

/* =========================================================
   14. HOMEPAGE HERO
   ========================================================= */
.hero {
    padding-block: 3rem;
    border-bottom: 1px solid var(--c-border);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
}
@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    margin-bottom: 1rem;
}
.hero h1 em {
    font-style: normal;
    color: var(--c-accent-d);
}
.hero-desc {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--c-muted);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 480px;
}
.hero-ctas {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Hero feature card — clean and editorial */
.hero-feature {
    display: block;
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--c-surface);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    transition: transform .25s var(--ease);
}
.hero-feature:hover {
    transform: translateY(-2px);
    color: var(--c-surface);
}
.hero-feature-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.hero-feature-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 23, 0) 0%,
        rgba(26, 26, 23, 0.1) 50%,
        rgba(26, 26, 23, 0.85) 100%
    );
}
.hero-feature-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
}
.hero-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .65rem;
    background: var(--c-accent);
    color: var(--c-ink);
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .85rem;
}
.hero-feature-title {
    color: var(--c-surface);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    margin: 0 0 .35rem;
    line-height: 1.2;
}
.hero-feature-meta {
    font-size: .9rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    gap: .65rem;
    align-items: center;
}

/* =========================================================
   15. SECTION HEADERS (homepage rows)
   ========================================================= */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.section-header h2 { margin: 0; }
.section-link {
    color: var(--c-ink-2);
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .35rem .75rem;
    border-radius: var(--radius);
    transition: background .12s var(--ease), color .12s var(--ease);
}
.section-link:hover {
    background: var(--c-surface-2);
    color: var(--c-ink);
}

/* =========================================================
   16. TYPE GRID (homepage)
   ========================================================= */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem;
}
.type-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
    padding: 1.25rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    color: var(--c-ink);
    text-decoration: none;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.type-card:hover {
    border-color: var(--c-accent);
    background: var(--c-accent-l);
    color: var(--c-ink);
}
.type-card-count {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--c-accent-d);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.type-card-name {
    font-weight: 600;
    font-size: .92rem;
    color: var(--c-ink-2);
}

/* =========================================================
   17. GAMES GRID + GAME CARDS (square)
   ========================================================= */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
@media (max-width: 1100px) { .games-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .games-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }
@media (max-width: 420px)  { .games-grid { grid-template-columns: 1fr; } }

.game-card { margin: 0; position: relative; }
.game-card-link {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s var(--ease), transform .2s var(--ease);
}
.game-card-link:hover {
    border-color: var(--c-accent);
    transform: translateY(-2px);
}
.game-card-cover { position: absolute; inset: 0; }
.game-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--ease);
}
.game-card-link:hover .game-card-cover img {
    transform: scale(1.04);
}

/* Placeholder — flat coloured tile with title */
.game-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.1rem;
    color: var(--c-surface);
}
.game-placeholder-type {
    align-self: flex-start;
    padding: .2rem .65rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--c-surface);
    border-radius: var(--radius-pill);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.game-placeholder-title {
    color: var(--c-surface);
    font-weight: 800;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.15;
    margin-top: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Type-specific flat colours (using palette) */
.gp-base        { background: #4A90D9; }
.gp-expansion   { background: var(--c-accent-d); }
.gp-game-pack   { background: var(--c-warm); }
.gp-stuff       { background: #C0395E; }
.gp-kit         { background: #8E5BC4; }
.gp-creator     { background: #2D9C9C; }
.gp-compilation { background: var(--c-ink); }
.gp-world       { background: #6FA8D3; }
.gp-default     { background: var(--c-ink-2); }

/* Hover overlay (revealed on hover) */
.game-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 1.1rem;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 23, 0) 0%,
        rgba(26, 26, 23, 0) 50%,
        rgba(26, 26, 23, 0.92) 100%
    );
    opacity: 0;
    transition: opacity .2s var(--ease);
    pointer-events: none;
    color: var(--c-surface);
}
.game-card-link:hover .game-card-overlay,
.game-card-link:focus-visible .game-card-overlay {
    opacity: 1;
}
.game-card-overlay-type {
    display: inline-block;
    padding: .15rem .55rem;
    background: var(--c-accent);
    color: var(--c-ink);
    border-radius: var(--radius-pill);
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .4rem;
}
.game-card-overlay-title {
    margin: 0 0 .3rem;
    color: var(--c-surface);
    font-size: clamp(.95rem, 1.4vw, 1.15rem);
    font-weight: 700;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.game-card-overlay-meta {
    font-size: .78rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.game-card-overlay-year {
    color: var(--c-accent);
    font-weight: 700;
}
@media (hover: none) {
    .game-card-overlay { opacity: 1; }
    .game-card-overlay-type { display: none; }
}

/* =========================================================
   18. FILTERS BAR (archive games)
   ========================================================= */
.filters {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 2rem;
}
.filters-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}
.filters-row:last-of-type { margin-bottom: 0; }
.filters-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--c-muted);
    min-width: 70px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .85rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-pill);
    color: var(--c-ink-2);
    text-decoration: none;
    font-weight: 500;
    font-size: .85rem;
    transition: all .12s var(--ease);
}
.filter-chip:hover {
    background: var(--c-accent-l);
    border-color: var(--c-accent);
    color: var(--c-accent-d);
}
.filter-chip.is-active {
    background: var(--c-ink);
    border-color: var(--c-ink);
    color: var(--c-surface);
}
.filter-chip-count {
    padding: 1px 6px;
    background: rgba(26, 26, 23, 0.08);
    border-radius: var(--radius-pill);
    font-size: .7rem;
    color: var(--c-muted);
    font-weight: 600;
}
.filter-chip.is-active .filter-chip-count {
    background: rgba(255, 255, 255, 0.22);
    color: var(--c-surface);
}

/* =========================================================
   19. TOOLBAR (search + sort + count)
   ========================================================= */
.toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem 0 0;
    border-top: 1px solid var(--c-border);
    margin-top: 1rem;
}
.search-input {
    flex: 1;
    min-width: 220px;
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-pill);
    padding: .4rem .85rem;
    transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.search-input:focus-within {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-accent-l);
}
.search-input input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    color: var(--c-ink);
    padding: .15rem 0;
    min-width: 0;
}
.search-input svg { flex-shrink: 0; color: var(--c-muted); }

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    flex-wrap: wrap;
}
.toolbar-count {
    font-weight: 500;
    color: var(--c-muted);
    font-size: .9rem;
}
.toolbar-count strong { color: var(--c-ink); font-weight: 700; }

.sort-select {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--c-muted);
}
.sort-select select {
    padding: .3rem .75rem;
    padding-right: 1.85rem;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    border-radius: var(--radius);
    font: inherit;
    font-size: .88rem;
    color: var(--c-ink);
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231A1A17' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
}
.sort-select select:hover { border-color: var(--c-border-2); }

/* =========================================================
   20. PAGINATION
   ========================================================= */
.pagination {
    display: flex;
    gap: .35rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem 0;
}
.pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 .85rem;
    display: inline-grid;
    place-items: center;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-ink-2);
    text-decoration: none;
    font-weight: 500;
    transition: all .12s var(--ease);
}
.pagination .page-numbers:hover {
    border-color: var(--c-accent);
    color: var(--c-accent-d);
    background: var(--c-accent-l);
}
.pagination .page-numbers.current {
    background: var(--c-ink);
    border-color: var(--c-ink);
    color: var(--c-surface);
}
.pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* =========================================================
   21. SINGLE GAME PAGE
   ----------------------------------------------------------
   Two hero variants:
   - .game-hero-cinematic: full-width hero with background image
     (when _sims_archives_hero_id is set). Image fills the section,
     dark gradient overlay, content + smaller poster sit on top.
   - .game-header (no-image fallback): clean side-by-side layout.
   ========================================================= */

/* --- Variant A: cinematic hero with background image --- */
.game-hero-cinematic {
    position: relative;
    overflow: hidden;
    /* Tall enough to feel hero-y but never push everything off-screen */
    min-height: clamp(420px, 60vh, 620px);
    color: var(--c-surface);
    isolation: isolate;
}
.game-hero-cinematic .game-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.game-hero-cinematic .game-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Subtle scale animation on load to feel less static */
    animation: hero-zoom 20s ease-out forwards;
}
@keyframes hero-zoom {
    from { transform: scale(1.03); }
    to   { transform: scale(1); }
}
.game-hero-cinematic .game-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        /* Left fade (so text is readable on the left) */
        linear-gradient(90deg, rgba(20, 20, 18, 0.85) 0%, rgba(20, 20, 18, 0.55) 50%, rgba(20, 20, 18, 0.3) 100%),
        /* Bottom fade (smooth transition to next section) */
        linear-gradient(180deg, rgba(20, 20, 18, 0) 40%, rgba(250, 250, 247, 0.05) 100%);
}
.game-hero-cinematic .container {
    position: relative;
    z-index: 2;
    padding-block: clamp(2.5rem, 6vw, 4rem);
    min-height: clamp(420px, 60vh, 620px);
    display: flex;
    align-items: center;
}

/* Inner grid: poster + body */
.game-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: center;
    width: 100%;
}
@media (max-width: 720px) {
    .game-hero-inner { grid-template-columns: 1fr; gap: 1.25rem; }
}

.game-hero-cinematic .game-poster {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    /* Cap the size so it doesn't dominate */
    max-width: 200px;
}
@media (max-width: 720px) {
    .game-hero-cinematic .game-poster {
        max-width: 140px;
    }
}
.game-hero-cinematic .game-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-hero-cinematic .game-header-body h1 {
    color: var(--c-surface);
    margin-bottom: .65rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    font-size: clamp(2rem, 4vw, 3rem);
}
.game-hero-cinematic .game-tagline {
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    max-width: 600px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}
.game-hero-cinematic .game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1.5rem;
}
.game-hero-cinematic .chip {
    background: rgba(255, 255, 255, 0.14);
    color: var(--c-surface);
    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.game-hero-cinematic .chip:hover {
    background: rgba(255, 255, 255, 0.22);
    color: var(--c-surface);
    border-color: rgba(255, 255, 255, 0.35);
}
.game-hero-cinematic .chip-accent {
    background: var(--c-accent);
    color: var(--c-ink);
    border-color: var(--c-accent);
    backdrop-filter: none;
}
.game-hero-cinematic .chip-accent:hover {
    background: var(--c-accent-h);
    border-color: var(--c-accent-h);
    color: var(--c-ink);
}
.game-hero-cinematic .game-ctas {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.game-hero-cinematic .btn-secondary {
    background: rgba(255, 255, 255, 0.14);
    color: var(--c-surface);
    border-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.game-hero-cinematic .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    color: var(--c-surface);
}

/* Breadcrumbs inside the cinematic hero need readable colors */
.game-hero-cinematic .breadcrumbs,
.game-hero-cinematic .breadcrumbs a,
.game-hero-cinematic .breadcrumbs-sep {
    color: rgba(255, 255, 255, 0.75);
}
.game-hero-cinematic .breadcrumbs a:hover {
    color: var(--c-surface);
}

/* --- Variant B: no-image fallback hero --- */
.game-header {
    padding-block: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
    border-bottom: 1px solid var(--c-border);
}
.game-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
@media (max-width: 720px) {
    .game-header-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.game-poster {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
}
.game-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.game-header-body h1 {
    margin-bottom: .65rem;
}
.game-tagline {
    font-size: 1.1rem;
    color: var(--c-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    max-width: 540px;
}
.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1.5rem;
}
.game-ctas {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Body sections */
.game-body {
    padding-block: clamp(2rem, 4vw, 3.5rem);
}
.game-body + .game-body {
    border-top: 1px solid var(--c-border);
}
.game-body-alt {
    background: var(--c-surface-2);
}

/* Two-column main + sidebar */
.game-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 880px) {
    .game-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* About */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 720px) {
    .about-split { grid-template-columns: 1fr; gap: 1rem; }
}
.about-tagline {
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    line-height: 1.2;
    font-weight: 700;
    margin: 0;
    color: var(--c-ink);
    letter-spacing: -0.015em;
}
.about-tagline em { font-style: normal; color: var(--c-accent-d); }

/* Features */
.features {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vw, 3rem);
}
.feature {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
.feature:nth-child(even) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}
.feature:nth-child(even) .feature-image { order: 2; }
@media (max-width: 720px) {
    .feature,
    .feature:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .feature:nth-child(even) .feature-image { order: 0; }
}
.feature-image {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
}
.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feature-body h3 {
    margin: 0 0 .65rem;
    font-size: clamp(1.2rem, 1.8vw, 1.4rem);
}
.feature-body p {
    color: var(--c-ink-2);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* Details card */
.details {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
}
@media (max-width: 720px) {
    .details { grid-template-columns: 1fr; }
}
.details-cover {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
}
.details-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.details-list {
    margin: 0;
    padding: 0;
}
.details-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--c-border);
}
.details-row:last-child { border-bottom: 0; }
.details-row dt {
    text-transform: uppercase;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--c-muted);
    margin: 0;
}
.details-row dd {
    margin: 0;
    color: var(--c-ink);
    font-weight: 500;
}

/* Sidebar */
.sidebar-block {
    padding: 1.25rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
}
.sidebar-block + .sidebar-block { margin-top: 1rem; }
.sidebar-block h3 {
    margin: 0 0 .85rem;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--c-muted);
}

/* Related items */
.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.related-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--c-ink);
    transition: background .12s var(--ease);
}
.related-item:hover {
    background: var(--c-surface-2);
    color: var(--c-ink);
}
.related-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--c-surface-2);
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-body { flex: 1; min-width: 0; }
.related-name {
    font-weight: 600;
    font-size: .9rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.related-rel {
    font-size: .75rem;
    color: var(--c-muted);
}

/* =========================================================
   22. MEDIA LIBRARY (tabs + grid)
   ========================================================= */
.media-section {
    padding-block: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--c-border);
}
.media-tabs {
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--c-border);
}
.media-tab {
    padding: .4rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--c-muted);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: all .12s var(--ease);
}
.media-tab:hover {
    background: var(--c-surface-2);
    color: var(--c-ink);
}
.media-tab.is-active {
    background: var(--c-ink);
    color: var(--c-surface);
}
.media-tab-count {
    margin-left: .25rem;
    opacity: .6;
    font-size: .8rem;
}
.media-tab.is-active .media-tab-count { opacity: 1; }

.media-pane { display: none; }
.media-pane.is-active { display: block; }

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .85rem;
}
.media-thumb {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    cursor: pointer;
    padding: 0;
    transition: transform .2s var(--ease), border-color .12s var(--ease);
}
.media-thumb:hover {
    transform: translateY(-2px);
    border-color: var(--c-accent);
}
.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s var(--ease);
}
.media-thumb:hover img { transform: scale(1.04); }
.media-thumb.is-hidden { display: none; }
.media-load-more {
    text-align: center;
    margin-top: 1.5rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9100;
    background: rgba(26, 26, 23, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius);
}
.lightbox-caption {
    color: var(--c-surface);
    text-align: center;
    margin-top: 1rem;
    font-size: .92rem;
    max-width: 600px;
}
.lightbox-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--c-surface);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .12s var(--ease);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-prev  { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.25rem; top: 50%; transform: translateY(-50%); }

/* =========================================================
   23. MODAL (Buy modal)
   ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.modal.is-open { display: flex; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 23, 0.6);
    cursor: pointer;
}
.modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: 0 20px 60px rgba(26, 26, 23, 0.2);
    animation: modal-in .2s var(--ease);
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: transparent;
    color: var(--c-muted);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .12s var(--ease), color .12s var(--ease);
}
.modal-close:hover {
    background: var(--c-surface-2);
    color: var(--c-ink);
}
.modal h2 {
    margin: 0 0 .25rem;
    font-size: 1.25rem;
    padding-right: 2rem;
}
.modal-subtitle {
    margin: 0 0 1.25rem;
    color: var(--c-muted);
    font-size: .92rem;
}
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .5rem;
}
.store-card {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .85rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-ink);
    text-decoration: none;
    transition: all .12s var(--ease);
}
.store-card:hover {
    border-color: var(--c-accent);
    background: var(--c-accent-l);
    color: var(--c-ink);
}
.store-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: var(--c-surface-2);
    color: var(--c-ink);
    border-radius: var(--radius-sm);
}
.store-card:hover .store-icon { background: var(--c-accent); }
.store-icon svg { width: 18px; height: 18px; }
.store-label { font-weight: 600; font-size: .92rem; line-height: 1.2; }
.store-meta { display: block; font-size: .72rem; color: var(--c-muted); font-weight: 500; margin-top: 2px; }

body.modal-open { overflow: hidden; }

/* =========================================================
   24. EMPTY STATES
   ========================================================= */
.empty {
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: 480px;
    margin: 0 auto;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty h2 { margin-bottom: .5rem; }
.empty p { color: var(--c-muted); margin-bottom: 1.5rem; }

/* =========================================================
   25. BREADCRUMBS
   ========================================================= */
.breadcrumbs {
    font-size: .85rem;
    color: var(--c-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}
.breadcrumbs a {
    color: var(--c-muted);
    text-decoration: none;
}
.breadcrumbs a:hover { color: var(--c-ink); text-decoration: underline; }
.breadcrumbs-sep { color: var(--c-muted-2); }

/* =========================================================
   26. ASSETS GALLERY PAGES
   ========================================================= */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.cat-card {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    text-decoration: none;
    color: var(--c-surface);
    transition: transform .2s var(--ease), border-color .12s var(--ease);
}
.cat-card:hover {
    transform: translateY(-2px);
    border-color: var(--c-accent);
    color: var(--c-surface);
}
.cat-card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 23, 0.1) 0%,
        rgba(26, 26, 23, 0.85) 100%
    );
}
.cat-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.25rem;
}
.cat-card-name {
    color: var(--c-surface);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.cat-card-count {
    color: rgba(255, 255, 255, 0.85);
    font-size: .85rem;
    margin-top: .15rem;
}

/* Asset image grid (category page) */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .75rem;
}
.asset-tile {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: transform .2s var(--ease), border-color .12s var(--ease);
}
.asset-tile:hover {
    transform: translateY(-2px);
    border-color: var(--c-accent);
}
.asset-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s var(--ease);
}
.asset-tile:hover img { transform: scale(1.03); }
.asset-tile-locale {
    position: absolute;
    top: .4rem;
    left: .4rem;
    z-index: 2;
    padding: .15rem .5rem;
    background: rgba(26, 26, 23, 0.85);
    color: var(--c-surface);
    border-radius: var(--radius-pill);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* =========================================================
   27. LANGUAGE SWITCHER
   ========================================================= */
.lang-switcher {
    position: relative;
}
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .65rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--c-ink-2);
    font-weight: 600;
    font-size: .85rem;
    transition: background .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease);
}
.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] {
    background: var(--c-surface-2);
    color: var(--c-ink);
}
.lang-toggle svg {
    transition: transform .15s var(--ease);
}
.lang-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.lang-flag {
    /* SVG flag — sized by height, width follows aspect ratio from viewBox */
    height: 12px;
    width: auto;
    flex-shrink: 0;
    display: inline-block;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    vertical-align: middle;
}
.lang-item .lang-flag,
.lang-list .lang-flag {
    height: 14px;
}
.lang-code {
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 60;
    min-width: 200px;
    margin: 0;
    padding: .35rem;
    list-style: none;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: lang-menu-in .15s var(--ease);
}
.lang-menu[hidden] { display: none; }
@keyframes lang-menu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lang-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--c-ink);
    font-size: .9rem;
    font-weight: 500;
    transition: background .12s var(--ease);
}
.lang-item:hover {
    background: var(--c-surface-2);
    color: var(--c-ink);
}
.lang-item.is-active {
    background: var(--c-accent-l);
    color: var(--c-accent-d);
    font-weight: 600;
}
.lang-name { flex: 1; }
.lang-check {
    color: var(--c-accent-d);
    flex-shrink: 0;
}

/* When the cinematic hero is active, make the switcher readable */
.game-hero-cinematic .lang-toggle {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}
.game-hero-cinematic .lang-toggle:hover,
.game-hero-cinematic .lang-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.18);
    color: var(--c-surface);
}

/* Sticky header dark-ish state — not used by default but reserved */

/* Footer variant (inline list, simpler) */
.lang-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.lang-list .lang-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-pill);
    color: var(--c-ink-2);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
    transition: all .12s var(--ease);
}
.lang-list .lang-link:hover {
    border-color: var(--c-accent);
    background: var(--c-accent-l);
    color: var(--c-accent-d);
}
.lang-list .lang-link.is-active {
    background: var(--c-ink);
    border-color: var(--c-ink);
    color: var(--c-surface);
    cursor: default;
}

/* Mobile: hide native name in header toggle to save space */
@media (max-width: 480px) {
    .lang-toggle .lang-code { display: none; }
}

/* =========================================================
   28. UTILITIES
   ========================================================= */
.muted { color: var(--c-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* =========================================================
   29. THEME TOGGLE BUTTON
   ========================================================= */
.theme-toggle .theme-icon {
    display: none;
    line-height: 0;
}
/* Show MOON when in light mode (suggesting: click to go dark) */
[data-theme="light"] .theme-toggle .theme-icon-moon { display: inline-block; }
/* Show SUN when in dark mode (suggesting: click to go light) */
[data-theme="dark"]  .theme-toggle .theme-icon-sun  { display: inline-block; }
.theme-toggle svg { display: block; }

/* =========================================================
   30. DARK THEME — SPECIFIC OVERRIDES
   ----------------------------------------------------------
   Variables alone handle ~95% of components, but a few elements
   need explicit overrides where the "high contrast bg + light text"
   pattern would otherwise produce ugly white-on-blue popping.
   ========================================================= */

/* Header gets a tinted navy translucent background instead of off-white */
[data-theme="dark"] .site-header {
    background: rgba(15, 36, 78, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Active nav item: subtle light pill on dark background (instead of black) */
[data-theme="dark"] .site-nav .current-menu-item > a,
[data-theme="dark"] .site-nav .current_page_item > a {
    background: rgba(255, 255, 255, 0.14);
    color: var(--c-ink);
}

/* Primary button (green): ALWAYS dark text — green on green never works */
.btn,
.btn:hover,
.btn:focus-visible {
    color: #1A1A17;
}

/* Filter chip active: light pill instead of black */
[data-theme="dark"] .filter-chip.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: var(--c-ink);
    border-color: rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .filter-chip.is-active .filter-chip-count {
    background: rgba(255, 255, 255, 0.18);
    color: var(--c-ink);
}
[data-theme="dark"] .filter-chip-count {
    background: rgba(255, 255, 255, 0.1);
    color: var(--c-muted);
}

/* Pagination current page: light pill */
[data-theme="dark"] .pagination .page-numbers.current {
    background: rgba(255, 255, 255, 0.18);
    color: var(--c-ink);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Media tab active: light pill */
[data-theme="dark"] .media-tab.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: var(--c-ink);
}

/* Dark button variant: reverse — light pill on dark */
[data-theme="dark"] .btn-dark {
    background: rgba(255, 255, 255, 0.12);
    color: var(--c-ink);
    border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] .btn-dark:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--c-ink);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Sort dropdown chevron: needs to be white on dark */
[data-theme="dark"] .sort-select select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* SVG flag border on dark — slight white tint instead of black */
[data-theme="dark"] .lang-flag {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Lang menu shadow needs more punch on dark */
[data-theme="dark"] .lang-menu {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Modal dialog shadow boost on dark */
[data-theme="dark"] .modal-dialog {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Empty state h2 should use accent color in both themes (was OK in light) */
[data-theme="dark"] .empty h2 {
    color: var(--c-ink);
}

/* Hero eyebrow on dark: accent-d is already lighter green — looks great */

/* Game placeholder type chip needs better contrast on dark — already OK
   since it uses white-on-dark fixed colors */

/* The "Featured" badge on hero-feature: keep its dark text — it's on green */
