:root {
    --bg: #000000;
    --surface: #000000;
    --paper-empty: #171717;
    --surface-2: #111111;
    --fg: #f5f5f5;
    --muted: #b8b8b8;
    --accent: #ffffff;
    --accent-strong: #ffffff;
    --accent-light: #1d1d1d;
    --amber: #ffffff;
    --amber-soft: #1d1d1d;
    --clay: #ffffff;
    --clay-soft: #1d1d1d;
    --border: #2a2a2a;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
    --shadow-soft: 0 1px 0 rgba(0, 0, 0, 0.08);
    --sidebar-width: 220px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.65;
    padding-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.site-header + .container { padding-top: 42px; flex: 1 0 auto; width: 100%; }

/* Header */
.site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: #ffffff;
    color: var(--fg);
    padding: 24px 0;
    top: 0;
    z-index: 100;
    border-right: 1px solid var(--border);
    box-shadow: none;
}
.site-header .container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    align-items: start;
    gap: 24px;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0 22px;
}
.brand-link { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-strong); font-weight: 800; letter-spacing: 0; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; }
.logo-mark-svg { display: block; width: 100%; height: 100%; }
.site-header h1 { font-size: 1.02rem; line-height: 1.28; }
.site-header h1 a { color: var(--accent-strong); }
.site-header nav {
    display: grid;
    gap: 5px;
    align-content: start;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 0.94rem;
}
.site-header nav a {
    color: #2a2a2a;
    padding: 8px 0 6px;
    border-bottom: 1px solid transparent;
    border-radius: 4px;
    letter-spacing: 0.16em;
    font-weight: 800;
    line-height: 1.45;
}
.site-header nav a:hover {
    color: #000;
    background: transparent;
    border-bottom-color: #000;
}
.site-header nav a.is-active,
.site-header nav a[aria-current="page"] {
    color: #000;
    background: transparent;
    border-bottom-color: #000;
    box-shadow: none;
}
.site-header .search-box {
    position: relative;
    width: 100%;
    align-self: end;
    padding-bottom: 4px;
}
.site-header .search-box::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 2px solid #444;
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.site-header .search-box::after {
    content: "";
    position: absolute;
    left: 26px;
    top: 50%;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: #444;
    transform: translateY(5px) rotate(45deg);
    transform-origin: left center;
    pointer-events: none;
}
.site-header .search-box input,
.filter-bar input,
.filter-bar select {
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--fg);
    font: inherit;
    font-size: 0.92rem;
}
.site-header .search-box input {
    width: 100%;
    border-color: var(--border);
    background: #ffffff;
    border-radius: 999px;
    padding: 0 14px 0 42px;
}
.search-toggle {
    display: none;
}
.primary-link {
    height: 38px;
    padding: 0 14px;
    border: 1px solid #000;
    border-radius: 7px;
    background: #000;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}
.primary-link:hover { background: #333; color: #fff; }

/* Hero */
.hero {
    padding: 46px 0 34px;
}
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 32px;
    align-items: center;
}
.hero-kicker {
    color: var(--clay);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}
.hero h2 {
    max-width: 720px;
    color: var(--accent-strong);
    font-size: 2.35rem;
    line-height: 1.16;
    margin-bottom: 14px;
}
.hero h2 span { display: block; }
.hero-title-main { white-space: nowrap; }
.hero-title-sub { margin-top: 2px; }
.hero p { color: var(--muted); max-width: 650px; font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border-color: var(--accent); }
.primary-link:hover { background: var(--accent-strong); color: #fff; }
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(255,255,255,0.62);
    color: var(--accent-strong);
    font-weight: 700;
}
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; max-width: 560px; }
.stat {
    border-left: 3px solid var(--accent);
    padding: 8px 10px;
    background: rgba(255,255,255,0.58);
}
.stat strong { display: block; font-size: 1.22rem; color: var(--accent-strong); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.82rem; }
.hero-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    min-height: 380px;
}
.hero-gallery a {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.hero-gallery a:first-child { grid-row: span 2; }
.hero-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-gallery span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(0,0,0,0.82);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Browse sections */
.browse-section { margin-bottom: 38px; }
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 9px;
}
.browse-section h3,
.section-heading h3 {
    font-size: 1.22rem;
    color: var(--accent-strong);
}
.section-heading p { color: var(--muted); font-size: 0.86rem; }
.prose {
    max-width: 860px;
    display: grid;
    gap: 16px;
}
.prose-section {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}
.prose-section h3 { color: var(--accent-strong); margin-bottom: 8px; font-size: 1.08rem; }
.prose-section p,
.prose-section li { color: #222; font-size: 0.93rem; }
.prose-section ul { padding-left: 1.2rem; display: grid; gap: 5px; }
.note-box {
    border-left: 4px solid var(--accent);
    background: #f5f5f5;
    padding: 12px 14px;
    border-radius: 6px;
    color: #222;
}
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 14px;
    text-align: left;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: #111; }
.tile strong { color: var(--accent-strong); font-size: 1rem; }
.tile .count { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px; }
.portal-grid.class-order-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 16px;
}
.portal-card {
    position: relative;
    display: grid;
    grid-template-rows: minmax(230px, auto) auto;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.portal-card:hover { box-shadow: var(--shadow); border-color: #111; }
.portal-card::after {
    content: "";
    position: absolute;
    inset: -10px;
    z-index: 3;
    border: 10px solid #242424;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}
.portal-card:hover::after,
.portal-card:focus-visible::after {
    opacity: 1;
}
.portal-image { display: block; overflow: hidden; background: #f3f3f3; }
.portal-image img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: cover;
    transform: scale(1);
    transform-origin: center;
    transition: transform 0.28s ease;
}
.portal-card:hover .portal-image img,
.portal-card:focus-visible .portal-image img {
    transform: scale(1.08);
}
.portal-copy { display: grid; gap: 8px; padding: 18px 20px 20px; }
.portal-copy strong { color: var(--accent-strong); font-size: 1.04rem; line-height: 1.36; }
.portal-copy span { color: var(--muted); font-size: 0.82rem; line-height: 1.58; }
.class-order-grid .portal-card { grid-template-rows: auto 64px; }
.class-order-grid .portal-image {
    aspect-ratio: 3 / 4;
}
.class-order-grid .portal-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}
.class-order-grid .portal-copy {
    align-content: start;
    gap: 5px;
    min-height: 64px;
    padding: 12px 13px 14px;
}
.class-order-grid .portal-copy strong { font-size: 0.9rem; }
.class-order-grid .portal-copy span { font-size: 0.76rem; }
.portal-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(0,0,0,0.84);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}
.gallery-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 26px 0 18px;
}
.home-gallery-container { padding-top: 26px; }
.gallery-intro h2 { color: var(--accent-strong); font-size: 1.34rem; line-height: 1.2; }
.gallery-intro p { color: var(--muted); font-size: 0.9rem; margin-top: 3px; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--accent-strong);
    background: #fff;
    font-weight: 800;
    font-size: 0.84rem;
}
.species-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
.class-index-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    margin-top: 42px;
}
.species-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.class-index-grid .species-card {
    position: relative;
    overflow: visible;
}
.class-index-grid .species-card::after {
    content: "";
    position: absolute;
    inset: -10px;
    z-index: 3;
    border: 10px solid #242424;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}
.class-index-grid .species-card:hover::after,
.class-index-grid .species-card:focus-visible::after {
    opacity: 1;
}
.class-index-grid .species-card a.image-link {
    overflow: hidden;
}
.class-index-grid .species-card img {
    transform: scale(1);
    transform-origin: center;
    transition: transform 0.28s ease;
}
.class-index-grid .species-card:hover img,
.class-index-grid .species-card:focus-visible img {
    transform: scale(1.08);
}
.order-species-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}
.order-species-grid .species-card {
    position: relative;
    overflow: visible;
}
.order-species-grid .species-card::after {
    content: "";
    position: absolute;
    inset: -10px;
    z-index: 3;
    border: 10px solid #242424;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}
.order-species-grid .species-card:hover::after,
.order-species-grid .species-card:focus-visible::after {
    opacity: 1;
}
.order-species-grid .species-card a.image-link {
    overflow: hidden;
}
.order-species-grid .species-card img {
    transform: scale(1);
    transform-origin: center;
    transition: transform 0.28s ease;
}
.order-species-grid .species-card:hover img,
.order-species-grid .species-card:focus-visible img {
    transform: scale(1.08);
}
    .masonry-grid,
    .home-mosaic-grid,
    .pin-gallery {
        column-count: 3;
        column-gap: 16px;
    }
    @media (max-width: 1100px) {
        .species-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    }
    @media (max-width: 800px)  {
        .species-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .masonry-grid,
        .home-mosaic-grid,
        .pin-gallery { column-count: 2; }
    }
    @media (max-width: 500px)  {
        .masonry-grid,
        .home-mosaic-grid,
        .pin-gallery { column-gap: 10px; }
    }
    .pin-card {
        position: relative;
        display: block;
        break-inside: avoid;
        margin: 0 0 34px;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transition: none;
    }
    .pin-card:hover,
    .pin-card:focus-visible {
        transform: none;
        box-shadow: none;
        border-color: transparent;
        outline: 0;
    }
    .pin-card[hidden] { display: none !important; }
    .pin-image-frame {
        display: block;
        width: 100%;
        overflow: hidden;
        background: #f3f3f3;
    }
    .pin-card img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        object-fit: contain;
        background: #f3f3f3;
        transform: scale(1);
        transform-origin: center;
        transition: transform 0.75s ease;
    }
    .pin-card:not(.has-placeholder-image):hover img,
    .pin-card:not(.has-placeholder-image):focus-visible img {
        transform: scale(1.055);
    }
    .pin-card.has-placeholder-image {
        display: grid;
        grid-template-rows: 1fr auto;
        align-items: stretch;
        justify-items: stretch;
        min-height: 220px;
        background: transparent;
    }
    .pin-placeholder {
        display: block;
        width: 100%;
        aspect-ratio: 3 / 4;
        grid-area: 1 / 1;
        background: #242424;
    }
    .pin-card.has-placeholder-image img {
        display: none;
        grid-area: 1 / 1;
    }
    .pin-card.has-placeholder-image .placeholder-label {
        display: none;
        grid-area: 1 / 1;
        place-self: center;
        opacity: 1;
        color: rgba(255,255,255,0.34);
    }
    .pin-card.has-placeholder-image .pin-caption {
        grid-area: 2 / 1;
    }
    .pin-caption {
        display: grid;
        padding: 12px 4px 0;
        color: #fff;
        background: transparent;
        text-align: center;
    }
    .pin-caption strong {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.92rem;
        line-height: 1.3;
        font-weight: 700;
        letter-spacing: 0.12em;
        padding-left: 0.12em;
    }
    .pin-caption span {
        display: none;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: rgba(255,255,255,0.86);
        font-size: 0.82rem;
        line-height: 1.35;
    }
    .placeholder-label {
        z-index: 1;
        padding: 0 14px;
        color: #8a8a8a;
        font-size: clamp(0.92rem, 2vw, 1.22rem);
        line-height: 1.25;
        font-weight: 600;
        text-align: center;
        letter-spacing: 0;
    }
    .pin-sentinel {
        break-inside: avoid;
        height: 1px;
    }
    .related-section {
        position: relative;
        margin-top: 72px;
        padding-top: 0;
        border-top: 0;
    }
    .related-section::after { display: none; }
    .related-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 24px;
    }
    .related-section h3 {
        color: var(--accent-strong);
        font-size: clamp(1.35rem, 2.1vw, 2rem);
        line-height: 1.2;
        letter-spacing: 0;
    }
    .related-count {
        min-width: 64px;
        color: #fff;
        font-size: 1rem;
        line-height: 1;
        font-weight: 800;
        text-align: right;
    }
    .related-controls {
        pointer-events: none;
        position: absolute;
        left: max(-6vw, -96px);
        right: max(-6vw, -96px);
        top: calc(50% + 16px);
        z-index: 4;
        display: flex;
        justify-content: space-between;
        transform: translateY(-50%);
    }
    .related-control {
        pointer-events: auto;
        width: 54px;
        height: 54px;
        border: 0;
        border-radius: 999px;
        background: rgba(255,255,255,0.78);
        color: #050505;
        cursor: pointer;
        line-height: 1;
        display: grid;
        place-items: center;
        transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    }
    .related-control svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .related-control:hover,
    .related-control:focus-visible {
        background: #fff;
        color: #000;
        outline: 0;
    }
    .related-control[disabled] {
        opacity: 0.28;
        cursor: default;
    }
    .related-strip {
        display: flex;
        gap: clamp(28px, 4vw, 58px);
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding: 0 18vw 22px 0;
        scroll-behavior: smooth;
        scroll-padding-inline: 0;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .related-strip::-webkit-scrollbar { display: none; }
    .related-card {
        position: relative;
        display: block;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: #fff;
        text-decoration: none;
        scroll-snap-align: start;
        flex: 0 0 clamp(230px, 24vw, 380px);
        opacity: 0.38;
        transition: opacity 0.24s ease;
    }
    .related-card:hover,
    .related-card:focus-visible {
        outline: 0;
        border-color: transparent;
        box-shadow: none;
        opacity: 0.72;
    }
    .related-card.is-active {
        opacity: 1;
    }
    .related-image-frame {
        position: relative;
        display: grid;
        overflow: hidden;
        border: 0;
        background: #f4f4f4;
    }
    .related-card img,
    .related-card .placeholder-label,
    .related-placeholder {
        grid-area: 1 / 1;
    }
    .related-placeholder {
        display: block;
        width: 100%;
        aspect-ratio: 3 / 4;
        background: #242424;
    }
    .related-card img {
        display: block;
        width: 100%;
        aspect-ratio: 3 / 4;
        height: auto;
        object-fit: cover;
        filter: brightness(0.72);
        transition: filter 0.24s ease, transform 0.45s ease;
    }
    .related-card.is-active img,
    .related-card:hover img,
    .related-card:focus-visible img {
        filter: brightness(1);
    }
    .related-card:hover img,
    .related-card:focus-visible img {
        transform: scale(1.035);
    }
    .related-title {
        display: block;
        margin-top: 18px;
        color: #fff;
        font-size: clamp(0.98rem, 1.4vw, 1.24rem);
        line-height: 1.35;
        letter-spacing: 0;
        font-weight: 700;
        opacity: 0.78;
        transition: opacity 0.24s ease;
    }
    .related-card.is-active .related-title {
        opacity: 1;
    }
    .related-card.has-placeholder-image {
        display: grid;
        background: transparent;
    }
    .related-card.has-placeholder-image img,
    .related-card.has-placeholder-image .placeholder-label {
        display: none;
    }
    .related-card .pin-overlay {
        display: none;
    }
    .related-card .pin-overlay span { display: none; }
.species-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #111; }
.species-card a.image-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f3f3f3;
}
.species-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: cover;
    display: block;
}
.representative-badge {
    position: absolute;
    left: 9px;
    top: 9px;
    max-width: calc(100% - 18px);
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.84);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: none;
}
.species-card .card-body { padding: 12px 13px 14px; background: var(--surface); }
.species-card .card-body h4 { font-size: 1.04rem; margin-bottom: 2px; line-height: 1.42; }
.species-card .card-body h4 a { color: var(--accent-strong); }
.species-card .card-body .latin { font-size: 0.79rem; color: var(--muted); font-style: italic; min-height: 1.5em; }
.species-card .card-body .meta { font-size: 0.82rem; color: var(--muted); margin-top: 5px; }
.gallery-card .card-body { padding: 10px 11px 12px; }
.gallery-card .card-body h4 { margin-bottom: 0; }
.species-card .card-body .tags:empty,
.gallery-card .card-body .tags:empty { display: none; }
.species-card .card-body .tags,
.tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.73rem;
    line-height: 1.2;
    font-weight: 700;
}
.badge-category { background: var(--accent-light); color: var(--accent-strong); }
.badge-protection { background: #f3f3f3; color: #111; }
.badge-endemic { background: #f3f3f3; color: #111; }
.badge-pending { background: #f0f0f0; color: #555; }
.badge-rarity { background: #f3f3f3; color: #111; }
.art-chip-rarity { background: #f3f3f3; color: #111; }
mark {
    background: #fff;
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Filter bar */
.filter-bar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: auto minmax(120px, 150px) auto minmax(95px, 120px) auto minmax(95px, 130px) auto minmax(130px, 160px);
    gap: 9px 10px;
    align-items: center;
    box-shadow: var(--shadow-soft);
}
.filter-reset {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(255,255,255,0.68);
    color: var(--accent-strong);
    cursor: pointer;
    font-weight: 700;
}
.filter-reset:hover { background: var(--accent-light); }
.filter-bar label { font-weight: 800; font-size: 0.84rem; color: var(--accent-strong); }
.filter-bar select { padding: 0 9px; }
.filter-bar .text-search { min-width: 0; }
.filter-bar .text-search { grid-column: 1 / -2; }
.filter-bar .text-search input { width: 100%; padding: 0 12px; }
.result-count { font-size: 0.88rem; color: var(--muted); margin-bottom: 13px; font-weight: 700; }
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.load-more-wrap { display: flex; justify-content: center; margin: 24px 0 4px; }
.load-more {
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--accent);
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}
.load-more:hover { background: var(--accent-strong); }

/* Species detail page */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}
.detail-image { min-width: 0; width: 100%; }
.detail-image picture { display: block; width: 100%; }
.detail-image img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: initial;
    border-radius: 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.detail-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 26px;
}
.mobile-detail-info {
    display: none;
}
.detail-info-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 0.84rem;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}
.detail-info-button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.detail-info-button:hover,
.detail-info-button:focus-visible {
    background: #fff;
    color: #000;
    outline: 0;
}
.detail-info-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 28px;
    background: rgba(0,0,0,0.82);
    align-items: center;
    justify-content: center;
}
.detail-info-modal.is-open {
    display: block;
}
.detail-info-panel {
    position: fixed;
    left: 50vw;
    top: 50vh;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
    width: 94vw;
    max-width: 1460px;
    height: 88vh;
    max-height: 900px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background: #f3f3f3;
    color: #111;
    box-shadow: 0 26px 80px rgba(0,0,0,0.34);
}
.order-preview-panel {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    max-width: 1680px;
}
.order-preview-modal {
    padding: 16px;
}
.order-preview-panel {
    grid-template-columns: var(--order-preview-copy-width, 400px) var(--order-preview-art-width, 720px);
    width: auto;
    max-width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    max-height: none;
    background: #fff;
}
.detail-modal-copy {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 44px 34px 36px;
    background: #fff;
}
.detail-modal-art {
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px;
    background: #f1f1f1;
}
.detail-modal-art picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
}
.detail-modal-art img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(88vh - 88px);
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.order-preview-panel .detail-modal-art {
    position: relative;
    width: var(--order-preview-art-width, 720px);
    padding: 0;
    background: #fff;
}
.order-preview-panel .detail-modal-art img {
    width: var(--order-preview-image-width, auto);
    height: var(--order-preview-image-height, auto);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.order-preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.78);
    color: #050505;
    line-height: 1;
    cursor: pointer;
    z-index: 10001;
    display: grid;
    place-items: center;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.order-preview-nav svg {
    width: 29px;
    height: 29px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.order-preview-nav:hover,
.order-preview-nav:focus-visible {
    background: #fff;
    border-color: #fff;
    color: #000;
    outline: 0;
}
.order-preview-nav.prev {
    left: max(18px, calc(50% - (var(--order-preview-panel-width, 1040px) / 2) - 72px));
}
.order-preview-nav.next {
    right: max(18px, calc(50% - (var(--order-preview-panel-width, 1040px) / 2) - 72px));
}
.detail-info-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(0,0,0,0.72);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.detail-info-close:hover,
.detail-info-close:focus-visible {
    background: #000;
    color: #fff;
    outline: 0;
}
.detail-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.detail-kicker { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.art-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
}
.detail-body h2 { font-size: 2.18rem; line-height: 1.18; margin-bottom: 8px; color: var(--accent-strong); }
.detail-body .latin { font-size: 1.05rem; color: var(--muted); font-style: italic; margin-bottom: 3px; line-height: 1.5; }
.detail-body .english { font-size: 0.88rem; color: var(--muted); margin-bottom: 20px; line-height: 1.5; letter-spacing: 0.04em; text-transform: uppercase; }
.detail-modal-trigger { cursor: zoom-in; }
.detail-info-panel .art-chip {
    background: #fff;
    color: #222;
    border-color: #d8d8d8;
}
.detail-section-grid { display: grid; gap: 14px; margin-top: 20px; }
.art-note {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.art-note h3,
.quiet-facts h3 {
    color: var(--accent-strong);
    font-size: 0.82rem;
    line-height: 1.6;
    letter-spacing: 0.08em;
    font-weight: 800;
    margin-bottom: 10px;
}
.art-note p {
    color: #222;
    font-size: 1rem;
    line-height: 2.05;
}
.taxonomy-line {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
    margin: 18px 0 0;
}
.quiet-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.quiet-fact {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.quiet-fact .label {
    flex: 0 0 auto;
    color: #777;
    font-size: 0.74rem;
    line-height: 1.7;
    font-weight: 700;
}
.quiet-fact .value {
    min-width: 0;
    color: #333;
    font-size: 0.88rem;
    line-height: 1.9;
}
.visual-summary { display: grid; gap: 12px; margin-top: 18px; }
.info-block {
    margin-bottom: 16px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.info-block.full { grid-column: 1 / -1; }
.info-block.emphasis { border-color: #111; background: #f7f7f7; }
.info-block.visual-primary { border-color: #111; background: #f7f7f7; }
.info-block h4 { font-size: 0.93rem; color: var(--accent-strong); margin-bottom: 8px; }
.info-block p { font-size: 0.9rem; color: #222; }
.info-grid { display: grid; grid-template-columns: 92px 1fr; gap: 7px 16px; font-size: 0.9rem; }
.info-grid .label { color: var(--muted); }
.info-grid .value { font-weight: 700; color: var(--fg); }

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
    background: #f3f3f3;
    color: #222;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
}
.fact-drawer {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.fact-drawer summary {
    cursor: pointer;
    padding: 13px 15px;
    color: var(--accent-strong);
    font-weight: 800;
    list-style-position: inside;
}
.fact-drawer .detail-section-grid { padding: 0 14px 14px; margin-top: 0; }

.page-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    margin: 30px 0 22px;
}
.page-titlebar h2 {
    margin: 0;
    color: #fff;
    font-size: 1.22rem;
    line-height: 1.25;
    font-weight: 900;
}
.page-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #383838;
    border-radius: 4px;
    background: #111;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.page-back:hover {
    border-color: #fff;
    color: #fff;
}
.page-back svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.breadcrumb-nav {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 28px 0 4px;
    padding: 14px 0 0;
    border: 0;
    border-top: 1px solid #222;
    border-radius: 0;
    background: transparent;
    color: #8b8b8b;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
}
.breadcrumb-nav a,
.breadcrumb-nav span {
    color: #8b8b8b;
}
.breadcrumb-nav a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 700;
}
.breadcrumb-nav a:hover {
    color: #fff;
}
.breadcrumb-separator {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}
.page-header {
    margin: -6px 0 24px;
}
.container > .page-header:first-child {
    margin-top: 30px;
}
.page-header h2 {
    color: var(--accent-strong);
    font-size: 1.78rem;
    line-height: 1.32;
    margin-bottom: 12px;
}
.page-header p {
    color: var(--fg);
    font-size: 1rem;
    line-height: 1.78;
    max-width: 760px;
}
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.quick-card {
    display: block;
    padding: 16px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: #111; }
.quick-card strong { display: block; color: var(--accent-strong); font-size: 1rem; }
.quick-card span { color: var(--muted); font-size: 0.82rem; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.status-card {
    padding: 16px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.status-card strong { display: block; color: var(--accent-strong); font-size: 1.5rem; line-height: 1.1; }
.status-card span { color: var(--muted); font-size: 0.84rem; }
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.status-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.status-table th,
.status-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: 0.88rem;
}
.status-table th { color: var(--accent-strong); background: #f5f5f5; font-weight: 800; }
.status-table tr:last-child td { border-bottom: 0; }
.status-table .latin { color: var(--muted); font-style: italic; font-size: 0.8rem; }
.status-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.detail-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: auto;
    padding-top: 42px;
}
.detail-nav a {
    color: var(--accent-strong);
    line-height: 1.7;
    font-size: 0.92rem;
}
.detail-nav a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.detail-nav .next { text-align: right; }
.detail-nav small { display: block; color: rgba(104,117,110,0.68); font-size: 0.66rem; line-height: 1.7; letter-spacing: 0.1em; }
.taxonomy-links { column-count: 2; list-style: none; padding: 0; font-size: 0.9rem; }

.same-cat-nav { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.same-cat-nav h4 { margin-bottom: 10px; color: var(--accent-strong); }
.same-cat-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.same-cat-nav li a {
    display: inline-flex;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.62);
    font-size: 0.84rem;
}

.detail-modal-trigger:focus-visible,
.detail-info-button:focus-visible,
.site-header .search-box input:focus-visible,
.filter-reset:focus-visible,
.load-more:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
}

/* Footer */
.site-footer {
    margin-top: 54px;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 0.84rem;
    color: var(--muted);
    flex-shrink: 0;
}
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    color: #000;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.back-to-top:hover,
.back-to-top:focus-visible {
    background: #fff;
    outline: 0;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    margin-bottom: 8px;
}
.footer-links a {
    color: var(--accent-strong);
    font-weight: 700;
}

/* Modern monochrome museum skin */
body {
    background: #000;
    color: #f5f5f5;
    padding-left: 0;
}
a { color: #fff; }
a:hover { color: #d8d8d8; }
.container {
    max-width: 1240px;
}
.detail-container {
    max-width: 1420px;
}
.site-header + .container {
    padding-top: 42px;
}
.site-header {
    position: sticky;
    inset: auto;
    width: auto;
    background: #000;
    color: #fff;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid #2a2a2a;
}
.site-header .container {
    display: grid;
    grid-template-columns: minmax(220px, auto) 1fr minmax(220px, 300px);
    grid-template-rows: auto;
    align-items: center;
    gap: 28px;
    height: auto;
    max-width: 1440px;
    margin: 0 auto;
    padding: 26px 32px;
}
.brand-link {
    gap: 0;
    color: #fff;
    font-weight: 800;
}
.site-header h1 a {
    color: #fff;
}
.brand-mark,
.logo-mark-svg {
    display: none;
}
.site-header nav {
    display: flex;
    justify-content: center;
    gap: 38px;
    padding-top: 0;
    border-top: 0;
}
.site-header nav a {
    color: rgba(255,255,255,0.72);
    padding: 10px 0 8px;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    letter-spacing: 0.16em;
    font-weight: 800;
}
.site-header nav a:hover {
    color: #fff;
    background: transparent;
    border-bottom-color: #fff;
}
.site-header nav a.is-active,
.site-header nav a[aria-current="page"] {
    color: #fff;
    background: transparent;
    border-bottom-color: #fff;
    box-shadow: none;
}
.site-header .search-box::before {
    border-color: rgba(255,255,255,0.76);
}
.site-header .search-box::after {
    background: rgba(255,255,255,0.76);
}
.site-header .search-box input {
    color: #fff;
    background: #000;
    border-color: rgba(255,255,255,0.38);
}
.site-header .search-box input::placeholder {
    color: rgba(255,255,255,0.58);
}
.site-header .search-box {
    justify-self: end;
    width: 40px;
    height: 40px;
    padding-bottom: 0;
    display: grid;
    place-items: center;
}
.site-header .search-box::before,
.site-header .search-box::after {
    display: none;
}
.search-toggle {
    position: static;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    border-radius: 0;
    transform: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}
.search-toggle:hover,
.search-toggle:focus-visible {
    color: rgba(255,255,255,0.76);
    outline: 0;
}
.search-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
}
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.search-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(3px);
}
.search-panel {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 64px));
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 26px;
    background: rgba(24,24,24,0.94);
    box-shadow: 0 28px 90px rgba(0,0,0,0.44);
    overflow: hidden;
    transform: translateY(16px) scale(0.985);
    transition: transform 0.2s ease;
}
.search-modal.is-open .search-panel {
    transform: translateY(0) scale(1);
}
.search-panel-top {
    display: grid;
    grid-template-columns: 28px 1fr 36px;
    align-items: center;
    gap: 18px;
    min-height: 92px;
    padding: 18px 30px;
}
.search-panel-top svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
}
.search-panel-icon {
    color: rgba(255,255,255,0.82);
}
.search-panel input {
    width: 100%;
    height: 46px;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: clamp(1.05rem, 2vw, 1.48rem);
    line-height: 1.2;
    outline: 0;
}
.search-panel input::placeholder {
    color: rgba(255,255,255,0.36);
}
.search-panel input::-webkit-search-cancel-button,
.search-panel input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
.search-panel input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}
.search-modal-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255,255,255,0.76);
    cursor: pointer;
}
.search-modal-close:hover,
.search-modal-close:focus-visible {
    color: #fff;
    background: rgba(255,255,255,0.08);
    outline: 0;
}
.page-header h2,
.browse-section h3,
.section-heading h3,
.gallery-intro h2,
.related-section h3,
.detail-body h2,
.art-note h3,
.quiet-facts h3,
.portal-copy strong,
.species-card .card-body h4 a,
.quick-card strong,
.status-card strong,
.footer-links a {
    color: #fff;
}
.page-header p,
.gallery-intro p,
.section-heading p,
.portal-copy span,
.species-card .card-body .latin,
.species-card .card-body .meta,
.prose-section p,
.prose-section li,
.art-note p,
.info-block p,
.info-grid .label,
.quiet-fact .label,
.status-table .latin,
.taxonomy-line,
.detail-body .latin,
.detail-body .english,
.quiet-fact .label,
.quiet-fact .value,
.status-card span,
.site-footer,
.result-count {
    color: #b8b8b8;
}
.prose-section p,
.prose-section li,
.art-note p,
.info-block p,
.quiet-fact .value,
.info-grid .value {
    color: #e6e6e6;
}
.prose-section,
.tile,
.portal-card,
.species-card,
.pin-card,
.related-card,
.filter-bar,
.info-block,
.fact-drawer,
.quick-card,
.status-card,
.table-wrap,
.site-footer {
    background: #000;
    color: #f5f5f5;
}
.species-card .card-body,
.gallery-card .card-body {
    background: #000;
}
.class-index-grid .species-card .card-body {
    background: #242424;
}
.order-species-grid .species-card .card-body {
    background: #242424;
}
.portal-copy {
    background: #242424;
}
.filter-bar input,
.filter-bar select,
.filter-bar .text-search input {
    background: #000;
    border-color: #3a3a3a;
    color: #f5f5f5;
}
.filter-bar label {
    color: #fff;
}
.status-table th {
    background: #111;
    color: #fff;
}
.status-table td {
    color: #e6e6e6;
}
.prose-section,
.tile,
.portal-card,
.species-card,
.pin-card,
.related-card,
.filter-bar,
.info-block,
.fact-drawer,
.quick-card,
.status-card,
.table-wrap {
    border-radius: 0;
    box-shadow: none;
}
.hero-gallery a,
.detail-image img,
.return-link,
.primary-link,
.secondary-link,
.text-link,
.filter-reset,
.load-more,
.badge,
.art-chip,
.tag {
    border-radius: 0;
}
.species-card,
.pin-card,
.portal-card,
.related-card,
.prose-section,
.filter-bar,
.quick-card,
.status-card,
.table-wrap {
    border-color: #2a2a2a;
}
.species-card:hover,
.quick-card:hover,
.tile:hover {
    border-color: #000;
    outline: 1px solid #fff;
    box-shadow: none;
}
.portal-card:hover,
.portal-card:focus-visible {
    border-color: #242424;
    outline: 0;
    box-shadow: none;
}
.class-index-grid .species-card:hover,
.class-index-grid .species-card:focus-visible,
.order-species-grid .species-card:hover,
.order-species-grid .species-card:focus-visible {
    transform: none;
    border-color: #242424;
    outline: 0;
    box-shadow: none;
}
.portal-image,
.pin-card img,
.species-card a.image-link,
.detail-image img {
    background: #f4f4f4;
}
.pin-card {
    background: transparent;
}
.related-card,
.related-card:hover,
.related-card:focus-visible {
    background: transparent;
    border: 0;
    outline: 0;
    box-shadow: none;
}
.related-card > .related-title {
    display: block;
    margin-top: 18px;
    padding: 0;
    background: transparent;
    color: #e8e8e8;
    font-size: clamp(0.98rem, 1.4vw, 1.24rem);
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: 0;
}
.badge,
.art-chip,
.tag {
    background: #000;
    border: 1px solid #3a3a3a;
    color: #f5f5f5;
}
.primary-link,
.load-more {
    background: #fff;
    border-color: #fff;
    color: #000;
}
.primary-link:hover,
.load-more:hover {
    background: #d8d8d8;
    border-color: #d8d8d8;
    color: #000;
}
.secondary-link,
.text-link,
.filter-reset,
.return-link {
    background: #000;
    border-color: #4a4a4a;
    color: #fff;
}
.secondary-link:hover,
.text-link:hover,
.filter-reset:hover,
.return-link:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}
.related-section .related-control {
    border-radius: 999px;
    background: rgba(255,255,255,0.78);
    border: 0;
    color: #050505;
}
.related-section .related-control:hover,
.related-section .related-control:focus-visible {
    background: #fff;
    border: 0;
    color: #000;
}
.pin-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.34) 44%, rgba(0,0,0,0.88) 100%);
}
.related-card .pin-overlay {
    display: none;
}
.site-footer {
    background: #000;
    border-top-color: #2a2a2a;
}
.detail-info-panel .detail-body h2,
.detail-info-panel .art-note h3,
.detail-info-panel .quiet-facts h3 {
    color: #111;
}
.detail-info-panel .art-note p,
.detail-info-panel .quiet-fact .value {
    color: #222;
}
.detail-info-panel .taxonomy-line,
.detail-info-panel .detail-body .latin,
.detail-info-panel .detail-body .english,
.detail-info-panel .quiet-fact .label {
    color: #666;
}
.detail-info-panel .art-note,
.detail-info-panel .quiet-facts {
    border-top-color: #d7d7d7;
}
.detail-info-panel .art-chip {
    border-radius: 0;
}

/* No results */
.no-results { text-align: center; padding: 30px; color: var(--muted); }

/* Responsive */
@media (max-width: 1280px) {
    .detail-info-modal {
        padding: 16px;
        overflow: auto;
    }
    .detail-info-panel {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        width: min(900px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        height: auto;
        min-height: 0;
        max-height: none;
        margin: 0 auto;
        overflow: visible;
    }
    .detail-info-panel .detail-modal-art {
        order: 1;
        width: 100%;
        min-height: 0;
        padding: 0;
    }
    .detail-info-panel .detail-modal-art picture {
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
    }
    .detail-info-panel .detail-modal-art img {
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: none;
        object-fit: contain;
    }
    .detail-info-panel .detail-modal-copy {
        order: 2;
        max-height: none;
        overflow: visible;
        padding: 30px 28px 34px;
    }
    .order-preview-modal {
        padding: 16px;
    }
    .order-preview-panel {
        grid-template-columns: 1fr;
    }
    .order-preview-panel .detail-modal-art {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    body { padding-left: 0; }
    .site-header {
        position: sticky;
        inset: auto;
        width: auto;
        padding: 13px 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: none;
    }
    .site-header + .container { padding-top: 24px; }
    .site-header .container {
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-areas:
            "brand search"
            "nav nav";
        align-items: center;
        gap: 13px 14px;
        height: auto;
        max-width: 1180px;
        margin: 0 auto;
        padding: 14px 24px 16px;
    }
    .site-header h1 { grid-area: brand; min-width: 0; line-height: 1; }
    .site-header h1 a { min-height: 44px; align-items: center; }
    .site-header nav {
        grid-area: nav;
        display: flex;
        justify-content: center;
        gap: clamp(44px, 16vw, 80px);
        flex-wrap: nowrap;
        padding-top: 0;
        border-top: 0;
    }
    .site-header nav a {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 0;
    }
    .site-header nav a.is-active,
    .site-header nav a[aria-current="page"] { box-shadow: none; }
    .site-header .search-box {
        grid-area: search;
        width: 44px;
        height: 44px;
        max-width: none;
        align-self: center;
        justify-self: end;
    }
    .search-toggle {
        width: 44px;
        height: 44px;
    }
    .search-modal {
        place-items: start center;
        padding: 112px 18px 24px;
    }
    .search-panel {
        width: min(720px, calc(100vw - 36px));
        border-radius: 20px;
        transform: translateY(18px) scale(0.985);
    }
    .search-panel-top {
        grid-template-columns: 24px 1fr 40px;
        gap: 12px;
        min-height: 72px;
        padding: 14px 16px;
    }
    .search-panel input {
        height: 44px;
        font-size: 1rem;
    }
    .search-modal-close {
        width: 40px;
        height: 40px;
    }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-gallery { min-height: 300px; }
    .filter-bar { grid-template-columns: auto 1fr; }
    .filter-bar .text-search { grid-column: 1 / -1; }
    .filter-reset { grid-column: 1 / -1; }
    .list-toolbar { align-items: flex-start; flex-direction: column; }
    .detail-layout { grid-template-columns: 1fr; min-height: 0; align-items: start; }
    .detail-actions { display: none; }
    .detail-image { position: static; height: auto; }
    .detail-image picture { height: auto; }
    .detail-image img { height: auto; max-height: none; width: 100%; max-width: none; margin: 0; display: block; }
    .detail-modal-trigger { cursor: default; }
    .mobile-detail-info {
        display: block;
        margin-top: 26px;
        padding: 0 0 12px;
    }
    .mobile-detail-info .detail-body {
        display: block;
    }
    .mobile-detail-info .detail-kicker {
        margin-bottom: 18px;
    }
    .detail-info-modal { padding: 14px; }
    .detail-info-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        width: 100%;
        max-width: 760px;
        height: 92vh;
        max-height: 900px;
    }
    .detail-modal-copy {
        max-height: 42vh;
        padding: 34px 24px 26px;
    }
    .detail-modal-art {
        min-height: 0;
        padding: 18px;
    }
    .detail-modal-art img { max-height: calc(50vh - 40px); }
    .detail-info-panel {
        grid-template-rows: auto auto;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .detail-info-panel .detail-modal-copy {
        max-height: none;
        overflow: visible;
    }
    .detail-info-panel .detail-modal-art {
        width: 100%;
        padding: 0;
    }
    .detail-info-panel .detail-modal-art img {
        max-height: none;
    }
    .order-preview-nav {
        display: none;
    }
    .detail-section-grid { grid-template-columns: 1fr; }
    .detail-body { min-height: 0; padding-top: 0; display: block; }
    .related-section { min-height: 0; margin-top: 42px; padding-top: 24px; }
    .related-section::after { top: 64px; width: 42px; }
    .related-heading { align-items: flex-start; }
    .related-controls { display: none; }
    .related-strip { grid-auto-columns: clamp(150px, 62vw, 210px); padding-right: 18vw; }
    .species-grid.order-species-grid,
    .portal-grid.class-order-grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px 12px;
    }
    .order-species-grid .species-card::after {
        display: none;
    }
    .gallery-intro { align-items: flex-start; flex-direction: column; }
    .gallery-actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
    .container { padding: 0 18px; }
    .site-header .container {
        padding: 12px 18px 14px;
        gap: 11px 12px;
    }
    .site-header nav {
        gap: clamp(38px, 15vw, 64px);
    }
    .site-header nav a {
        min-height: 38px;
        font-size: 0.9rem;
    }
    .search-modal {
        padding-top: 104px;
    }
    .search-panel {
        width: calc(100vw - 28px);
        border-radius: 18px;
    }
    .search-panel-top {
        grid-template-columns: 22px 1fr 38px;
        gap: 10px;
        min-height: 68px;
        padding: 12px 13px;
    }
    .search-panel-top svg {
        width: 22px;
        height: 22px;
    }
    .hero { padding-top: 30px; }
    .hero h2 { font-size: 1.8rem; }
    .hero-title-main { white-space: normal; }
    .hero-stats { grid-template-columns: 1fr; }
    .hero-gallery { grid-template-columns: 1fr; min-height: 0; }
    .hero-gallery a:first-child { grid-row: auto; }
    .hero-gallery a { aspect-ratio: 4 / 3; }
    .detail-info-modal { padding: 10px; }
    .detail-info-panel {
        height: calc(100vh - 20px);
    }
    .detail-modal-copy {
        max-height: 46vh;
        padding: 28px 18px 22px;
    }
    .detail-modal-art { padding: 12px; }
    .detail-modal-art img { max-height: calc(50vh - 34px); }
    .detail-info-panel {
        height: auto;
        max-height: none;
    }
    .detail-info-panel .detail-modal-copy {
        max-height: none;
    }
    .detail-info-panel .detail-modal-art {
        width: 100%;
        padding: 0;
    }
    .detail-info-panel .detail-modal-art img {
        max-height: none;
    }
    .detail-info-close {
        right: 12px;
        top: 12px;
        width: 34px;
        height: 34px;
    }
    .quiet-facts { grid-template-columns: 1fr; gap: 10px; }
    .portal-grid,
    .species-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .class-index-grid { margin-top: 32px; }
    .portal-grid.class-order-grid,
    .species-grid.order-species-grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px 10px;
    }
    .masonry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .masonry-grid .gallery-featured { grid-column: span 1; }
    .class-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .class-overview-grid .portal-card:nth-child(3n + 1) { grid-row: auto; }
    .portal-card { grid-template-rows: auto auto; }
    .portal-copy { gap: 5px; padding: 13px 12px 15px; }
    .portal-copy strong,
    .species-card .card-body h4 { font-size: 0.92rem; }
    .portal-copy span,
    .species-card .card-body .meta,
    .species-card .card-body .latin { font-size: 0.72rem; }
    .page-titlebar { margin: 20px 0 16px; gap: 9px; }
    .page-titlebar h2 { font-size: 1.04rem; line-height: 1.3; }
    .page-back { width: 32px; height: 32px; }
    .breadcrumb-nav { margin: 20px 0 2px; padding-top: 12px; font-size: 0.68rem; gap: 5px; }
    .page-header { margin: -4px 0 20px; }
    .container > .page-header:first-child { margin-top: 24px; }
    .page-header h2 { font-size: 1.48rem; line-height: 1.35; margin-bottom: 9px; }
    .page-header p { font-size: 0.9rem; line-height: 1.7; }
    .detail-body h2 { font-size: 1.72rem; }
    .detail-body .english { margin-bottom: 18px; }
    .art-note p { font-size: 0.94rem; line-height: 1.82; }
    .quiet-facts { grid-template-columns: 1fr; gap: 10px; }
    .species-card .card-body .tags { display: none; }
    .tile-grid { grid-template-columns: 1fr 1fr; }
    .detail-nav { grid-template-columns: 1fr; margin-top: 42px; padding-top: 0; }
    .detail-nav .next { text-align: left; }
    .back-to-top { right: 14px; bottom: 14px; min-height: 38px; padding: 0 11px; }
}
