
    @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;900&family=Inter:wght@400;500&display=swap');

    body {
        --active-accent: 129, 140, 248;
        background: #08080f;
        color: #fff;
        font-family: 'Inter', sans-serif;
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }

    body[data-active-category="concept"] {
        --active-accent: 45, 212, 191;
    }

    body[data-active-category="effect"] {
        --active-accent: 251, 146, 60;
    }

    /* Quiet ambient field behind the catalog */
    .bg-ambient {
        position: fixed;
        inset: 0;
        z-index: 0;
        overflow: hidden;
        pointer-events: none;
        background:
            radial-gradient(circle at 8% 0%, rgba(99, 102, 241, 0.1), transparent 32%),
            radial-gradient(circle at 82% 100%, rgba(6, 182, 212, 0.06), transparent 30%),
            #08080f;
    }

    /* App layout */
    .app {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
    }

    /* Header */
    .app-header {
        display: flex;
        align-items: center;
        padding: 16px 24px;
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        flex-shrink: 0;
        position: relative;
    }

    .app-header::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }

    .header-summary {
        color: rgba(255, 255, 255, 0.42);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        margin-right: 16px;
        white-space: nowrap;
    }

    .brand {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: inherit;
        text-decoration: none;
    }

    .brand-mark {
        display: block;
        width: 27px;
        height: 27px;
        flex: none;
    }

    .logo {
        font-family: 'Montserrat', sans-serif;
        font-size: 1rem;
        font-weight: 900;
        margin: 0;
        letter-spacing: -0.02em;
    }

    .logo-owner {
        margin-left: 0.35rem;
        color: rgba(255, 255, 255, 0.35);
        font-size: 0.68rem;
        font-weight: 500;
        letter-spacing: 0;
    }

    .header-link {
        color: rgba(255, 255, 255, 0.3);
        text-decoration: none;
        transition: color 0.2s;
        display: flex;
        align-items: center;
    }

    .header-link:hover {
        color: rgba(255, 255, 255, 0.6);
    }

    /* Main split */
    .app-main {
        display: flex;
        flex: 1;
        min-height: 0;
    }

    /* Preview pane */
    .preview-pane {
        flex: 3;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .preview-frame {
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: 16px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(var(--active-accent), 0.18);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.06),
            0 0 0 1px rgba(var(--active-accent), 0.025);
        transition: border-color 0.25s ease, box-shadow 0.25s ease;
    }

    .preview-frame::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 10%, rgba(var(--active-accent), 0.45) 50%, transparent 90%);
        z-index: 2;
    }

    .preview-frame iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: none;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    .preview-frame iframe.fade-out {
        opacity: 0;
    }

    .preview-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: rgba(8, 8, 15, 0.7);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        z-index: 2;
        opacity: 0.82;
        transition: opacity 0.3s ease;
    }

    .preview-frame:hover .preview-bar,
    .preview-frame:focus-within .preview-bar {
        opacity: 1;
    }

    .preview-info {
        min-width: 0;
        flex: 1;
    }

    .preview-eyebrow {
        display: flex;
        align-items: center;
        gap: 8px;
        color: rgba(var(--active-accent), 0.72);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.56rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        margin-bottom: 3px;
        text-transform: uppercase;
    }

    .preview-eyebrow::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgb(var(--active-accent));
        box-shadow: 0 0 8px rgba(var(--active-accent), 0.65);
        flex: none;
    }

    .preview-title {
        font-family: 'Montserrat', sans-serif;
        font-size: 0.82rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .preview-desc {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.4);
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .preview-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .preview-step {
        color: rgba(255, 255, 255, 0.3);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.6rem;
        font-weight: 600;
        min-width: 42px;
        text-align: center;
    }

    .preview-nav {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .preview-nav-button {
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.58);
        cursor: pointer;
        transition: background 0.2s, color 0.2s, border-color 0.2s;
    }

    .preview-nav-button:hover {
        background: rgba(255, 255, 255, 0.11);
        border-color: rgba(255, 255, 255, 0.14);
        color: #fff;
    }

    .preview-nav-button:disabled {
        cursor: default;
        opacity: 0.34;
    }

    .preview-nav-button:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 2px;
    }

    .preview-nav-button svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .preview-open {
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        font-size: 0.72rem;
        font-weight: 600;
        padding: 6px 14px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.2s;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .preview-open:hover {
        background: rgba(var(--active-accent), 0.18);
        border-color: rgba(var(--active-accent), 0.28);
        color: #fff;
    }

    .preview-open:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 2px;
    }

    /* Sidebar */
    .sidebar {
        flex: 2;
        min-width: 320px;
        max-width: 420px;
        display: flex;
        flex-direction: column;
        min-height: 0;
        background: rgba(255, 255, 255, 0.02);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
        position: relative;
    }

    .sidebar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 1px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.1));
        z-index: 1;
    }

    .catalog-header {
        flex-shrink: 0;
        padding: 18px 18px 14px;
        background: rgba(8, 8, 15, 0.48);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        position: relative;
        z-index: 2;
    }

    .catalog-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 14px;
    }

    .catalog-kicker {
        color: rgba(255, 255, 255, 0.26);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.56rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .catalog-title {
        font-family: 'Montserrat', sans-serif;
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        margin-top: 4px;
    }

    .catalog-total {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 34px;
        height: 24px;
        padding: 0 8px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 999px;
        color: rgba(255, 255, 255, 0.45);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.62rem;
        font-weight: 700;
    }

    .catalog-search {
        position: relative;
    }

    .catalog-search svg {
        position: absolute;
        top: 50%;
        left: 12px;
        width: 15px;
        height: 15px;
        fill: none;
        stroke: rgba(255, 255, 255, 0.28);
        stroke-width: 2;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .catalog-search-input {
        width: 100%;
        height: 38px;
        box-sizing: border-box;
        padding: 0 38px 0 36px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.035);
        color: #fff;
        font: inherit;
        font-size: 0.74rem;
        outline: none;
        transition: background 0.2s, border-color 0.2s;
    }

    .catalog-search-input::placeholder {
        color: rgba(255, 255, 255, 0.24);
    }

    .catalog-search-input:focus {
        background: rgba(255, 255, 255, 0.055);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .search-shortcut {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.2);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.56rem;
        font-weight: 700;
        pointer-events: none;
    }

    .catalog-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 10px;
    }

    .catalog-filters {
        display: inline-flex;
        gap: 3px;
        padding: 3px;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.035);
    }

    .catalog-filter {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 9px;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: rgba(255, 255, 255, 0.32);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.58rem;
        font-weight: 700;
        cursor: pointer;
    }

    .filter-count {
        color: rgba(255, 255, 255, 0.18);
        font-size: 0.5rem;
        font-variant-numeric: tabular-nums;
    }

    .catalog-filter:hover {
        color: rgba(255, 255, 255, 0.7);
    }

    .catalog-filter[aria-pressed="true"] {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .catalog-filter[aria-pressed="true"] .filter-count {
        color: rgba(255, 255, 255, 0.52);
    }

    .catalog-filter:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.45);
        outline-offset: 2px;
    }

    .catalog-result {
        color: rgba(255, 255, 255, 0.34);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.56rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .sidebar-scroll {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
    }

    .sidebar-scroll::-webkit-scrollbar { width: 3px; }
    .sidebar-scroll::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 2px;
    }

    /* Section divider */
    .section-divider {
        font-family: 'Montserrat', sans-serif;
        font-size: 0.6rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: rgba(255, 255, 255, 0.2);
        padding: 14px 12px 8px;
        display: flex;
        align-items: center;
        gap: 10px;
        position: sticky;
        top: -12px;
        z-index: 2;
        background: rgba(10, 10, 18, 0.94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .section-count {
        color: rgba(255, 255, 255, 0.12);
        font-size: 0.54rem;
    }

    .section-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: rgba(255, 255, 255, 0.06);
    }

    /* Card */
    .card {
        --card-accent: 129, 140, 248;
        display: flex;
        align-items: center;
        gap: 22px;
        padding: 10px 12px;
        margin-bottom: 2px;
        border-radius: 10px;
        border: 1px solid transparent;
        background: transparent;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        color: #fff;
        width: 100%;
        text-align: left;
        font-family: inherit;
        font-size: inherit;
        position: relative;
    }

    .card[data-category="concept"] {
        --card-accent: 45, 212, 191;
    }

    .card[data-category="effect"] {
        --card-accent: 251, 146, 60;
    }

    .card::after {
        content: '';
        position: absolute;
        top: -3px;
        bottom: -5px;
        left: 58px;
        width: 1px;
        background: rgba(255, 255, 255, 0.055);
        pointer-events: none;
    }

    .card:hover {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .card.active {
        background: rgba(var(--card-accent), 0.085);
        border-color: rgba(var(--card-accent), 0.24);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2),
                    inset 0 1px 0 rgba(255, 255, 255, 0.05),
                    0 0 24px rgba(var(--card-accent), 0.035);
    }

    .card.active::before {
        content: '';
        position: absolute;
        top: 10px;
        bottom: 10px;
        left: 0;
        width: 2px;
        border-radius: 2px;
        background: rgb(var(--card-accent));
        box-shadow: 0 0 10px rgba(var(--card-accent), 0.48);
    }

    .card:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 1px;
    }

    .card-year {
        font-family: 'Montserrat', sans-serif;
        font-size: 0.68rem;
        font-weight: 800;
        color: rgba(255, 255, 255, 0.28);
        min-width: 38px;
        flex-shrink: 0;
        position: relative;
        font-variant-numeric: tabular-nums;
        z-index: 1;
    }

    .card-year::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -12px;
        width: 7px;
        height: 7px;
        border: 2px solid #0b0b13;
        border-radius: 50%;
        background: rgba(var(--card-accent), 0.42);
        box-sizing: border-box;
        transform: translateY(-50%);
        transition: background 0.2s, box-shadow 0.2s;
    }

    .card-icon {
        font-size: 1.1rem;
        min-width: 36px;
        text-align: center;
        flex-shrink: 0;
    }

    .card-body {
        flex: 1;
        min-width: 0;
        display: block;
        position: relative;
        z-index: 1;
    }

    .card-title {
        display: block;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.78rem;
        font-weight: 700;
        line-height: 1.3;
    }

    .card-desc {
        display: block;
        font-size: 0.68rem;
        color: rgba(255, 255, 255, 0.38);
        margin-top: 1px;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card.active .card-year {
        color: rgba(var(--card-accent), 0.78);
    }

    .card.active .card-year::after {
        background: rgb(var(--card-accent));
        box-shadow: 0 0 9px rgba(var(--card-accent), 0.7);
    }

    .card.active .card-desc {
        color: rgba(255, 255, 255, 0.45);
    }

    .catalog-empty {
        padding: 44px 24px;
        color: rgba(255, 255, 255, 0.28);
        font-size: 0.72rem;
        line-height: 1.6;
        text-align: center;
    }

    .catalog-empty strong {
        display: block;
        color: rgba(255, 255, 255, 0.58);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.78rem;
        margin-bottom: 4px;
    }

    .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Reduced motion */
    @media (prefers-reduced-motion: reduce) {
        .preview-frame iframe { transition: none !important; }
        .preview-bar { transition: none !important; opacity: 1 !important; }
        .card,
        .catalog-search-input,
        .preview-nav-button { transition: none !important; }
    }

    /* Mobile */
    @media screen and (max-width: 768px) {
        .app-main {
            flex-direction: column;
        }

        .app-header {
            padding: 12px 16px;
        }

        .header-summary {
            display: none;
        }

        .preview-pane {
            flex: none;
            height: 36vh;
            height: 36dvh;
            padding: 12px;
        }

        .preview-frame {
            border-radius: 12px;
        }

        .preview-bar {
            opacity: 1;
            padding: 10px 16px;
        }

        .sidebar {
            flex: 1;
            min-width: 0;
            max-width: none;
            border-left: none;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
        }

        .sidebar::before {
            display: none;
        }

        .sidebar-scroll {
            padding: 8px;
        }

        .catalog-header {
            padding: 14px 14px 12px;
        }

        .catalog-heading {
            margin-bottom: 10px;
        }

        .section-divider {
            top: -8px;
        }

        .preview-step {
            display: none;
        }

        .card {
            padding: 10px;
        }

        .card::after {
            left: 56px;
        }
    }

    @media screen and (max-width: 480px) {
        .preview-pane {
            height: 34vh;
            height: 34dvh;
            padding: 8px;
        }

        .preview-bar {
            gap: 8px;
            padding: 9px 12px;
        }

        .preview-eyebrow {
            font-size: 0.5rem;
        }

        .preview-desc {
            display: none;
        }

        .preview-actions {
            gap: 4px;
        }

        .preview-open {
            padding: 6px 10px;
        }

        .catalog-row {
            gap: 8px;
            flex-wrap: wrap;
        }

        .catalog-filters {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            width: 100%;
        }

        .catalog-filter {
            justify-content: center;
            padding: 5px 7px;
        }

        .catalog-result {
            margin-left: auto;
        }

        .card-desc {
            display: none;
        }

        .card.active .card-desc {
            display: -webkit-box;
            margin-top: 3px;
            white-space: normal;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }
    }
