/* Colony Guide — site.css
   Fonts: Cinzel Decorative · Cinzel · Inter (loaded via _Layout.cshtml)
   Design: Game-Hub Dashboard + Illuminated Manuscript
   Mobile-first.
   ─────────────────────────────────────────────────────────────── */

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }

/* ── Design tokens ───────────────────────────────────────────── */
:root {
    /* Colours */
    --bg:           #0b0805;
    --bg-2:         #13100a;
    --surface:      #1a1509;
    --surface-2:    #221c0e;
    --surface-3:    #2a2212;
    --border:       #352a18;
    --border-gold:  #5a4118;
    --gold:         #c8942a;
    --gold-bright:  #e8b840;
    --gold-dim:     #7a5a1a;
    --burgundy:     #8b1a1a;
    --burgundy-2:   #6a1212;
    --text:         #e0ccaa;
    --text-muted:   #8a7a5a;
    --text-dim:     #504438;

    /* Typography */
    --f-deco:    'Cinzel Decorative', 'Cinzel', Georgia, serif;
    --f-heading: 'Cinzel', Georgia, serif;
    --f-body:    'Inter', system-ui, sans-serif;

    /* Layout */
    --nav-h:    56px;
    --max-w:    1080px;
    --page-px:  1rem;

    /* Transitions */
    --ease: 0.18s ease;
}

@media (min-width: 768px) {
    :root {
        --nav-h:   64px;
        --page-px: 2rem;
    }
}

/* ── Base ────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--f-body);
    font-size: 1rem;
    line-height: 1.7;
    min-height: 100vh;
    /* top padding so content doesn't hide behind sticky nav */
    padding-top: var(--nav-h);
}

/* ── Canvas animated background ─────────────────────────────── */
#medieval-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

/* Everything else sits above the canvas */
.top-nav,
.nav-overlay,
.nav-backdrop,
.page-wrap {
    position: relative;
    z-index: 1;
}

/* ── Top navigation ──────────────────────────────────────────── */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 var(--page-px);
    background: linear-gradient(180deg, #0d0a05ee 0%, #0d0a05cc 80%, transparent 100%);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--f-deco);
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
    text-shadow: 0 0 16px rgba(232, 184, 64, 0.4);
    transition: color var(--ease), text-shadow var(--ease);
}
.nav-logo:hover {
    color: #fff4c8;
    text-shadow: 0 0 24px rgba(232, 184, 64, 0.7);
}

/* Desktop: game tabs */
.nav-games {
    display: none;
    flex: 1;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-games::-webkit-scrollbar { display: none; }

@media (min-width: 640px) {
    .nav-games { display: flex; }
}

.nav-game-tab {
    font-family: var(--f-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.nav-game-tab:hover {
    color: var(--gold);
    border-color: var(--border-gold);
    background: var(--surface);
}
.nav-game-tab.active {
    color: var(--gold-bright);
    border-color: var(--border-gold);
    background: var(--surface-2);
}

/* Right side: lang + spacer */
.nav-right {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .nav-right { display: flex; }
}

.nav-lang {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.lang-btn {
    font-family: var(--f-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: color var(--ease), border-color var(--ease);
}
.lang-btn:hover { color: var(--gold); border-color: var(--border-gold); }
.lang-btn.lang-active {
    color: var(--gold-bright);
    border-color: var(--border-gold);
    background: var(--surface-2);
}

/* Hamburger button */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin-left: auto;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: border-color var(--ease);
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .hamburger { margin-left: 0.5rem; }
}

.hamburger:hover { border-color: var(--border-gold); }
.hamburger:hover .ham-bar { background: var(--gold); }

.ham-bar {
    display: block;
    height: 2px;
    background: var(--text-muted);
    border-radius: 1px;
    transition: background var(--ease), transform var(--ease), opacity var(--ease);
}

/* Hamburger → X animation */
.hamburger.open .ham-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--gold); }
.hamburger.open .ham-bar:nth-child(2) { opacity: 0; }
.hamburger.open .ham-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--gold); }

/* ── Overlay menu ────────────────────────────────────────────── */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 150;
}
.nav-backdrop.open { display: block; }

.nav-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 88vw);
    background: var(--surface);
    border-left: 1px solid var(--border-gold);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.nav-overlay.open { transform: translateX(0); }

/* ornamental top bar */
.nav-overlay::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--gold-bright), var(--gold), transparent);
    flex-shrink: 0;
}

.overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color var(--ease), background var(--ease);
}
.overlay-close:hover { color: var(--gold); background: var(--surface-2); }

.overlay-content {
    padding: 3rem 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.overlay-label {
    font-family: var(--f-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-dim);
    padding: 1rem 0 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}
.overlay-label:first-child { border-top: none; margin-top: 0; padding-top: 0; }

.overlay-game-link,
.overlay-section-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.5rem;
    font-family: var(--f-heading);
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: 4px;
    border: 1px solid transparent;
    transition: color var(--ease), background var(--ease), border-color var(--ease);
}
.overlay-game-link:hover,
.overlay-section-link:hover {
    color: var(--text);
    background: var(--surface-2);
    border-color: var(--border);
}
.overlay-game-link.active,
.overlay-section-link.active {
    color: var(--gold-bright);
    background: var(--surface-3);
    border-color: var(--border-gold);
}

.sec-icon {
    font-size: 1rem;
    width: 1.5rem;
    text-align: center;
    opacity: 0.8;
}

.overlay-lang {
    display: flex;
    gap: 0.4rem;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.overlay-admin {
    font-family: var(--f-heading);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding: 0.5rem 0;
    transition: color var(--ease);
}
.overlay-admin:hover { color: var(--text-muted); }

/* ── Page wrapper ────────────────────────────────────────────── */
.page-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--page-px);
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    flex-direction: column;
}

.page-wrap > main {
    flex: 1;
    padding-bottom: 3rem;
}

/* ── Home hero ───────────────────────────────────────────────── */
.home-hero {
    text-align: center;
    padding: clamp(3rem, 8vw, 6rem) 1rem clamp(2rem, 5vw, 4rem);
    position: relative;
}

.home-hero-title {
    font-family: var(--f-deco);
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-shadow: 0 0 40px rgba(232, 184, 64, 0.35), 0 2px 12px rgba(0,0,0,0.8);
    margin-bottom: 1rem;
}

/* ornamental line above title */
.home-hero-title::before {
    content: '⸻ ✦ ⸻';
    display: block;
    font-family: var(--f-heading);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--gold-dim);
    margin-bottom: 0.75rem;
}

.home-hero-sub {
    font-family: var(--f-heading);
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    max-width: 520px;
    margin: 0 auto;
}

.home-hero-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem auto 0;
    max-width: 280px;
    color: var(--gold-dim);
    font-size: 0.75rem;
}
.home-hero-divider::before,
.home-hero-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-gold));
}
.home-hero-divider::after {
    background: linear-gradient(90deg, var(--border-gold), transparent);
}

/* ── Game cards grid (home page) ─────────────────────────────── */
.game-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 0.5rem;
}
@media (min-width: 560px) {
    .game-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .game-grid { grid-template-columns: repeat(3, 1fr); }
}

.game-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
    position: relative;
}
.game-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px var(--border-gold);
}

.game-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border);
    transition: opacity var(--ease);
}
.game-card:hover .game-card-img { opacity: 0.9; }

.game-card-img-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0.4;
    border-bottom: 1px solid var(--border);
}

.game-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-card-title {
    font-family: var(--f-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.04em;
}
.game-card:hover .game-card-title { color: var(--gold-bright); }

.game-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.game-card-cta {
    display: inline-block;
    margin-top: 0.5rem;
    font-family: var(--f-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dim);
    border-bottom: 1px solid var(--border-gold);
    padding-bottom: 1px;
    transition: color var(--ease), border-color var(--ease);
}
.game-card:hover .game-card-cta { color: var(--gold); }

/* ── Section icon grid (game hub pages) ─────────────────────── */
.section-grid-heading {
    font-family: var(--f-heading);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-dim);
    text-align: center;
    margin-bottom: 1.25rem;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 480px) {
    .section-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
    .section-grid { grid-template-columns: repeat(8, 1fr); }
}

.section-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.section-tile:hover {
    border-color: var(--border-gold);
    background: var(--surface-2);
    transform: translateY(-2px);
}
.section-tile.active {
    border-color: var(--gold-dim);
    background: var(--surface-2);
}

.section-tile-icon {
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.85;
}

.section-tile-name {
    font-family: var(--f-heading);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.section-tile:hover .section-tile-name { color: var(--gold); }
.section-tile.active .section-tile-name { color: var(--gold); }

/* ── Game banner (game hub / section pages) ──────────────────── */
.game-banner {
    position: relative;
    width: 100%;
    height: clamp(140px, 28vw, 240px);
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 1.75rem;
}

.game-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.6;
}

.game-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,8,5,0.9) 0%, rgba(11,8,5,0.3) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem 1.5rem;
}

.game-banner-title {
    font-family: var(--f-deco);
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--gold-bright);
    text-shadow: 0 2px 12px rgba(0,0,0,0.8);
    letter-spacing: 0.04em;
}

/* ── Ornamental divider ──────────────────────────────────────── */
.orn-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
    color: var(--gold-dim);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}
.orn-divider::before,
.orn-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Content cards ───────────────────────────────────────────── */
.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: border-color var(--ease);
}
.content-card:hover { border-color: var(--border-gold); }

/* ── Generic content section ─────────────────────────────────── */
.content-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

/* ── Page title ──────────────────────────────────────────────── */
.page-title {
    font-family: var(--f-deco);
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.04em;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    text-shadow: 0 0 30px rgba(232,184,64,0.2);
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ── Headings ────────────────────────────────────────────────── */
h1 {
    font-family: var(--f-deco);
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.04em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(232,184,64,0.2);
}

h2 {
    font-family: var(--f-heading);
    font-size: clamp(1.05rem, 3vw, 1.3rem);
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    margin-top: 0.25rem;
}

h3 {
    font-family: var(--f-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

/* ── Prose content ───────────────────────────────────────────── */
p {
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}
p:last-child { margin-bottom: 0; }

strong { color: var(--gold); font-weight: 600; }

a { color: var(--gold); transition: color var(--ease); }
a:hover { color: var(--gold-bright); }

/* ── Lists ───────────────────────────────────────────────────── */
ul.prose-list, ol.prose-list {
    padding-left: 1.25rem;
    line-height: 1.85;
    color: var(--text);
}
ul.prose-list { list-style: none; }
ul.prose-list li::before {
    content: '◆';
    color: var(--gold-dim);
    font-size: 0.6rem;
    margin-right: 0.6rem;
    vertical-align: middle;
}

/* ── Definition list ─────────────────────────────────────────── */
.dl-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    font-size: 0.9rem;
}
.dl-grid dt {
    font-family: var(--f-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding-top: 0.1rem;
    white-space: nowrap;
}
.dl-grid dd { color: var(--text); }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    font-family: var(--f-heading);
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--text-dim); transition: color var(--ease); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--text-dim); opacity: 0.5; }

/* ── Index list (quests, items, etc.) ────────────────────────── */
.index-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.index-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 5px;
    transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.index-item:hover {
    border-color: var(--border-gold);
    background: var(--surface-2);
    transform: translateX(3px);
}

.index-item-title {
    font-family: var(--f-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}
.index-item:hover .index-item-title { color: var(--gold); }

.index-item-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    font-family: var(--f-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    border-radius: 2px;
    border: 1px solid;
    white-space: nowrap;
}
.badge-gold     { color: var(--gold); border-color: var(--gold-dim); background: rgba(200,148,42,0.08); }
.badge-burgundy { color: #d45050; border-color: #6a2020; background: rgba(139,26,26,0.1); }
.badge-muted    { color: var(--text-muted); border-color: var(--border); background: var(--surface-2); }

/* ── Tables ──────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.data-table th {
    font-family: var(--f-heading);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dim);
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-gold);
    text-align: left;
    white-space: nowrap;
}
.data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table a { color: var(--gold); }
.data-table a:hover { color: var(--gold-bright); }

/* ── Forms (admin) ───────────────────────────────────────────── */
.admin-form { max-width: 680px; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
}

.form-label {
    font-family: var(--f-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-dim);
}

.form-control {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.55rem 0.75rem;
    color: var(--text);
    font-family: var(--f-body);
    font-size: 0.9rem;
    transition: border-color var(--ease), box-shadow var(--ease);
    width: 100%;
}
.form-control:focus {
    outline: none;
    border-color: var(--gold-dim);
    box-shadow: 0 0 0 2px rgba(200,148,42,0.12);
}
.form-control::placeholder { color: var(--text-dim); }

select.form-control { appearance: none; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 520px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    font-family: var(--f-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid;
    transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: #0d0a05;
}
.btn-primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: #0d0a05; }

.btn-secondary {
    background: transparent;
    border-color: var(--border-gold);
    color: var(--gold);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--gold); }

.btn-danger {
    background: transparent;
    border-color: var(--burgundy-2);
    color: #d45050;
}
.btn-danger:hover { background: rgba(139,26,26,0.15); border-color: var(--burgundy); }

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
}

/* ── Spoiler blocks ──────────────────────────────────────────── */
.spoiler-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--burgundy-2);
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}
.spoiler-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: var(--f-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-align: left;
    background: transparent;
    border: none;
    transition: color var(--ease), background var(--ease);
}
.spoiler-toggle:hover { color: var(--text); background: var(--surface-2); }
.spoiler-toggle::before { content: '▶'; font-size: 0.6rem; transition: transform 0.2s; }
.spoiler-toggle.open::before { transform: rotate(90deg); }
.spoiler-content {
    padding: 0 1rem 1rem;
    display: none;
}
.spoiler-content.open { display: block; }

/* ── Item category list ──────────────────────────────────────── */
.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}
.category-item {}
.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    transition: border-color var(--ease), background var(--ease);
}
.category-link:hover {
    border-color: var(--gold);
    background: var(--surface-2);
    color: var(--gold);
}
.category-icon { font-size: 2rem; line-height: 1; }
.category-label {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-align: center;
}

/* ── Ad banners (max 2 per page: top + bottom) ──────────────── */
.ad-banner {
    max-width: var(--max-w);
    margin: 1rem auto;
    padding: 0;
    text-align: center;
}
.ad-banner-top {
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
}
.ad-banner-bottom {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.ad-placeholder {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity var(--ease);
}
.ad-placeholder:hover { opacity: 0.65; }

.ad-placeholder-label {
    font-family: var(--f-heading);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* Responsive: hide bottom ad on very small screens to reduce clutter */
@media (max-width: 480px) {
    .ad-banner { margin: 0.5rem auto; }
    .ad-placeholder { min-height: 60px; }
}

/* Leaderboard ad sizes */
@media (min-width: 768px) {
    .ad-placeholder { min-height: 90px; }
}

/* ── GOG Affiliate partial ───────────────────────────────────── */
.gog-affiliate {
    margin-top: 2.5rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    text-align: center;
}
.gog-affiliate p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ── Admin layout ────────────────────────────────────────────── */
.admin-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-title {
    font-family: var(--f-heading);
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}
.admin-nav a {
    font-family: var(--f-heading);
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.admin-nav a:hover,
.admin-nav a.active {
    color: var(--gold);
    border-color: var(--border-gold);
    background: var(--surface-2);
}

/* ── Alert / flash messages ──────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border: 1px solid;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}
.alert-success { color: #7eb87e; border-color: #2a4a2a; background: rgba(50,100,50,0.1); }
.alert-error   { color: #d45050; border-color: #6a2020; background: rgba(139,26,26,0.1); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 2rem 0 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-disclaimer {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 0.6rem;
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-family: var(--f-heading);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.footer-legal a { color: var(--text-muted); transition: color var(--ease); }
.footer-legal a:hover { color: var(--gold); }
.footer-sep { color: var(--border-gold); }

.footer-copy {
    font-family: var(--f-heading);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.06em;
}

/* ── Contact form ───────────────────────────────────────────── */
.contact-form {
    max-width: 600px;
}
.contact-form .form-group {
    margin-bottom: 1rem;
}
.contact-form .form-label {
    display: block;
    font-family: var(--f-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.contact-form .form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--f-body);
    font-size: 0.9rem;
    transition: border-color var(--ease);
}
.contact-form .form-control:focus {
    outline: none;
    border-color: var(--gold-dim);
}
.contact-form textarea.form-control {
    resize: vertical;
    min-height: 100px;
}
.contact-form select.form-control {
    cursor: pointer;
}

/* ── Utility classes ─────────────────────────────────────────── */
.text-gold      { color: var(--gold); }
.text-muted     { color: var(--text-muted); }
.text-center    { text-align: center; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.d-flex         { display: flex; }
.gap-1          { gap: 0.5rem; }
.gap-2          { gap: 1rem; }
.flex-wrap      { flex-wrap: wrap; }
.align-center   { align-items: center; }
.justify-between { justify-content: space-between; }
