/* ---------- 2.1  Design tokens ---------- */
    :root {
        --bg:            #0a0507;
        --panel:         #120a0d;

        --line:          rgba(214, 180, 180, 0.13);
        --line-strong:   rgba(214, 180, 180, 0.30);

        --ink:           #ede4e4;   /* pale off-white    */
        --ink-dim:       #b4a0a0;   /* muted gray-red    */
        --ink-faint:     #7d6464;   /* subtle dark rose  */

        --moss:          #c23a3a;   /* blood red accent  */

        --font-sans:  'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
        --font-mono:  'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
        --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
    }

    /* ---------- 2.2  Reset / base ---------- */
    *, *::before, *::after { box-sizing: border-box; }
    html, body { margin: 0; padding: 0; }

    body {
        min-height: 100vh;
        background-color: var(--bg);
        background-image:
            radial-gradient(120% 85% at 50% -12%, #2a0d12 0%, #14080a 48%, #060204 100%);
        color: var(--ink);
        font-family: var(--font-sans);
        font-size: 15px;
        line-height: 1.55;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    img { display: block; }
    button { font: inherit; color: inherit; }

    /* ---------- 2.15  Custom scrollbar (Firefox + WebKit) ---------- */

        /* --- Firefox (standard spec — colors + width only) --- */
        html {
            scrollbar-width: thin;                          /* thin | auto | none */
            scrollbar-color: var(--moss) var(--panel);      /* thumb  track */
        }

        /* --- WebKit (Chrome, Edge, Safari, Opera) --- */
        ::-webkit-scrollbar {
            width: 12px;                                    /* vertical bar width  */
            height: 12px;                                   /* horizontal bar height */
        }

        ::-webkit-scrollbar-track {
            background: var(--panel);                       /* dark crimson track  */
            border-left: 1px solid var(--line);             /* subtle divider line */
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(194, 58, 58, 0.45);            /* muted blood, translucent */
            border: 2px solid var(--panel);                 /* inset gap around thumb  */
            border-radius: 0;                               /* sharp edges = archive look */
            transition: background-color 0.18s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(194, 58, 58, 0.75);            /* brighter blood on hover */
        }

        ::-webkit-scrollbar-thumb:active {
            background: var(--moss);                        /* full blood while dragging */
        }

        ::-webkit-scrollbar-corner {
            background: var(--panel);                       /* where H + V bars meet */
        }

        /* Optional: subtle blood glow on the track edge, matching your art direction */
        ::-webkit-scrollbar-track:hover {
            background: #1a0c10;
        }

    /* ---------- 2.3  Page shell — full width, no squeeze ---------- */
    .page {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 2.5rem clamp(1.1rem, 2.6vw, 3.25rem) 2.5rem;
    }
    @media (max-width: 700px) {
        .page { padding: 1.75rem 1.1rem 1.75rem; }
    }

    /* ---------- 2.4  Rules / dividers ---------- */
    .rule       { height: 1px; width: 100%; background: var(--line-strong); }
    .rule--thin { background: var(--line); }

    /* ---------- 2.5  Header ---------- */
    .site-header { margin-bottom: 2.5rem; }

    .header-row {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
        margin-bottom: 1.1rem;
    }

    .brand {
        font-family: var(--font-mono);
        font-size: 0.72rem;
        letter-spacing: 0.34em;
        text-transform: uppercase;
        color: var(--moss);
    }

    .meta {
        font-family: var(--font-mono);
        font-size: 0.64rem;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: var(--ink-faint);
    }

    /* ---------- UPDATED: Title row with icon + logo ---------- */
    .site-title-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem;
        flex-wrap: wrap;
        margin-bottom: 1.1rem;
    }

    .title-left {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        min-width: 0;
    }

    .title-icon {
        width: 50px;
        height: 50px;
        object-fit: contain;
        border: 1px solid rgb(40, 0, 0);
        flex-shrink: 0;
    }


    .site-title {
        margin: 0;
        font-family: var(--font-serif);
        font-weight: 400;
        font-size: clamp(1.05rem, 2.05vw, 1.55rem);
        line-height: 1.3;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: var(--ink);
    }
    .site-title .sep { color: var(--ink-faint); }

    .title-right {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .lore-logo {
        height: 55px;
        width: auto;
        max-width: 180px;
        object-fit: contain;
        opacity: 0.92;
        transition: opacity 0.25s ease;
    }

    .lore-logo:hover {
        opacity: 1;
    }

    @media (max-width: 600px) {
        .site-title-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.75rem;
        }
        .title-right {
            align-self: flex-end;
        }
        .lore-logo {
            height: 32px;
            max-width: 140px;
        }
    }

    /* ---------- 2.6  Main layout — fills the viewport width ---------- */
    .layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
        gap: clamp(2rem, 3vw, 3.5rem);
        align-items: start;
    }
    @media (max-width: 980px) {
        .layout {
            grid-template-columns: 1fr;
            gap: 2.75rem;
        }
    }

    /* ---------- 2.7  Section headings ---------- */
    .section-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 0.65rem;
    }
    .section-head h2 {
        margin: 0;
        font-family: var(--font-mono);
        font-size: 0.78rem;
        font-weight: 500;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: var(--ink);
    }
    .section-note {
        font-family: var(--font-mono);
        font-size: 0.6rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--ink-faint);
        white-space: nowrap;
    }

    /* ---------- 2.8  Album tabs ---------- */
    .tabs {
        display: flex;
        flex-wrap: wrap;
        border-bottom: 1px solid var(--line);
        margin-top: 1rem;
    }
    .tab {
        appearance: none;
        background: transparent;
        border: 0;
        border-right: 1px solid var(--line);
        color: var(--ink-faint);
        font-family: var(--font-mono);
        font-size: 0.64rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        padding: 0.72rem 1.05rem;
        cursor: pointer;
        position: relative;
        transition: color 0.18s ease, background-color 0.18s ease;
    }
    .tab:first-child { border-left: 1px solid var(--line); }
    .tab:hover { color: var(--ink); background: rgba(194, 58, 58, 0.05); }
    .tab.is-active { color: var(--ink); background: rgba(194, 58, 58, 0.09); }
    .tab.is-active::after {
        content: "";
        position: absolute;
        left: 0; right: 0; bottom: -1px;
        height: 1px;
        background: var(--moss);
    }

    /* ---------- 2.9  Album panels — now framed in a box ---------- */
    .panel {
        display: none;
        border: 1px solid var(--line);
        background: rgba(18, 10, 13, 0.55);
        padding: 0 1rem 1rem;
        margin-top: 1.2rem;
    }
    .panel.is-active { display: block; }

    .panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.95rem 0 0.85rem;
    }
    .panel-label {
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--ink-dim);
    }
    .counter {
        font-family: var(--font-mono);
        font-size: 0.68rem;
        letter-spacing: 0.14em;
        color: var(--moss);
        border: 1px solid var(--line);
        padding: 0.1rem 0.45rem;
        white-space: nowrap;
    }

    /* ---------- 2.10  Gallery grid — stretches to full column width ---------- */
    .gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
        gap: 10px;
        padding-bottom: 0.5rem;
    }
    @media (max-width: 480px) {
        .gallery {
            grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
            gap: 8px;
        }
    }

    .tile {
        position: relative;
        aspect-ratio: 4 / 5;
        overflow: hidden;
        border: 1px solid var(--line);
        background: #14080a;
        cursor: zoom-in;
        transition: border-color 0.2s ease;
    }
    .tile:hover { border-color: var(--line-strong); }

    /* ---------- UPDATED: Bloody/desaturated filter, full colour on hover ---------- */
    .tile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: grayscale(0.85) brightness(0.78) contrast(1.10) sepia(0.40) hue-rotate(-20deg) saturate(0.65);
        transition: transform 0.4s ease, filter 0.4s ease;
    }
    .tile:hover img {
        transform: scale(1.04);
        filter: grayscale(0) brightness(1) contrast(1) sepia(0) hue-rotate(0deg) saturate(1);
    }

    /* archive plate number, generated purely in CSS */
    .gallery { counter-reset: tile; }
    .tile::after {
        counter-increment: tile;
        content: counter(tile, decimal-leading-zero);
        position: absolute;
        left: 0; bottom: 0;
        padding: 1px 5px;
        font-family: var(--font-mono);
        font-size: 0.56rem;
        letter-spacing: 0.1em;
        color: var(--ink-dim);
        background: rgba(6, 2, 4, 0.74);
        border-top: 1px solid var(--line);
        border-right: 1px solid var(--line);
    }

    /* ---------- 2.11  3D showcase column ---------- */
    .showcase { display: flex; flex-direction: column; }

    .viewer-frame {
        margin-top: 1rem;
        padding: 10px;
        border: 1px solid var(--line);
        background: #080305;
        box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.9);
    }

    .canvas-box {
        position: relative;
        width: 100%;
        aspect-ratio: 3 / 4;
        background: #080305;
        overflow: hidden;
    }
    .canvas-box canvas { display: block; }

    .spinner-overlay {
        position: absolute;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(8, 3, 5, 0.86);
        z-index: 20;
    }
    .spinner-overlay.active { display: flex; }

    .loader {
        width: 28px;
        height: 28px;
        border: 2px solid rgba(214, 180, 180, 0.16);
        border-top-color: var(--moss);
        border-radius: 50%;
        animation: spin 0.9s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ---------- Model caption — CENTERED beneath the viewer ---------- */
    .model-caption {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        margin-top: 1rem;
        text-align: center;
    }
    .model-caption .dot {
        width: 6px;
        height: 6px;
        flex-shrink: 0;
        background: var(--moss);
        box-shadow: 0 0 10px rgba(194, 58, 58, 0.85);
        animation: emberPulse 3s ease-in-out infinite;
    }
    @keyframes emberPulse {
        0%, 100% { opacity: 0.45; }
        50%      { opacity: 1; }
    }
    .model-name {
        font-family: var(--font-mono);
        font-size: 0.7rem;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: var(--ink);
    }

    .hint {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem 1.1rem;
        margin-top: 0.65rem;
        font-family: var(--font-mono);
        font-size: 0.58rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--ink-faint);
    }
    .hint kbd {
        font-family: inherit;
        font-size: inherit;
        color: var(--ink-dim);
        border: 1px solid var(--line);
        padding: 1px 5px;
    }

    /* ---------- UPDATED: Footer — three-part layout (left / center / right) ---------- */
    .site-footer {
        margin-top: 3.5rem;
        text-align: center;
    }

    .footer-row {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 1rem;
        padding: 1.15rem 0;
        font-family: var(--font-mono);
        font-size: 0.6rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--ink-faint);
    }

    .footer-left {
        text-align: left;
    }

    .footer-center {
        text-align: center;
        color: var(--ink-dim);
        white-space: nowrap;
    }

    .footer-right {
        text-align: right;
    }

    @media (max-width: 700px) {
        .footer-row {
            grid-template-columns: 1fr;
            gap: 0.4rem;
            text-align: center;
        }
        .footer-left,
        .footer-center,
        .footer-right {
            text-align: center;
        }
    }

    .links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.55rem 1.5rem;
        padding: 1rem 0 0;
    }
    .links a {
        color: var(--ink-dim);
        text-decoration: none;
        font-family: var(--font-mono);
        font-size: 0.6rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        border-bottom: 1px solid transparent;
        transition: color 0.18s ease, border-color 0.18s ease;
    }
    .links a:hover {
        color: var(--moss);
        border-bottom-color: var(--moss);
    }

    /* ---------- 2.13  Lightbox ---------- */
    .lightbox {
        position: fixed;
        inset: 0;
        z-index: 200;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4.5rem 4.5rem 5rem;
        background: rgba(6, 2, 4, 0.84);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.22s ease, visibility 0.22s ease;
    }
    .lightbox.is-open { opacity: 1; visibility: visible; }

    .lb-stage {
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: min(1100px, 86vw);
        max-height: 76vh;
    }

    /* ---------- UPDATED: Lightbox shows full colour ---------- */
    .lb-stage img {
        max-width: 100%;
        max-height: 76vh;
        object-fit: contain;
        border: 1px solid var(--line-strong);
        background: #080305;
        filter: none; /* full original colours in the lightbox */
    }

    .lb-btn {
        position: absolute;
        appearance: none;
        background: rgba(14, 6, 8, 0.72);
        border: 1px solid var(--line);
        color: var(--ink-dim);
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: var(--font-mono);
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
        transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
    }
    .lb-btn:hover {
        color: var(--ink);
        border-color: var(--moss);
        background: rgba(194, 58, 58, 0.12);
    }

    .lb-close { top: 1.5rem; right: 1.5rem; }
    .lb-prev  { left: 1.5rem;  top: 50%; transform: translateY(-50%); }
    .lb-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }

    .lb-counter {
        position: absolute;
        bottom: 1.75rem;
        left: 50%;
        transform: translateX(-50%);
        font-family: var(--font-mono);
        font-size: 0.66rem;
        letter-spacing: 0.24em;
        text-transform: uppercase;
        color: var(--ink-dim);
        border: 1px solid var(--line);
        padding: 0.3rem 0.75rem;
        background: rgba(14, 6, 8, 0.72);
        white-space: nowrap;
    }

    @media (max-width: 640px) {
        .lightbox { padding: 4.5rem 1rem 5rem; }
        .lb-prev { left: 0.6rem; }
        .lb-next { right: 0.6rem; }
        .lb-close { top: 0.85rem; right: 0.85rem; }
    }

    /* ---------- 2.14  Reduced motion ---------- */
    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.001ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.001ms !important;
        }
    }
/* ============================================================================
   BLOODLORE — MOBILE RESPONSIVE KIT TOOLKIT
   ----------------------------------------------------------------------------
   • Every selector is wrapped inside a resolution-based @media block.
   • Every declaration is forced with !important.
   • Layout stacking on mobile: ALBUM section first → 3D showcase beneath.
   • No selector exists outside an @media block.
   ============================================================================ */


/* ============================================================================
   MOBILE BASE  —  max-width: 980px
   ============================================================================ */
@media (max-width: 980px) {

    /* ---------- Design tokens ---------- */
    :root {
        --bg:            #0a0507 !important;
        --panel:         #120a0d !important;

        --line:          rgba(214, 180, 180, 0.13) !important;
        --line-strong:   rgba(214, 180, 180, 0.30) !important;

        --ink:           #ede4e4 !important;
        --ink-dim:       #b4a0a0 !important;
        --ink-faint:     #7d6464 !important;

        --moss:          #c23a3a !important;

        --font-sans:  'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
        --font-mono:  'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace !important;
        --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif !important;
    }

    /* ---------- Reset / base ---------- */
    *, *::before, *::after {
        box-sizing: border-box !important;
    }
    html, body {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        min-height: 100vh !important;
        background-color: var(--bg) !important;
        background-image:
            radial-gradient(120% 85% at 50% -12%, #2a0d12 0%, #14080a 48%, #060204 100%) !important;
        color: var(--ink) !important;
        font-family: var(--font-sans) !important;
        font-size: 14px !important;
        line-height: 1.55 !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }

    img {
        display: block !important;
        max-width: 100% !important;
    }
    button {
        font: inherit !important;
        color: inherit !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    /* ---------- Custom scrollbar (Firefox + WebKit) ---------- */
    html {
        scrollbar-width: thin !important;
        scrollbar-color: var(--moss) var(--panel) !important;
    }

    ::-webkit-scrollbar {
        width: 10px !important;
        height: 10px !important;
    }

    ::-webkit-scrollbar-track {
        background: var(--panel) !important;
        border-left: 1px solid var(--line) !important;
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(194, 58, 58, 0.45) !important;
        border: 2px solid var(--panel) !important;
        border-radius: 0 !important;
        transition: background-color 0.18s ease !important;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(194, 58, 58, 0.75) !important;
    }

    ::-webkit-scrollbar-thumb:active {
        background: var(--moss) !important;
    }

    ::-webkit-scrollbar-corner {
        background: var(--panel) !important;
    }

    ::-webkit-scrollbar-track:hover {
        background: #1a0c10 !important;
    }

    /* ---------- Page shell ---------- */
    .page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 1.75rem 1.1rem 1.75rem !important;
    }

    /* ---------- Rules / dividers ---------- */
    .rule {
        height: 1px !important;
        width: 100% !important;
        background: var(--line-strong) !important;
    }
    .rule--thin {
        background: var(--line) !important;
    }

    /* ---------- Header ---------- */
    .site-header {
        margin-bottom: 1.5rem !important;
    }

    .header-row {
        display: flex !important;
        align-items: baseline !important;
        justify-content: space-between !important;
        gap: 0.6rem !important;
        flex-wrap: wrap !important;
        margin-bottom: 0.85rem !important;
    }

    .brand {
        font-family: var(--font-mono) !important;
        font-size: 0.65rem !important;
        letter-spacing: 0.28em !important;
        text-transform: uppercase !important;
        color: var(--moss) !important;
    }

    .meta {
        font-family: var(--font-mono) !important;
        font-size: 0.55rem !important;
        letter-spacing: 0.16em !important;
        text-transform: uppercase !important;
        color: var(--ink-faint) !important;
    }

    /* ---------- Title row (icon + logo) ---------- */
    .site-title-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.85rem !important;
        flex-wrap: wrap !important;
        margin-bottom: 0.85rem !important;
    }

    .title-left {
        display: flex !important;
        align-items: center !important;
        gap: 0.55rem !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .title-icon {
        width: 42px !important;
        height: 42px !important;
        object-fit: contain !important;
        border: 1px solid rgb(40, 0, 0) !important;
        flex-shrink: 0 !important;
    }

    .site-title {
        margin: 0 !important;
        font-family: var(--font-serif) !important;
        font-weight: 400 !important;
        font-size: clamp(0.95rem, 3.6vw, 1.3rem) !important;
        line-height: 1.3 !important;
        letter-spacing: 0.06em !important;
        text-transform: uppercase !important;
        color: var(--ink) !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    .site-title .sep {
        color: var(--ink-faint) !important;
    }

    .title-right {
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }

    .lore-logo {
        height: 42px !important;
        width: auto !important;
        max-width: 150px !important;
        object-fit: contain !important;
        opacity: 0.92 !important;
        transition: opacity 0.25s ease !important;
    }
    .lore-logo:hover {
        opacity: 1 !important;
    }

    /* ---------- Main layout — single column stack ---------- */
    .layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        align-items: start !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* REQUIRED MOBILE ORDER:
       1 → album section (default)
       2 → 3D showcase forced beneath */
    .layout > :not(.showcase) {
        order: 1 !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    .layout > .showcase {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* ---------- Section headings ---------- */
    .section-head {
        display: flex !important;
        align-items: baseline !important;
        justify-content: space-between !important;
        gap: 0.75rem !important;
        margin-bottom: 0.55rem !important;
        flex-wrap: wrap !important;
    }
    .section-head h2 {
        margin: 0 !important;
        font-family: var(--font-mono) !important;
        font-size: 0.7rem !important;
        font-weight: 500 !important;
        letter-spacing: 0.2em !important;
        text-transform: uppercase !important;
        color: var(--ink) !important;
    }
    .section-note {
        font-family: var(--font-mono) !important;
        font-size: 0.55rem !important;
        letter-spacing: 0.14em !important;
        text-transform: uppercase !important;
        color: var(--ink-faint) !important;
        white-space: nowrap !important;
    }

    /* ---------- Album tabs (single row, never stacked) ---------- */
    .tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        border-bottom: 1px solid var(--line) !important;
        margin-top: 0.85rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    .tabs::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    .tab {
        appearance: none !important;
        background: transparent !important;
        border: 0 !important;
        border-right: 1px solid var(--line) !important;
        color: var(--ink-faint) !important;
        font-family: var(--font-mono) !important;
        font-size: 0.6rem !important;
        letter-spacing: 0.1em !important;
        text-transform: uppercase !important;
        padding: 0.65rem 0.5rem !important;
        min-height: 38px !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        cursor: pointer !important;
        position: relative !important;
        transition: color 0.18s ease, background-color 0.18s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    .tab:first-child {
        border-left: 1px solid var(--line) !important;
    }
    .tab:hover,
    .tab:active {
        color: var(--ink) !important;
        background: rgba(194, 58, 58, 0.05) !important;
    }
    .tab.is-active {
        color: var(--ink) !important;
        background: rgba(194, 58, 58, 0.09) !important;
    }
    .tab.is-active::after {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: -1px !important;
        height: 1px !important;
        background: var(--moss) !important;
    }

    /* ---------- Album panels ---------- */
    .panel {
        display: none !important;
        border: 1px solid var(--line) !important;
        background: rgba(18, 10, 13, 0.55) !important;
        padding: 0 0.75rem 0.75rem !important;
        margin-top: 1rem !important;
    }
    .panel.is-active {
        display: block !important;
    }

    .panel-head {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.75rem !important;
        padding: 0.75rem 0 0.7rem !important;
        flex-wrap: wrap !important;
    }
    .panel-label {
        font-family: var(--font-mono) !important;
        font-size: 0.58rem !important;
        letter-spacing: 0.18em !important;
        text-transform: uppercase !important;
        color: var(--ink-dim) !important;
    }
    .counter {
        font-family: var(--font-mono) !important;
        font-size: 0.62rem !important;
        letter-spacing: 0.14em !important;
        color: var(--moss) !important;
        border: 1px solid var(--line) !important;
        padding: 0.1rem 0.45rem !important;
        white-space: nowrap !important;
    }

    /* ---------- Gallery grid ---------- */
    .gallery {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 8px !important;
        padding-bottom: 0.5rem !important;
        counter-reset: tile !important;
    }

    .tile {
        position: relative !important;
        aspect-ratio: 4 / 5 !important;
        overflow: hidden !important;
        border: 1px solid var(--line) !important;
        background: #14080a !important;
        cursor: zoom-in !important;
        transition: border-color 0.2s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    .tile:hover,
    .tile:active {
        border-color: var(--line-strong) !important;
    }

    .tile img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        filter: grayscale(0.85) brightness(0.78) contrast(1.10) sepia(0.40) hue-rotate(-20deg) saturate(0.65) !important;
        transition: transform 0.4s ease, filter 0.4s ease !important;
    }
    .tile:hover img,
    .tile:active img {
        transform: scale(1.04) !important;
        filter: grayscale(0) brightness(1) contrast(1) sepia(0) hue-rotate(0deg) saturate(1) !important;
    }

    .tile::after {
        counter-increment: tile !important;
        content: counter(tile, decimal-leading-zero) !important;
        position: absolute !important;
        left: 0 !important;
        bottom: 0 !important;
        padding: 1px 5px !important;
        font-family: var(--font-mono) !important;
        font-size: 0.54rem !important;
        letter-spacing: 0.1em !important;
        color: var(--ink-dim) !important;
        background: rgba(6, 2, 4, 0.74) !important;
        border-top: 1px solid var(--line) !important;
        border-right: 1px solid var(--line) !important;
    }

    /* ---------- 3D showcase column — FIXED: fully contained on mobile ---------- */
    .showcase {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .viewer-frame {
        margin-top: 0.85rem !important;
        padding: 8px !important;
        border: 1px solid var(--line) !important;
        background: #080305 !important;
        box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.9) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .canvas-box {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        aspect-ratio: 3 / 4 !important;
        background: #080305 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    .canvas-box canvas {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        box-sizing: border-box !important;
    }

    .spinner-overlay {
        position: absolute !important;
        inset: 0 !important;
        display: none !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(8, 3, 5, 0.86) !important;
        z-index: 20 !important;
    }
    .spinner-overlay.active {
        display: flex !important;
    }

    .loader {
        width: 28px !important;
        height: 28px !important;
        border: 2px solid rgba(214, 180, 180, 0.16) !important;
        border-top-color: var(--moss) !important;
        border-radius: 50% !important;
        animation: spin 0.9s linear infinite !important;
    }
    @keyframes spin {
        to { transform: rotate(360deg) !important; }
    }

    /* ---------- Model caption ---------- */
    .model-caption {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin-top: 0.85rem !important;
        text-align: center !important;
    }
    .model-caption .dot {
        width: 6px !important;
        height: 6px !important;
        flex-shrink: 0 !important;
        background: var(--moss) !important;
        box-shadow: 0 0 10px rgba(194, 58, 58, 0.85) !important;
        animation: emberPulse 3s ease-in-out infinite !important;
    }
    @keyframes emberPulse {
        0%, 100% { opacity: 0.45 !important; }
        50%      { opacity: 1 !important; }
    }
    .model-name {
        font-family: var(--font-mono) !important;
        font-size: 0.64rem !important;
        letter-spacing: 0.2em !important;
        text-transform: uppercase !important;
        color: var(--ink) !important;
    }

    .hint {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.35rem 0.85rem !important;
        margin-top: 0.55rem !important;
        font-family: var(--font-mono) !important;
        font-size: 0.54rem !important;
        letter-spacing: 0.12em !important;
        text-transform: uppercase !important;
        color: var(--ink-faint) !important;
    }
    .hint kbd {
        font-family: inherit !important;
        font-size: inherit !important;
        color: var(--ink-dim) !important;
        border: 1px solid var(--line) !important;
        padding: 1px 5px !important;
    }

    /* ---------- Footer ---------- */
    .site-footer {
        margin-top: 2.5rem !important;
        text-align: center !important;
    }

    .footer-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 1rem 0 !important;
        font-family: var(--font-mono) !important;
        font-size: 0.58rem !important;
        letter-spacing: 0.14em !important;
        text-transform: uppercase !important;
        color: var(--ink-faint) !important;
        text-align: center !important;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        text-align: center !important;
    }
    .footer-center {
        color: var(--ink-dim) !important;
        white-space: nowrap !important;
    }

    .links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.55rem 1.1rem !important;
        padding: 0.85rem 0 0 !important;
    }
    .links a {
        color: var(--ink-dim) !important;
        text-decoration: none !important;
        font-family: var(--font-mono) !important;
        font-size: 0.58rem !important;
        letter-spacing: 0.14em !important;
        text-transform: uppercase !important;
        border-bottom: 1px solid transparent !important;
        transition: color 0.18s ease, border-color 0.18s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    .links a:hover,
    .links a:active {
        color: var(--moss) !important;
        border-bottom-color: var(--moss) !important;
    }

    /* ---------- Lightbox ---------- */
    .lightbox {
        position: fixed !important;
        inset: 0 !important;
        z-index: 200 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 3.5rem 0.75rem 4rem !important;
        background: rgba(6, 2, 4, 0.84) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.22s ease, visibility 0.22s ease !important;
    }
    .lightbox.is-open {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .lb-stage {
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        max-width: 100% !important;
        max-height: 72vh !important;
    }

    .lb-stage img {
        max-width: 100% !important;
        max-height: 72vh !important;
        object-fit: contain !important;
        border: 1px solid var(--line-strong) !important;
        background: #080305 !important;
        filter: none !important;
    }

    .lb-btn {
        position: absolute !important;
        appearance: none !important;
        background: rgba(14, 6, 8, 0.72) !important;
        border: 1px solid var(--line) !important;
        color: var(--ink-dim) !important;
        width: 42px !important;
        height: 42px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-family: var(--font-mono) !important;
        font-size: 1.1rem !important;
        line-height: 1 !important;
        cursor: pointer !important;
        transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    .lb-btn:hover,
    .lb-btn:active {
        color: var(--ink) !important;
        border-color: var(--moss) !important;
        background: rgba(194, 58, 58, 0.12) !important;
    }

    .lb-close {
        top: 0.85rem !important;
        right: 0.85rem !important;
    }
    .lb-prev {
        left: 0.55rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    .lb-next {
        right: 0.55rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .lb-counter {
        position: absolute !important;
        bottom: 1rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-family: var(--font-mono) !important;
        font-size: 0.6rem !important;
        letter-spacing: 0.22em !important;
        text-transform: uppercase !important;
        color: var(--ink-dim) !important;
        border: 1px solid var(--line) !important;
        padding: 0.3rem 0.75rem !important;
        background: rgba(14, 6, 8, 0.72) !important;
        white-space: nowrap !important;
    }
}


/* ============================================================================
   NARROW MOBILE  —  max-width: 700px
   ============================================================================ */
@media (max-width: 700px) {

    .page {
        padding: 1.5rem 0.9rem 1.5rem !important;
    }

    .site-header {
        margin-bottom: 1.25rem !important;
    }

    /* ---------- Centered header: icon + logo side-by-side, title beneath ---------- */
    .site-title-row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.6rem 0.9rem !important;
        margin-bottom: 0.85rem !important;
    }

    /* Flatten the wrappers so the icon, logo and title all become
       direct flex children of .site-title-row */
    .title-left,
    .title-right {
        display: contents !important;
    }

    .title-icon,
    .lore-logo {
        order: 1 !important;
        width: 44px !important;
        height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        object-fit: contain !important;
        flex: 0 0 auto !important;
    }

    .site-title {
        order: 2 !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        text-align: center !important;
        font-size: clamp(1.1rem, 4.6vw, 1.5rem) !important;
        letter-spacing: 0.05em !important;
        line-height: 1.35 !important;
    }

    .header-row {
        margin-bottom: 0.75rem !important;
    }

    .layout {
        gap: 1.75rem !important;
    }

    .site-footer {
        margin-top: 2rem !important;
    }

    .footer-row {
        gap: 0.35rem !important;
        font-size: 0.55rem !important;
        letter-spacing: 0.12em !important;
    }

    .links {
        gap: 0.5rem 1rem !important;
        padding: 0.75rem 0 0 !important;
    }

    .lightbox {
        padding: 3.25rem 0.6rem 3.75rem !important;
    }
}


/* ============================================================================
   PHONE  —  max-width: 600px
   ============================================================================ */
@media (max-width: 600px) {

    .header-row {
        gap: 0.5rem !important;
    }

    .brand {
        font-size: 0.62rem !important;
        letter-spacing: 0.24em !important;
    }

    .meta {
        font-size: 0.52rem !important;
        letter-spacing: 0.14em !important;
    }

    /* ---------- Album: exactly three tiles per row ---------- */
    .gallery {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    .layout {
        gap: 1.5rem !important;
    }

    .viewer-frame {
        padding: 6px !important;
    }

    .model-name {
        font-size: 0.6rem !important;
        letter-spacing: 0.18em !important;
    }

    .hint {
        font-size: 0.52rem !important;
        letter-spacing: 0.1em !important;
        gap: 0.3rem 0.7rem !important;
    }

    .lightbox {
        padding: 3rem 0.5rem 3.5rem !important;
    }

    .lb-stage img {
        max-height: 70vh !important;
    }
}


/* ============================================================================
   SMALL PHONE  —  max-width: 480px
   ============================================================================ */
@media (max-width: 480px) {

    .page {
        padding: 1.25rem 0.75rem 1.25rem !important;
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
    }

    .tab {
        padding: 0.6rem 0.4rem !important;
        font-size: 0.56rem !important;
        letter-spacing: 0.08em !important;
    }

    .panel {
        padding: 0 0.6rem 0.6rem !important;
    }

    .panel-head {
        padding: 0.65rem 0 0.6rem !important;
    }

    .panel-label {
        font-size: 0.54rem !important;
        letter-spacing: 0.16em !important;
    }

    .counter {
        font-size: 0.58rem !important;
    }

    .section-head h2 {
        font-size: 0.64rem !important;
        letter-spacing: 0.18em !important;
    }

    .section-note {
        font-size: 0.5rem !important;
        letter-spacing: 0.12em !important;
    }

    .title-icon,
    .lore-logo {
        display: none !important;
    }

    .site-title {
        font-size: clamp(1.03rem, 5.1vw, 1.2rem) !important;
        letter-spacing: 0.04em !important;
    }

    .tile::after {
        font-size: 0.5rem !important;
        padding: 1px 4px !important;
    }

    .lb-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.95rem !important;
    }

    .lb-close {
        top: 0.6rem !important;
        right: 0.6rem !important;
    }
    .lb-prev {
        left: 0.4rem !important;
    }
    .lb-next {
        right: 0.4rem !important;
    }

    .lb-counter {
        bottom: 0.75rem !important;
        font-size: 0.56rem !important;
        letter-spacing: 0.18em !important;
        padding: 0.25rem 0.6rem !important;
    }

    .lb-stage {
        max-height: 70vh !important;
    }
    .lb-stage img {
        max-height: 70vh !important;
    }

    .lightbox {
        padding: 2.75rem 0.4rem 3.25rem !important;
    }

    .model-caption {
        gap: 0.4rem !important;
        margin-top: 0.7rem !important;
    }

    .model-caption .dot {
        width: 5px !important;
        height: 5px !important;
    }
}


/* ============================================================================
   EXTRA-SMALL PHONE  —  max-width: 380px
   ============================================================================ */
@media (max-width: 380px) {

    .page {
        padding: 1rem 0.6rem 1rem !important;
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
    }

    .tab {
        padding: 0.55rem 0.35rem !important;
        font-size: 0.54rem !important;
        letter-spacing: 0.06em !important;
    }

    .title-icon,
    .lore-logo {
        width: 34px !important;
        height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
    }

    .site-title {
        font-size: clamp(0.98rem, 4.8vw, 1.15rem) !important;
    }

    .viewer-frame {
        padding: 5px !important;
    }

    .lb-stage img {
        max-height: 66vh !important;
    }

    .lightbox {
        padding: 2.5rem 0.35rem 3rem !important;
    }
}


/* ============================================================================
   ACCESSIBILITY  —  reduced motion
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}