/* ============================================================
   DullDayDudes Blog Preview — Standalone CSS
   OKLCH tokens mapped from original HSL palette
   ============================================================ */

@layer reset, tokens, layout, components, utilities;

/* --- Reset --- */
@layer reset {
    *, *::before, *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    html { scroll-behavior: smooth; }
    body {
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    a { text-decoration: none; color: inherit; }
    ul, ol { list-style: none; }
    img { max-width: 100%; display: block; }
    input[type="radio"], input[type="checkbox"] { appearance: none; position: absolute; opacity: 0; pointer-events: none; }
}

/* --- Tokens --- */
@layer tokens {
    :root {
        /* Semantic colors — Dark theme (default) */
        --base-color: oklch(25% 0.02 250);
        --contrast-color: oklch(90% 0.02 90);
        --abyss-color: oklch(15% 0.02 250);
        --burst-color: oklch(78% 0.18 60);
        --accent-color: oklch(60% 0.12 170);
        --spotlight-color: oklch(78% 0.08 230);
        --seam-color: oklch(40% 0.02 250);
        --tint-color: oklch(30% 0.02 250);
        --muted-color: oklch(60% 0.02 250);
        --neutral-color: oklch(35% 0.02 250);
        --invert-color: oklch(96% 0.04 90);

        /* Category colors */
        --category-con-lang: oklch(50% 0.19 150);
        --category-tech-talk: oklch(45% 0.20 265);
        --category-world-building: oklch(45% 0.22 305);
        --category-indie-game-dev: oklch(78% 0.18 60);
        --category-quo-vadis: oklch(65% 0.06 325);

        /* Tag count colors */
        --tag-low: oklch(60% 0.02 250);
        --tag-mid: oklch(45% 0.20 265);
        --tag-high: oklch(50% 0.19 150);

        /* Copper/gold gradients */
        --copper-gradient: linear-gradient(
            oklch(80% 0.06 50),
            oklch(70% 0.02 60),
            oklch(55% 0.08 45),
            oklch(45% 0.06 40)
        );
        --gold-gradient: linear-gradient(
            oklch(30% 0.04 20),
            oklch(65% 0.12 70),
            oklch(30% 0.04 20)
        );

        /* Pie menu */
        --pie-from: var(--base-color);
        --pie-to: var(--tint-color);
        --pie-accent: oklch(50% 0.18 15);
        --size-pie: 6em;
        --size-inner-pie: 4.5em;

        /* Typography */
        --ff-body: 'Recursive', monospace, sans-serif;
        --ff-title: 'Recursive', monospace, sans-serif;
        --fw-body: 400;
        --fw-title: 700;
        --text-factor: 1;

        /* Fluid font sizes */
        --ft-size-200: clamp(0.65rem, 0.6rem + 0.2vw, 0.75rem);
        --ft-size-300: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
        --ft-size-400: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
        --ft-size-500: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
        --ft-size-600: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
        --ft-size-700: clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem);
        --ft-size-800: clamp(1.6rem, 1.3rem + 0.8vw, 2rem);
        --ft-size-900: clamp(1.9rem, 1.5rem + 1vw, 2.4rem);

        /* Layout */
        --header-height: 6.3em;
    }

    /* Light theme override */
    #light:checked ~ #grid-frame {
        --base-color: oklch(95% 0.02 90);
        --contrast-color: oklch(20% 0.02 250);
        --invert-color: oklch(30% 0.02 250);
        --abyss-color: oklch(98% 0.01 90);
        --tint-color: oklch(90% 0.03 80);
        --seam-color: oklch(80% 0.02 80);
        --muted-color: oklch(45% 0.02 250);
        --neutral-color: oklch(85% 0.02 90);
        --pie-from: oklch(90% 0.03 80);
        --pie-to: oklch(85% 0.04 70);
    }
    #light:checked ~ #grid-frame .header {
        background-color: oklch(98% 0.01 90);
        border-bottom-color: oklch(85% 0.02 80);
    }
    #light:checked ~ #grid-frame .teaser-card {
        background: oklch(92% 0.02 90);
    }
    #light:checked ~ #grid-frame .footer {
        background: oklch(92% 0.02 80);
        border-top-color: var(--burst-color);
    }
    #light:checked ~ #grid-frame .author-card {
        background: oklch(92% 0.02 90);
    }
}

/* --- Layout --- */
@layer layout {
    body {
        background: var(--base-color);
        color: var(--contrast-color);
        font-family: var(--ff-body);
        font-weight: var(--fw-body);
        font-size: var(--ft-size-400);
        line-height: 1.6;
        isolation: isolate;
    }

    html, body {
        height: 100%;
    }

    #grid-frame {
        display: grid;
        grid-auto-flow: row;
        grid-template-rows: auto 1fr auto;
        min-height: 100%;
        background-color: var(--base-color);
        background-image: radial-gradient(
            80% 50% at 60% -200px,
            var(--tint-color),
            var(--base-color)
        );
        background-size: 120% 2000px;
        background-repeat: no-repeat;
        background-position: top 58px center;
    }

    /* Header grid */
    .header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        background-color: var(--abyss-color);
        padding: 0 1em;
        position: sticky;
        top: 0;
        z-index: 9000;
        border-bottom: 1px solid var(--seam-color);
        min-height: var(--header-height);
    }

    /* Mid section — 3-column layout */
    .mid-section {
        display: grid;
        grid-auto-flow: row;
        grid-template-areas:
            "banner-menu"
            "page-content"
            "side-info";
        margin-inline: 1em;
        gap: 1.5em;
        padding-block: 1.5em;
    }

    .banner-menu { grid-area: banner-menu; }
    .page-content { grid-area: page-content; }
    .side-info { grid-area: side-info; }

    @media (min-width: 60em) {
        .mid-section {
            max-width: clamp(78vw, 108em, 100%);
            grid-template-columns: 16em 1fr;
            grid-template-areas:
                "banner-menu page-content"
                "side-info   page-content";
            gap: 2.5em;
        }
        .banner-menu,
        .side-info {
            align-self: start;
        }
    }

    @media (min-width: 94em) {
        .mid-section {
            margin-inline: auto;
            padding-inline: 1.5em;
            max-width: max(80vw, 107em);
            grid-template-columns: 15.25em 1fr 18em;
            grid-template-areas:
                "banner-menu page-content side-info";
        }
        .side-info {
            position: sticky;
            top: 4em;
        }
    }
}

/* --- Components --- */
@layer components {

    /* ========== SKIP LINK ========== */
    .skip-nav-link,
    .skip-link {
        position: absolute;
        top: -100%;
        left: 1em;
        background: var(--burst-color);
        color: var(--abyss-color);
        padding: 0.5em 1em;
        border-radius: 0 0 0.3em 0.3em;
        z-index: 99999;
        font-weight: 700;
        transition: top 0.2s;
    }
    .skip-nav-link,
    .skip-link:focus {
        top: 0;
    }

    /* ========== HEADER / LOGO ========== */
    .logo a {
        display: flex;
        align-items: center;
        padding: 0.4em 0.5em;
        font-family: var(--ff-title);
        font-weight: 900;
        font-size: var(--ft-size-300);
        font-variation-settings: 'CASL' 1, 'MONO' 1, 'CRSV' 1;
        color: var(--burst-color);
        line-height: 1;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
    .logo a span {
        display: flex;
        flex-direction: column;
        gap: 0;
        line-height: 1.1;
    }

    /* ========== MAIN NAV ========== */
    .main-menu {
        display: flex;
        align-items: center;
        gap: 0.5em;
    }
    .main-menu nav {
        display: flex;
        gap: 0.25em;
    }
    .main-menu nav a {
        padding: 0.4em 0.75em;
        color: var(--contrast-color);
        font-size: var(--ft-size-300);
        font-variation-settings: 'CASL' 0.5, 'MONO' 0.5;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        border-radius: 0.25em;
        transition: background 0.2s, color 0.2s;
    }
    .main-menu nav a:hover,
    .main-menu nav a.active {
        background: var(--tint-color);
        color: var(--burst-color);
    }

    /* ========== OPTIONS BAR ========== */
    .options {
        display: flex;
        align-items: center;
        gap: 0.5em;
        justify-self: end;
    }
    .nice-box {
        display: inline-flex;
        position: relative;
        padding: 4px 9px;
        margin: 5px;
        min-height: 2.5em;
        justify-content: space-evenly;
        align-items: center;
        font-size: var(--ft-size-300);
    }
    .nice-box::before {
        content: "";
        display: inline-block;
        z-index: -3;
        position: absolute;
        background-color: var(--base-color);
        border: 1px solid var(--seam-color);
        box-shadow: 1px 1px 1px 1px oklch(0% 0 0 / 30%);
        border-radius: 3px;
        inset: 1px;
    }
    .nice-box::after {
        content: "";
        display: inline-block;
        z-index: -4;
        position: absolute;
        background: var(--tint-color);
        box-shadow: inset 1px 1px 1px 1px oklch(0% 0 0 / 20%);
        border-radius: 4px;
        inset: -4px;
    }
    .nice-box > * {
        margin: 4px 0;
        padding: 0 4px;
        display: inline-block;
        border-right: 1px solid var(--neutral-color);
        border-left: 1px solid var(--seam-color);
    }
    .nice-box > *:last-child { border-right: none; }
    .nice-box > *:first-child { border-left: none; }
    .nice-box label {
        cursor: pointer;
        padding: 0.2em 0.35em;
        border-radius: 0.2em;
        color: var(--muted-color);
        transition: color 0.2s, background 0.2s;
        line-height: 1;
    }
    .nice-box label:hover {
        color: var(--burst-color);
        background: var(--tint-color);
    }
    .nice-box select {
        background: transparent;
        border: none;
        color: var(--contrast-color);
        font-family: var(--ff-body);
        font-size: var(--ft-size-200);
        cursor: pointer;
    }
    .nice-box select option {
        background: var(--base-color);
        color: var(--contrast-color);
    }
    .nice-select {
        gap: 0.3em;
    }
    .select-wrapper {
        display: flex;
        align-items: center;
        gap: 0.3em;
        cursor: pointer;
    }
    .font-small { font-size: 0.7em; }
    .font-mid { font-size: 1em; }
    .font-big { font-size: 1.3em; }

    /* Mobile menu toggles — hidden on desktop */
    .mobile-menu-toggle {
        display: none;
        cursor: pointer;
        font-size: var(--ft-size-600);
        color: var(--muted-color);
        padding: 0.3em;
    }
    @media (max-width: 59.99em) {
        .mobile-menu-toggle { display: inline-flex; }
        .main-menu > div,
        .options > div { display: none; }
        #menu-toggle:checked ~ div { display: flex; flex-wrap: wrap; gap: 0.3em; }
        #option-toggle:checked ~ div { display: flex; flex-wrap: wrap; gap: 0.3em; }
        .header {
            grid-template-columns: auto auto 1fr;
            flex-wrap: wrap;
        }
        .main-menu > div,
        .options > div {
            position: absolute;
            top: var(--header-height);
            left: 0;
            right: 0;
            background: var(--abyss-color);
            padding: 0.5em 1em;
            border-bottom: 1px solid var(--seam-color);
            z-index: 8999;
        }
        .options > div { right: 0; left: auto; }
    }

    /* ========== BANNER MENU (Left Sidebar) ========== */
    .banner-menu {
        padding: 0;
        z-index: 100;
        position: sticky;
        top: 4em;
    }
    .menu-element {
        position: relative;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 0 0;
        border-radius: 2px;
        background-color: var(--base-color);
        isolation: isolate;
    }
    /* Shadow frame behind menu */
    .menu-element::before {
        position: absolute;
        display: block;
        content: "";
        z-index: -2;
        inset: -2px;
        box-shadow: 5px 5px 15px 5px oklch(0% 0 0 / 40%);
        border-radius: 2px;
    }
    /* Copper gradient behind menu */
    .copper-border::before {
        background-image: var(--copper-gradient);
        background-size: 100% 300%;
        background-position: top;
        animation: copper-shimmer linear 12s alternate infinite;
    }
    @keyframes copper-shimmer {
        0% { background-position: top; }
        100% { background-position: bottom; }
    }

    .segment-subject {
        display: flex;
        justify-content: flex-start;
        color: var(--burst-color);
        font-weight: 700;
        font-size: var(--ft-size-400);
        font-variation-settings: 'CASL' 0.8, 'MONO' 0.5;
        padding: 0;
        margin: 0.8rem 0 0 0.25rem;
        text-transform: uppercase;
        text-decoration: none;
    }
    .sub-segment-subject {
        padding: 0;
        margin: 0.35rem 0 0 1rem;
        text-transform: uppercase;
        text-decoration: none;
        font-size: var(--ft-size-300);
        font-weight: 600;
        font-variation-settings: 'CASL' 0.6, 'MONO' 0.3;
    }
    .segment-element {
        margin-bottom: 0.25em;
    }
    .link-element {
        display: flex;
        justify-content: flex-end;
        margin: 0 0.75rem;
        color: var(--invert-color);
        letter-spacing: 0.1rem;
        font-size: var(--ft-size-300);
        text-transform: uppercase;
        text-decoration: none;
        padding: 0.15em 0;
        transition: color 0.2s;
    }
    .link-element:hover {
        color: var(--burst-color);
    }

    /* ========== TAG CLOUD ========== */
    .tag-cloud {
        margin: 1.25em 0 0 0;
        display: flex;
        justify-content: flex-start;
        align-content: flex-start;
        flex-wrap: wrap;
        gap: 0.4em;
        width: 100%;
    }
    .tag-cloud h3 {
        width: 100%;
        color: var(--burst-color);
        font-size: var(--ft-size-400);
        font-weight: 700;
        font-variation-settings: 'CASL' 0.8, 'MONO' 0.5;
        text-transform: uppercase;
        margin-bottom: 0.3em;
    }
    .tag-cloud a {
        display: inline-flex;
        align-items: center;
        gap: 0.3em;
        padding: 0.2em 0.5em;
        font-size: var(--ft-size-200);
        color: var(--contrast-color);
        background: var(--tint-color);
        border-radius: 0.25em;
        transition: background 0.2s, color 0.2s;
        text-decoration: none;
    }
    .tag-cloud a:hover {
        background: var(--neutral-color);
        color: var(--burst-color);
    }
    .tag-cloud a span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 1.4em;
        height: 1.4em;
        padding: 0 0.3em;
        border-radius: 0.75em;
        font-size: 0.8em;
        font-weight: 700;
        line-height: 1;
    }
    .tag-count-low {
        background-color: var(--tag-low);
        color: var(--abyss-color);
    }
    .tag-count-mid {
        background-color: var(--tag-mid);
        color: var(--invert-color);
    }
    .tag-count-high {
        background-color: var(--tag-high);
        color: var(--invert-color);
    }

    /* ========== MAIN CONTENT ========== */
    .markdown-body {
        line-height: 1.7;
    }
    .markdown-body section {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0.5em;
    }
    @media (min-width: 60em) {
        .markdown-body section {
            grid-template-columns: 1fr 3fr;
        }
    }

    /* Sticky Headlines */
    .sticky-headline {
        display: none;
    }
    @media (min-width: 60em) {
        .sticky-headline {
            display: block;
            text-align: right;
            align-self: start;
            position: sticky;
            top: calc(var(--header-height) + 1em);
            font-size: var(--ft-size-300);
            font-variation-settings: 'CASL' 1, 'MONO' 1;
            color: var(--muted-color);
            padding-right: 1em;
            border-right: 2px solid var(--seam-color);
            line-height: 1.4;
            max-width: 12em;
        }
    }

    .text-block {
        padding: 0.5em 0 1.5em 0;
    }
    @media (min-width: 60em) {
        .text-block {
            padding: 0.5em 0 1.5em 1.5em;
        }
    }
    .text-block h1 {
        font-size: var(--ft-size-800);
        font-variation-settings: 'CASL' 1, 'MONO' 0.5, 'CRSV' 1;
        color: var(--burst-color);
        margin-bottom: 0.5em;
    }
    .text-block h2 {
        font-size: var(--ft-size-700);
        font-variation-settings: 'CASL' 1, 'MONO' 0.5;
        color: var(--accent-color);
        margin-bottom: 0.5em;
    }
    .text-block h3 {
        font-size: var(--ft-size-600);
        font-variation-settings: 'CASL' 0.8, 'MONO' 0.3;
        color: var(--spotlight-color);
        margin-bottom: 0.4em;
    }
    .text-block h4 {
        font-size: var(--ft-size-500);
        font-variation-settings: 'CASL' 0.6, 'MONO' 0.3;
        color: var(--accent-color);
        margin-bottom: 0.3em;
    }
    .text-block p {
        margin-bottom: 1em;
        color: var(--contrast-color);
    }
    .text-block code {
        background: var(--tint-color);
        padding: 0.15em 0.4em;
        border-radius: 0.2em;
        font-family: var(--ff-body);
        font-variation-settings: 'MONO' 1;
        font-size: 0.9em;
        color: var(--burst-color);
    }
    .text-block blockquote {
        border-left: 3px solid var(--accent-color);
        padding: 0.5em 1em;
        margin: 0.5em 0 1em;
        background: var(--tint-color);
        border-radius: 0 0.3em 0.3em 0;
        font-style: italic;
        color: var(--muted-color);
    }
    .text-block a {
        color: var(--accent-color);
        text-decoration: underline;
        text-decoration-color: oklch(60% 0.12 170 / 0.4);
        text-underline-offset: 0.2em;
        transition: color 0.2s, text-decoration-color 0.2s;
    }
    .text-block a:hover {
        color: var(--burst-color);
        text-decoration-color: var(--burst-color);
    }

    /* ========== TEASER LIST ========== */
    #teaser-subject {
        font-size: var(--ft-size-700);
        font-variation-settings: 'CASL' 1, 'MONO' 0.5;
        color: var(--burst-color);
        margin: 1.5em 0 0.75em;
        padding-bottom: 0.3em;
        border-bottom: 2px solid var(--seam-color);
    }
    .teaser-list {
        display: flex;
        flex-direction: column;
        gap: 2em;
    }

    /* ========== TEASER CARD ========== */
    .teaser-card {
        position: relative;
        display: grid;
        grid-auto-flow: row;
        width: 100%;
        border-radius: 0.5em;
        overflow: hidden;
        background: var(--tint-color);
        border: 1px solid var(--seam-color);
        transition: border-color 0.3s, box-shadow 0.3s;
    }
    .teaser-card:hover {
        border-color: var(--muted-color);
        box-shadow: 0 4px 20px oklch(0% 0 0 / 0.3);
    }

    .teaser-pre {
        padding: 0.6em 1em;
        text-align: center;
        text-transform: uppercase;
        font-size: var(--ft-size-300);
        font-family: var(--ff-title);
        font-weight: var(--fw-title);
        font-variation-settings: 'CASL' 0.8, 'MONO' 0.5;
        color: var(--invert-color);
        letter-spacing: 0.1em;
        position: relative;
        z-index: 1;
    }
    .teaser-pre h3 {
        font-size: inherit;
        font-weight: inherit;
        margin: 0;
    }

    /* Category color bars */
    .teaser-pre[data-category="quo-vadis"] { background: var(--category-quo-vadis); }
    .teaser-pre[data-category="tech-talk"] { background: var(--category-tech-talk); }
    .teaser-pre[data-category="con-lang"] { background: var(--category-con-lang); }
    .teaser-pre[data-category="world-building"] { background: var(--category-world-building); }
    .teaser-pre[data-category="indie-game-dev"] { background: var(--category-indie-game-dev); }

    .teaser-body {
        position: relative;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "title"
            "description"
            "low"
            "footer";
        gap: 0.5em;
        padding: 1em;
    }
    @media (min-width: 40em) {
        .teaser-body {
            grid-template-columns: 6em 1fr;
            grid-template-areas:
                "image title"
                "image description"
                "image low"
                "image footer";
        }
    }

    .teaser-shape {
        grid-area: image;
        width: 5em;
        height: 5em;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid var(--seam-color);
        justify-self: center;
    }
    .teaser-shape-content {
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    .teaser-shape-content::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            135deg,
            oklch(40% 0.15 150 / 0.6),
            oklch(30% 0.10 250 / 0.6)
        );
        z-index: 0;
    }
    .teaser-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: relative;
        z-index: 1;
        opacity: 0;
    }
    /* Placeholder avatar when no image loads */
    .teaser-shape-content::before {
        content: "\1F464";
        font-size: 2em;
        position: absolute;
        z-index: 1;
    }

    .teaser-title {
        grid-area: title;
        font-size: var(--ft-size-600);
        font-variation-settings: 'CASL' 0.8, 'MONO' 0.3;
        line-height: 1.3;
        letter-spacing: 0.5px;
    }
    .teaser-title a {
        color: var(--contrast-color);
        transition: color 0.2s;
    }
    .teaser-title a:hover {
        color: var(--burst-color);
    }
    .teaser-title::after {
        content: "";
        display: block;
        width: 2em;
        height: 1px;
        margin: 0.5em 0;
        background: var(--seam-color);
        opacity: 0.5;
    }

    .teaser-info {
        grid-area: description;
        font-size: var(--ft-size-300);
        color: var(--muted-color);
        line-height: 1.6;
    }

    .teaser-low-info {
        grid-area: low;
        font-size: var(--ft-size-200);
        color: var(--muted-color);
        font-variation-settings: 'MONO' 1;
    }

    .teaser-footer {
        grid-area: footer;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4em;
        text-transform: uppercase;
    }
    .teaser-footer a {
        display: inline-block;
        padding: 0.15em 0.5em;
        font-size: var(--ft-size-200);
        background: var(--neutral-color);
        color: var(--contrast-color);
        border-radius: 0.2em;
        transition: background 0.2s, color 0.2s;
    }
    .teaser-footer a:hover {
        background: var(--accent-color);
        color: var(--abyss-color);
    }

    /* ========== PAGINATION ========== */
    .pagination {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1em;
        margin: 2em 0;
        padding: 1em 0;
        border-top: 1px solid var(--seam-color);
        font-size: var(--ft-size-300);
        color: var(--muted-color);
    }
    .pagination-pages {
        display: flex;
        gap: 0.5em;
    }
    .pagination-pages span,
    .pagination-pages a {
        padding: 0.3em 0.7em;
        border-radius: 0.25em;
        border: 1px solid var(--seam-color);
    }
    .pagination-pages span.disabled {
        opacity: 0.4;
        cursor: default;
    }
    .pagination-pages a {
        color: var(--contrast-color);
        transition: background 0.2s;
    }
    .pagination-pages a:hover {
        background: var(--tint-color);
    }
    .pagination-options select {
        background: var(--tint-color);
        border: 1px solid var(--seam-color);
        color: var(--contrast-color);
        font-family: var(--ff-body);
        font-size: var(--ft-size-200);
        padding: 0.3em 0.5em;
        border-radius: 0.25em;
    }

    /* ========== SIDE INFO (Right Sidebar) ========== */
    .side-info h4 {
        width: 100%;
        margin: 1rem 0 0.5rem;
        font-size: var(--ft-size-500);
        font-variation-settings: 'CASL' 0.8, 'MONO' 0.5;
        color: var(--burst-color);
        text-transform: uppercase;
    }

    /* ========== AUTHOR CARD ========== */
    .author-card {
        position: relative;
        display: grid;
        grid-auto-flow: row;
        width: 100%;
        margin-bottom: 1.5em;
    }
    .author-body {
        display: grid;
        grid-template-areas:
            "image"
            "title"
            "links"
            "note"
            "info"
            "low";
        gap: 0.5em;
        padding: 1em;
        background: var(--tint-color);
        border: 1px solid var(--seam-color);
        border-radius: 0.5em;
    }
    .author-title {
        grid-area: title;
        font-size: var(--ft-size-500);
        font-variation-settings: 'CASL' 1, 'MONO' 0.5;
        text-align: center;
    }
    .author-title a {
        color: var(--accent-color);
        transition: color 0.2s;
    }
    .author-title a:hover { color: var(--burst-color); }

    .author-shape {
        grid-area: image;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75em;
    }
    .author-shape-content {
        width: 5em;
        height: 5em;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid var(--seam-color);
        background-size: cover;
        background-position: center;
        position: relative;
    }
    .author-shape-content::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            135deg,
            oklch(40% 0.15 150 / 0.5),
            oklch(30% 0.10 250 / 0.5)
        );
    }
    .author-shape-content::before {
        content: "\1F464";
        font-size: 2em;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
    }
    .author-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: relative;
        z-index: 2;
        opacity: 0;
    }

    .author-link-list {
        grid-area: links;
        display: flex;
        justify-content: center;
        gap: 0.5em;
    }
    .link-promo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.2em;
        height: 2.2em;
        border-radius: 50%;
        background: var(--neutral-color);
        color: var(--contrast-color);
        font-size: var(--ft-size-400);
        transition: background 0.2s, color 0.2s;
    }
    .link-promo:hover {
        background: var(--accent-color);
        color: var(--abyss-color);
    }

    .author-note {
        grid-area: note;
    }
    .author-info {
        grid-area: info;
        text-align: center;
    }
    .author-promote {
        display: inline-block;
        padding: 0.3em 0.7em;
        margin: 0.2em;
        font-size: var(--ft-size-200);
        background: var(--neutral-color);
        color: var(--burst-color);
        border-radius: 0.25em;
        transition: background 0.2s;
    }
    .author-promote:hover {
        background: var(--burst-color);
        color: var(--abyss-color);
    }

    .author-low-info {
        grid-area: low;
        text-align: center;
        font-size: var(--ft-size-200);
        color: var(--muted-color);
        font-variation-settings: 'MONO' 1;
        text-transform: uppercase;
        letter-spacing: 0.15em;
    }

    /* ========== FOOTER ========== */
    .footer {
        margin-top: 3em;
        background: oklch(12% 0.05 265);
        border-top: 3px solid var(--burst-color);
        box-shadow: 0 -2px 20px oklch(0% 0 0 / 30%);
        position: relative;
    }
    .footer::before {
        content: "";
        display: block;
        height: 3px;
        background-image: var(--copper-gradient);
        background-size: 100% 300%;
        animation: copper-shimmer linear 12s alternate infinite;
    }

    .footer--copy__date {
        text-align: center;
        padding: 1.5em 1em 1em;
        font-size: var(--ft-size-300);
        color: oklch(65% 0.02 250);
        font-variation-settings: 'MONO' 1;
    }

    .footer--container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5em;
        padding: 1em 2em 2em;
        max-width: 80em;
        margin: 0 auto;
    }
    @media (min-width: 40em) {
        .footer--container {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    .footer--column {
        display: flex;
        flex-direction: column;
        gap: 0.3em;
    }
    .footer--subject {
        font-size: var(--ft-size-400);
        font-variation-settings: 'CASL' 0.8, 'MONO' 0.5;
        color: var(--burst-color);
        text-transform: uppercase;
        margin-bottom: 0.5em;
    }
    .footer--link {
        font-size: var(--ft-size-300);
        color: oklch(75% 0.03 250);
        padding: 0.15em 0;
        transition: color 0.2s;
        display: flex;
        align-items: center;
        gap: 0.4em;
    }
    .footer--link:hover {
        color: var(--contrast-color);
    }
    .footer--link .icon {
        width: 1.1em;
        display: inline-block;
        text-align: center;
    }

    .footer--technics {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75em;
        padding: 1.5em 1em;
        border-top: 1px solid var(--seam-color);
    }
    .footer--technics-link {
        display: inline-flex;
        align-items: center;
        gap: 0.3em;
        padding: 0.3em 0.6em;
        font-size: var(--ft-size-200);
        color: var(--muted-color);
        border: 1px solid var(--seam-color);
        border-radius: 0.25em;
        transition: color 0.2s, border-color 0.2s;
    }
    .footer--technics-link:hover {
        color: var(--contrast-color);
        border-color: var(--muted-color);
    }
    .footer--technics-info {
        display: none;
    }
    @media (min-width: 60em) {
        .footer--technics-link:hover .footer--technics-info {
            display: inline;
        }
    }

    /* ========== PIE MENU ========== */
    .pie-menu {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 99999;
    }
    .pie-trigger-label {
        cursor: pointer;
    }
    .pie-trigger {
        width: 3.5em;
        height: 3.5em;
        border-radius: 0 0 0 100%;
        background: radial-gradient(
            at right top,
            var(--tint-color) 0%,
            var(--tint-color) 45%,
            var(--base-color) 66%
        );
        color: var(--contrast-color);
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        padding: 0.3em 0.4em 0 0;
        font-size: var(--ft-size-600);
        box-shadow: 0 0 5px 5px oklch(0% 0 0 / 0.3);
        transition: transform 0.3s;
        position: fixed;
        top: 0;
        right: 0;
        z-index: 50000;
        cursor: pointer;
    }
    .pie-trigger:hover {
        transform: scale(1.1);
    }
    .pie-closed, .pie-open {
        position: absolute;
        transition: opacity 0.3s;
    }
    .pie-open { opacity: 0; }
    .pie-closed { opacity: 1; }

    #pie-opener:checked ~ .pie-menu .pie-open { opacity: 1; }
    #pie-opener:checked ~ .pie-menu .pie-closed { opacity: 0; }
    /* Trigger stays in place — no rotation */

    .pie--parts a {
        display: inline-block;
        position: fixed;
        right: 0;
        top: 0;
        width: 6em;
        height: 6em;
        border-radius: 0 0 0 100%;
        background-position: top right;
        box-shadow: 0 0 5px 5px oklch(0% 0 0 / 0.3);
        color: oklch(96% 0.04 90);
        font-size: var(--ft-size-500);
        transform-origin: 100% 0;
        transform: rotate(-90deg);
        transition: width 1s, height 1s, transform 1s;
        transition-timing-function: ease-in;
        pointer-events: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-bottom: 1.5em;
        padding-left: 1.5em;
    }
    .pie--parts a:nth-child(n+2) {
        box-shadow: 0 -5px 5px 0 oklch(0% 0 0 / 0.3);
    }

    #pie-opener:checked ~ .pie-menu .pie--parts a:first-child {
        transition: transform 1s;
        transition-delay: 0.1s;
        transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
        transform: rotate(0deg);
    }
    #pie-opener:checked ~ .pie-menu .pie--parts a:nth-child(2) {
        transition: transform 1s;
        transition-delay: 0.3s;
        transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
        transform: rotate(-28deg);
    }
    #pie-opener:checked ~ .pie-menu .pie--parts a:nth-child(3) {
        transition: transform 1s;
        transition-delay: 0.5s;
        transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
        transform: rotate(-60deg);
    }

    /* Pie text trigger (inline) */
    .pie-text-trigger {
        color: var(--accent-color);
        cursor: pointer;
        text-decoration: underline;
        text-decoration-style: dotted;
        text-underline-offset: 0.2em;
    }
    .pie-text-trigger:hover {
        color: var(--burst-color);
    }
}

/* --- Utilities --- */
@layer utilities {
    .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }
}

/* ============================================================
   Visual Polish — Details from old blog SCSS
   Added on top of preview CSS base
   ============================================================ */

/* --- Header: shadows + sticky z-index fix --- */
.header {
    box-shadow: 0 3px 8px 0 oklch(0% 0 0 / 40%);
}

/* Sticky headlines should go BEHIND the header */
.sticky-headline {
    z-index: 1;
}

/* --- Sidebar: box-shadow floating effect --- */
@media (min-width: 60em) {
    .page-content {
        border-left: 1px solid var(--seam-color);
        box-shadow: -8px 0 0 0 var(--tint-color);
    }
}

/* --- Footer: top shadow --- */
.footer {
    box-shadow: 0 -3px 8px 0 oklch(0% 0 0 / 30%);
}

/* --- Nice Box: centered nav items --- */
.main-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.main-menu .nice-box {
    display: flex;
    gap: 0;
}
.main-menu .nice-box a,
.main-menu .nice-box button {
    padding: 0.5em 1.2em;
}

button[data-open-settings] {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* --- Options: centered, not side-aligned --- */
.options {
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.config-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    background: var(--tint-color);
    color: var(--contrast-color);
    font-size: 1.2em;
    transition: background 0.2s;
}
.config-link:hover {
    background: var(--accent-color);
}

/* --- Tag Cloud: more padding, visible count badges --- */
.tag-cloud a {
    padding: 0.3em 0.6em;
    margin: 0.2em;
}
.tag-cloud a span {
    min-width: 1.4em;
    height: 1.4em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    border-radius: 50%;
    background: oklch(40% 0.02 250);
    color: oklch(90% 0.02 90);
    margin-left: 0.3em;
}

/* --- Pie Menu: Ruby/Sapphire/Emerald slices, BG-blend trigger --- */
:root {
    --pie-ruby-from: oklch(55% 0.24 20);
    --pie-ruby-to: oklch(25% 0.12 20);
    --pie-sapphire-from: oklch(45% 0.20 265);
    --pie-sapphire-to: oklch(20% 0.10 265);
    --pie-emerald-from: oklch(50% 0.19 150);
    --pie-emerald-to: oklch(22% 0.10 150);
}

/* Pie slice colors: Ruby / Sapphire / Emerald */
.pie--parts a:first-child {
    background: radial-gradient(at right top, var(--pie-ruby-from) 0%, var(--pie-ruby-from) 33%, var(--pie-ruby-to) 100%);
    z-index: 10000;
}
.pie--parts a:nth-child(2) {
    background: radial-gradient(at right top, var(--pie-sapphire-from) 0%, var(--pie-sapphire-from) 33%, var(--pie-sapphire-to) 100%);
    z-index: 20000;
}
.pie--parts a:nth-child(3) {
    background: radial-gradient(at right top, var(--pie-emerald-from) 0%, var(--pie-emerald-from) 33%, var(--pie-emerald-to) 100%);
    z-index: 30000;
}

/* --- Author Cards: constrain to sidebar --- */
.author-card {
    max-width: 100%;
    overflow: hidden;
}
.author-shape {
    max-width: 100%;
}
.author-shape-content {
    max-width: 100%;
}

/* --- Submenu: handled by @layer above --- */

/* --- Link elements: ♦ diamond + dotted underline --- */
.link-element {
    border-bottom: 1px dotted var(--seam-color);
}
.link-element::before {
    content: "\2666";
    margin-right: 0.5em;
    color: var(--burst-color);
    flex-shrink: 0;
}

/* --- Sidebar copper frame (outside @layer for highest priority) --- */
.menu-element {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.5rem 0 0;
    border-radius: 2px;
}
.copper-border {
    isolation: isolate;
    position: relative;
    border-radius: 2px;
}
.copper-border > * {
    position: relative;
    z-index: 2;
}
/* Layer 0: Copper gradient frame (2px larger than element) */
.copper-border::before {
    position: absolute;
    display: block;
    content: "";
    z-index: 0;
    inset: -2px;
    background-image: var(--copper-gradient);
    background-size: 100% 300%;
    background-position: top;
    animation: copper-shimmer linear 12s alternate infinite;
    box-shadow: 5px 5px 15px 5px oklch(0% 0 0 / 40%);
    border-radius: 2px;
}
/* Layer 1: Opaque cover (same size as element, hides gradient center) */
.copper-border::after {
    position: absolute;
    display: block;
    content: "";
    z-index: 1;
    inset: 0;
    background-color: var(--base-color);
    border-radius: 1px;
}

/* ============================================================
   Area Intro Sections — Blog vs Games differentiation
   ============================================================ */

.area-intro {
    padding: 3rem 1.5rem 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color, oklch(30% 0.02 260));
    position: relative;
    overflow: hidden;
}

.area-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.06;
    pointer-events: none;
}

.area-intro-content {
    position: relative;
    z-index: 1;
    max-width: 42rem;
}

.area-intro h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.area-intro-tagline {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.area-intro-sub {
    font-size: 0.875rem;
    opacity: 0.6;
    font-style: italic;
}

/* Blog Area — warm, editorial feel */
.area-intro--blog {
    border-bottom-color: oklch(50% 0.08 55);
}

.area-intro--blog::before {
    background: linear-gradient(135deg, oklch(50% 0.12 55) 0%, transparent 60%);
}

.area-intro--blog h1 {
    color: oklch(85% 0.06 55);
}

.area-intro--blog .area-intro-tagline {
    color: oklch(75% 0.04 55);
}

/* Games Area — cool, technical feel */
.area-intro--games {
    border-bottom-color: oklch(50% 0.12 165);
}

.area-intro--games::before {
    background: linear-gradient(135deg, oklch(45% 0.15 165) 0%, oklch(35% 0.1 220) 60%, transparent 100%);
}

.area-intro--games h1 {
    color: oklch(80% 0.1 165);
}

.area-intro--games .area-intro-tagline {
    color: oklch(72% 0.06 165);
}

/* Teaser card area variants */
.teaser-card--games .teaser-pre {
    border-left-color: oklch(50% 0.12 165);
}

/* Filter info bar */
.filter-info {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--muted-text, oklch(65% 0.01 250));
    margin-bottom: 1rem;
}

.filter-clear {
    margin-left: 0.5rem;
    opacity: 0.6;
    font-size: 0.8rem;
}

.filter-clear:hover {
    opacity: 1;
}

/* Empty area state */
.empty-area {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--muted-text, oklch(65% 0.01 250));
}

.empty-area p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-area-hint {
    font-size: 0.875rem;
    opacity: 0.6;
    font-style: italic;
}

/* ============================================================
   Landing Page — www.dulldaydudes.*
   ============================================================ */

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 4rem 1.5rem 3rem;
    min-height: 60vh;
}

.landing-hero {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 36rem;
    position: relative;
    z-index: 1;
}



.landing-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, oklch(80% 0.08 55), oklch(75% 0.1 165));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-color, oklch(85% 0.01 80));
    margin-bottom: 0.5rem;
}

.landing-quote {
    font-size: 0.875rem;
    opacity: 0.45;
}

/* Hex halftone — base-color hexagons let the radial gradient shine through gaps */
.landing-hex {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.landing-hex .hex {
    fill: var(--base-color, oklch(25% 0.02 250));
}

@media (prefers-reduced-motion: reduce) {
    .landing-hex { display: none; }
}

.landing-areas {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 44rem;
}

.landing-card {
    display: block;
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-color, oklch(30% 0.02 260));
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.landing-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    transition: opacity 0.2s;
}

.landing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px oklch(0% 0 0 / 0.3);
}

.landing-card:hover::before {
    opacity: 0.08;
}

.landing-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.landing-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.landing-card p {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.5;
}

/* Blog card — warm */
.landing-card--blog {
    border-color: oklch(40% 0.06 55);
}

.landing-card--blog::before {
    background: linear-gradient(135deg, oklch(50% 0.12 55), transparent);
}

.landing-card--blog:hover {
    border-color: oklch(55% 0.1 55);
}

.landing-card--blog h2 {
    color: oklch(80% 0.06 55);
}

/* Games card — cool */
.landing-card--games {
    border-color: oklch(40% 0.08 165);
}

.landing-card--games::before {
    background: linear-gradient(135deg, oklch(45% 0.15 165), oklch(35% 0.1 220));
}

.landing-card--games:hover {
    border-color: oklch(55% 0.12 165);
}

.landing-card--games h2 {
    color: oklch(75% 0.1 165);
}

/* ============================================================
   Games Startpage + Detail Page
   ============================================================ */

.games-startpage {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.games-hero-header {
    position: relative;
    text-align: center;
    padding: 6rem 2rem 5rem;
    min-height: 33vh;
    overflow: hidden;
    /* Break out of parent max-width for full-bleed background */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    display: flex;
    align-items: center;
    justify-content: center;
}

.games-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}

.games-hero-header__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 48rem;
}

.games-hero-logo {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 20px oklch(30% 0.15 260 / 60%));
}

.games-hero-header__text {
    text-align: left;
}

.games-hero-header h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--burst-color, oklch(78% 0.18 60));
    text-shadow: 0 0 30px oklch(78% 0.18 60 / 30%), 0 2px 4px oklch(0% 0 0 / 40%);
}

.games-hero-header p {
    font-size: 1.1rem;
    color: oklch(75% 0.04 200);
    text-shadow: 0 1px 3px oklch(0% 0 0 / 50%);
}

/* Game Section — one per game */
.game-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--seam-color, oklch(25% 0.04 150));
}

.game-section:last-child {
    border-bottom: none;
}

/* Generic block */
.game-block {
    margin-bottom: 2rem;
}

.game-block:last-child {
    margin-bottom: 0;
}

.game-block-content {
    max-width: 48rem;
    margin: 0 auto;
}

/* Hero block — full-width breakout */
.game-block--hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: flex-end;
    padding: 3rem 2rem;
    overflow: hidden;
    background-color: var(--neutral-color, oklch(25% 0.05 50));
    background-size: cover;
    background-position: center;
    /* Break out of parent max-width */
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* Blur edges: strong blur at top and bottom of hero image */
.game-block--hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    pointer-events: none;
    mask-image: linear-gradient(
        to bottom,
        black 0%, transparent 5vh,
        transparent calc(100% - 5vh),
        black 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%, transparent 5vh,
        transparent calc(100% - 5vh),
        black 100%
    );
}

/* Vignette: gradient to background color so edges dissolve completely */
.game-block--hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        /* Bottom: dissolve into page background */
        linear-gradient(to top,
            var(--base-color, oklch(25% 0.02 250)) 0%,
            oklch(from var(--base-color, oklch(25% 0.02 250)) l c h / 80%) 8%,
            oklch(from var(--base-color, oklch(25% 0.02 250)) l c h / 40%) 25%,
            transparent 55%
        ),
        /* Top: dissolve into page background */
        linear-gradient(to bottom,
            var(--base-color, oklch(25% 0.02 250)) 0%,
            oklch(from var(--base-color, oklch(25% 0.02 250)) l c h / 70%) 8%,
            oklch(from var(--base-color, oklch(25% 0.02 250)) l c h / 30%) 20%,
            transparent 40%
        ),
        /* Left edge */
        linear-gradient(to right,
            oklch(from var(--base-color, oklch(25% 0.02 250)) l c h / 60%) 0%,
            transparent 15%
        ),
        /* Right edge */
        linear-gradient(to left,
            oklch(from var(--base-color, oklch(25% 0.02 250)) l c h / 60%) 0%,
            transparent 15%
        );
    pointer-events: none;
    z-index: 1;
}

.game-block--hero .game-block-content {
    position: relative;
    z-index: 2;
    max-width: 60rem;
}

.game-hero-title {
    font-size: clamp(2rem, 1.5rem + 3vw, 4rem);
    font-weight: 700;
    color: var(--color-cornsilk, oklch(96% 0.04 90));
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px oklch(0% 0 0 / 50%);
}

.game-hero-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-hero-link .game-hero-title {
    transition: color 0.15s ease-out;
}

.game-hero-link:hover .game-hero-title,
.game-hero-link:focus-visible .game-hero-title {
    color: var(--burst-color, oklch(78% 0.18 60));
}

.game-hero-link:hover .game-hero-subtitle {
    color: var(--color-cornsilk, oklch(96% 0.04 90));
}

.game-hero-subtitle {
    font-size: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    color: oklch(96% 0.04 90 / 80%);
    text-shadow: 0 1px 4px oklch(0% 0 0 / 40%);
}

/* Text + Image block */
.game-block--text-image {
    padding: 2rem 0;
}

.game-block--text-image .game-block-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.game-block--image-left .game-block-content {
    direction: rtl;
}

.game-block--image-left .game-block-content > * {
    direction: ltr;
}

.game-text-image-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.game-text-image-body {
    line-height: 1.75;
    color: var(--muted-color, oklch(55% 0.02 250));
}

.game-text-image-media img {
    border-radius: 0.5rem;
    width: 100%;
    height: auto;
    box-shadow: 0 4px 16px oklch(0% 0 0 / 20%);
}

/* Description block */
.game-block--description {
    padding: 1.5rem 0;
}

.game-block--description h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.game-description-body {
    line-height: 1.75;
    color: var(--muted-color, oklch(55% 0.02 250));
}

.game-description-body p,
.game-text-image-body p {
    margin-block-end: 1.5rem;
}

.game-description-body p:last-child,
.game-text-image-body p:last-child {
    margin-block-end: 0;
}

/* CTA block */
.game-block--cta {
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 1.5rem;
    background-color: oklch(from var(--neutral-color, oklch(25% 0.05 50)) l c h / 60%);
    border-radius: 1rem;
}

.game-block--cta h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-cta-body {
    color: var(--muted-color, oklch(55% 0.02 250));
    margin-bottom: 1rem;
}

.game-cta-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--accent-color, oklch(60% 0.12 170));
    color: var(--abyss-color, oklch(15% 0.02 250));
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease-out, transform 0.15s ease-out;
}

.game-cta-btn:hover {
    background-color: var(--burst-color, oklch(78% 0.18 60));
    transform: translateY(-1px);
}

.game-cta-btn--secondary {
    background-color: transparent;
    color: var(--accent-color, oklch(60% 0.12 170));
    border: 1px solid var(--accent-color, oklch(60% 0.12 170));
    margin-left: 0.75rem;
}

.game-cta-btn--secondary:hover {
    background-color: oklch(from var(--accent-color, oklch(60% 0.12 170)) l c h / 15%);
    color: var(--burst-color, oklch(78% 0.18 60));
    border-color: var(--burst-color, oklch(78% 0.18 60));
}

/* Game Detail Page */
.game-detail {
    max-width: 60rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.game-detail .game-block--hero {
    min-height: 55vh;
}

.game-detail__empty {
    text-align: center;
    padding: 6rem 1rem;
}

.game-detail__empty h1 {
    font-size: clamp(1.5rem, 1rem + 2.5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.game-detail__nav {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--seam-color, oklch(25% 0.04 150));
}

.game-detail__nav a {
    color: var(--accent-color, oklch(60% 0.12 170));
    text-decoration: none;
    transition: color 0.15s ease-out;
}

.game-detail__nav a:hover {
    color: var(--burst-color, oklch(78% 0.18 60));
}

/* Empty area */
.empty-area {
    text-align: center;
    padding: 6rem 1rem;
    color: var(--muted-color, oklch(55% 0.02 250));
}

.empty-area-hint {
    color: var(--muted-color, oklch(55% 0.02 250));
    margin-top: 0.5rem;
}

/* Responsive: stack text+image on mobile */
@media (max-width: 48em) {
    .game-block--hero {
        min-height: 16rem;
        padding: 2rem 1rem;
    }

    .game-detail .game-block--hero {
        min-height: 20rem;
    }

    .game-block--text-image .game-block-content {
        grid-template-columns: 1fr;
    }

    .game-block--image-left .game-block-content {
        direction: ltr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-cta-btn:hover {
        transform: none;
    }
}

/* ============================================================
   Devlog Page
   ============================================================ */

.devlog-page {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.devlog-header {
    padding: 2rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid oklch(35% 0.06 165 / 0.3);
}

.devlog-back {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.devlog-back:hover {
    opacity: 1;
}

.devlog-header h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: oklch(80% 0.08 165);
    margin-top: 0.5rem;
}

.devlog-description {
    font-size: 0.95rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

/* ===========================================
 * Settings Modal
 * =========================================== */

.settings-modal__overlay {
    position: fixed;
    inset: 0;
    background: oklch(0% 0 0 / 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.settings-modal {
    background: var(--card, oklch(22% 0.015 260));
    border: 1px solid var(--border, oklch(40% 0.01 250));
    border-radius: 0.75rem;
    width: min(90vw, 520px);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px oklch(0% 0 0 / 0.4);
}

.settings-modal__header {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1rem 0;
}

.settings-modal__close {
    background: transparent;
    border: none;
    color: var(--muted, oklch(55% 0.01 250));
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.15s;
}

.settings-modal__close:hover {
    color: var(--foreground, oklch(90% 0 0));
}

.settings-modal__body {
    padding: 0 1.5rem 1.5rem;
}

/* Settings Panel (shared between modal and standalone) */

.settings-panel__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.settings-panel__desc {
    color: var(--muted, oklch(55% 0.01 250));
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.settings-group {
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.settings-group__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.settings-group__body {
    border: 1px solid var(--border, oklch(40% 0.01 250));
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.settings-toggle,
.settings-cycle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.375rem 0;
    font-size: 0.875rem;
}

.settings-switch {
    position: relative;
    display: inline-flex;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 9999px;
    border: 2px solid transparent;
    background: var(--muted, oklch(40% 0.01 250));
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.settings-switch--on {
    background: var(--accent, oklch(75% 0.15 45));
}

.settings-switch__thumb {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 9999px;
    background: var(--background, oklch(15% 0 0));
    box-shadow: 0 1px 3px oklch(0% 0 0 / 0.3);
    transform: translateX(0.125rem);
    transition: transform 0.2s;
}

.settings-switch--on .settings-switch__thumb {
    transform: translateX(1.375rem);
}

.settings-cycle__controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.settings-cycle__controls button {
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--muted, oklch(55% 0.01 250));
    border-radius: 0.25rem;
    transition: color 0.15s, background 0.15s;
}

.settings-cycle__controls button:hover {
    color: var(--foreground, oklch(90% 0 0));
    background: oklch(30% 0.01 260);
}

.settings-cycle__value {
    min-width: 7rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
}

.settings-panel__reset {
    border-top: 1px solid var(--border, oklch(40% 0.01 250));
    padding-top: 1rem;
}

.settings-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border, oklch(40% 0.01 250));
    border-radius: 0.5rem;
    background: transparent;
    color: var(--muted, oklch(55% 0.01 250));
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.15s, border-color 0.15s;
}

.settings-reset-btn:hover {
    color: var(--foreground, oklch(90% 0 0));
    border-color: var(--foreground, oklch(90% 0 0));
}

/* ============================================================
   Asset Picker
   ============================================================ */

.asset-modal-overlay {
    position: fixed;
    inset: 0;
    background: oklch(0% 0 0 / 70%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.asset-modal {
    background: var(--base-color, oklch(20% 0.01 250));
    border: 1px solid var(--seam-color, oklch(25% 0.04 150));
    border-radius: 1rem;
    max-width: 64rem;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.asset-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--seam-color, oklch(25% 0.04 150));
}

.asset-modal__header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.asset-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--muted-color, oklch(55% 0.02 250));
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.asset-modal__close:hover {
    color: var(--contrast-color, oklch(90% 0 0));
}

.asset-modal__error {
    padding: 0.75rem 1.5rem;
    background: oklch(40% 0.15 25);
    color: oklch(90% 0.05 25);
    font-size: 0.875rem;
}

.asset-modal__body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Upload Dropzone */
.asset-dropzone {
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--muted-color, oklch(55% 0.02 250));
    font-size: 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid var(--seam-color, oklch(25% 0.04 150));
    transition: background 0.15s, color 0.15s;
}

.asset-dropzone:hover,
.asset-dropzone--active {
    background: oklch(from var(--accent-color, oklch(60% 0.12 170)) l c h / 10%);
    color: var(--accent-color, oklch(60% 0.12 170));
}

.asset-dropzone--uploading {
    opacity: 0.6;
    pointer-events: none;
}

/* Thumbnail Grid */
.asset-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 0.75rem;
    align-content: start;
}

.asset-grid__loading,
.asset-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted-color, oklch(55% 0.02 250));
    padding: 3rem 1rem;
}

.asset-card {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    background: var(--neutral-color, oklch(25% 0.05 50));
    transition: border-color 0.15s;
    padding: 0;
}

.asset-card:hover {
    border-color: var(--muted-color, oklch(55% 0.02 250));
}

.asset-card--selected {
    border-color: var(--accent-color, oklch(60% 0.12 170));
}

.asset-card__img {
    flex: 1;
    width: 100%;
    object-fit: cover;
    min-height: 0;
}

.asset-card__name {
    display: block;
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
    color: var(--muted-color, oklch(55% 0.02 250));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Metadata Sidebar */
.asset-meta {
    width: 18rem;
    border-left: 1px solid var(--seam-color, oklch(25% 0.04 150));
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.asset-meta__preview {
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.asset-meta__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asset-meta__info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted-color, oklch(55% 0.02 250));
}

.asset-meta__color {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.7rem;
}

.asset-meta__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.asset-meta__field span {
    font-size: 0.75rem;
    color: var(--muted-color, oklch(55% 0.02 250));
}

.asset-meta__field input {
    background: var(--neutral-color, oklch(25% 0.05 50));
    border: 1px solid var(--seam-color, oklch(25% 0.04 150));
    border-radius: 0.375rem;
    padding: 0.4rem 0.6rem;
    color: var(--contrast-color, oklch(90% 0 0));
    font-size: 0.85rem;
}

.asset-meta__check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.asset-meta__check input[type="checkbox"] {
    appearance: auto;
    position: static;
    opacity: 1;
    pointer-events: auto;
    width: 1rem;
    height: 1rem;
}

.asset-meta__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--seam-color, oklch(25% 0.04 150));
}

/* Asset Buttons */
.asset-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--seam-color, oklch(25% 0.04 150));
    background: var(--neutral-color, oklch(25% 0.05 50));
    color: var(--contrast-color, oklch(90% 0 0));
    transition: background 0.15s;
}

.asset-btn:hover {
    background: oklch(from var(--accent-color, oklch(60% 0.12 170)) l c h / 15%);
}

.asset-btn--primary {
    background: var(--accent-color, oklch(60% 0.12 170));
    color: var(--abyss-color, oklch(15% 0.02 250));
    border-color: var(--accent-color, oklch(60% 0.12 170));
    flex: 1;
}

.asset-btn--primary:hover {
    background: var(--burst-color, oklch(78% 0.18 60));
}

.asset-btn--danger {
    color: oklch(70% 0.15 25);
    border-color: oklch(40% 0.1 25);
}

.asset-btn--danger:hover {
    background: oklch(30% 0.08 25);
}

/* Asset Picker (Button in Forms) */
.asset-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.asset-picker__label {
    font-size: 0.85rem;
    font-weight: 600;
}

.asset-picker__choose {
    padding: 1.5rem;
    border: 2px dashed var(--seam-color, oklch(25% 0.04 150));
    border-radius: 0.5rem;
    background: transparent;
    color: var(--muted-color, oklch(55% 0.02 250));
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.15s, color 0.15s;
}

.asset-picker__choose:hover {
    border-color: var(--accent-color, oklch(60% 0.12 170));
    color: var(--accent-color, oklch(60% 0.12 170));
}

.asset-picker__preview {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.asset-picker__thumb {
    width: 8rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid var(--seam-color, oklch(25% 0.04 150));
}

.asset-picker__actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Figure Rendering */
.asset-figure {
    margin: 0;
}

.asset-figure img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.asset-figure figcaption {
    font-size: 0.8rem;
    color: var(--muted-color, oklch(55% 0.02 250));
    padding: 0.5rem 0;
    text-align: center;
}

/* ============================================================
   Milkdown WYSIWYG Editor (Block content)
   ============================================================ */

.milkdown-wrapper {
    border: 1px solid var(--seam-color, oklch(25% 0.04 150));
    border-radius: 0.5rem;
    overflow: hidden;
    min-height: 8rem;
}

.milkdown-wrapper .milkdown {
    background: var(--neutral-color, oklch(25% 0.05 50));
    color: var(--contrast-color, oklch(90% 0 0));
}

.milkdown-wrapper .editor {
    padding: 0.75rem 1rem;
    min-height: 6rem;
    outline: none;
    font-size: 0.9rem;
    line-height: 1.7;
}

.milkdown-wrapper .editor p {
    margin-bottom: 0.5rem;
}

.milkdown-wrapper .editor h1,
.milkdown-wrapper .editor h2,
.milkdown-wrapper .editor h3 {
    font-weight: 600;
    margin: 0.75rem 0 0.5rem;
}

.milkdown-wrapper .editor strong {
    font-weight: 700;
    color: var(--contrast-color, oklch(90% 0 0));
}

.milkdown-wrapper .editor em {
    font-style: italic;
}

.milkdown-wrapper .editor code {
    background: oklch(20% 0.01 250);
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    font-size: 0.85em;
}

.milkdown-wrapper .editor ul,
.milkdown-wrapper .editor ol {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    list-style: disc;
}

.milkdown-wrapper .editor ol {
    list-style: decimal;
}

.milkdown-wrapper .editor a {
    color: var(--accent-color, oklch(60% 0.12 170));
    text-decoration: underline;
}

.milkdown-wrapper .editor blockquote {
    border-left: 3px solid var(--accent-color, oklch(60% 0.12 170));
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: var(--muted-color, oklch(55% 0.02 250));
}

.milkdown-wrapper .editor hr {
    border: none;
    border-top: 1px solid var(--seam-color, oklch(25% 0.04 150));
    margin: 1rem 0;
}

.milkdown-wrapper .editor:focus-within {
    box-shadow: inset 0 0 0 1px var(--accent-color, oklch(60% 0.12 170));
}

/* Markdown Editor Toolbar */
.md-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0.35rem 0.5rem;
    background: var(--tint-color, oklch(30% 0.02 250));
    border: 1px solid var(--seam-color, oklch(40% 0.02 250));
    border-bottom: none;
    border-radius: 0.375rem 0.375rem 0 0;
}

.md-toolbar + .milkdown .editor,
.md-toolbar + div .editor {
    border-radius: 0 0 0.375rem 0.375rem;
}

.md-toolbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.35rem;
    border: none;
    border-radius: 0.25rem;
    background: transparent;
    color: var(--muted-color, oklch(60% 0.02 250));
    font-size: 0.8rem;
    font-family: var(--ff-body, monospace);
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

.md-toolbar__btn:hover {
    background: var(--neutral-color, oklch(35% 0.02 250));
    color: var(--contrast-color, oklch(90% 0.02 90));
}

.md-toolbar__btn:active {
    background: var(--accent-color, oklch(60% 0.12 170));
    color: var(--abyss-color, oklch(15% 0.02 250));
}

.md-toolbar__btn--bold { font-weight: 800; }
.md-toolbar__btn--italic { font-style: italic; }
.md-toolbar__btn--code { font-size: 0.7rem; letter-spacing: -0.05em; }

.md-toolbar__divider {
    width: 1px;
    height: 1.2rem;
    background: var(--seam-color, oklch(40% 0.02 250));
    margin: 0 0.25rem;
}

/* Block Editor Toggle (Intern/Extern) */
.block-editor__toggle-row {
    display: flex;
    gap: 0;
    border: 1px solid var(--seam-color, oklch(40% 0.02 250));
    border-radius: 0.375rem;
    overflow: hidden;
    width: fit-content;
}

.block-editor__toggle-btn {
    padding: 0.35rem 1rem;
    border: none;
    background: transparent;
    color: var(--muted-color, oklch(60% 0.02 250));
    font-size: 0.85rem;
    font-family: var(--ff-body, monospace);
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

.block-editor__toggle-btn + .block-editor__toggle-btn {
    border-left: 1px solid var(--seam-color, oklch(40% 0.02 250));
}

.block-editor__toggle-btn--active {
    background: var(--accent-color, oklch(60% 0.12 170));
    color: var(--abyss-color, oklch(15% 0.02 250));
}

.block-editor__toggle-btn:hover:not(.block-editor__toggle-btn--active) {
    background: var(--neutral-color, oklch(35% 0.02 250));
    color: var(--contrast-color, oklch(90% 0.02 90));
}
