:root {
    --fk-bg: #f6f8f7;
    --fk-surface: #ffffff;
    --fk-surface-muted: #edf4f1;
    --fk-text: #17211d;
    --fk-muted: #5d6c66;
    --fk-border: #d8e2de;
    --fk-accent: #087d7a;
    --fk-accent-strong: #075f5d;
    --fk-warm: #b56f26;
    --fk-shadow: 0 18px 45px rgba(23, 33, 29, 0.08);
    --fk-radius: 8px;
    --fk-wrap: min(1180px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--fk-bg);
    color: var(--fk-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: var(--fk-accent-strong);
}

a:hover,
a:focus {
    color: var(--fk-warm);
}

img {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--fk-border);
    text-align: left;
    vertical-align: top;
}

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

.screen-reader-text:focus {
    position: fixed;
    z-index: 100000;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    clip: auto;
    background: var(--fk-surface);
    border: 2px solid var(--fk-accent);
    border-radius: var(--fk-radius);
}

.site-header,
.site-footer {
    background: var(--fk-surface);
    border-bottom: 1px solid var(--fk-border);
}

.site-footer {
    border-top: 1px solid var(--fk-border);
    border-bottom: 0;
}

.site-header__inner,
.site-footer__inner,
.fk-wrap {
    width: var(--fk-wrap);
    margin-inline: auto;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding-block: 0.75rem;
}

.site-brand {
    display: inline-flex;
    flex-direction: column;
    color: var(--fk-text);
    text-decoration: none;
}

.site-brand__name {
    font-weight: 800;
    line-height: 1.1;
}

.site-brand__tagline {
    color: var(--fk-muted);
    font-size: 0.875rem;
}

.site-nav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    color: var(--fk-text);
    font-weight: 650;
    text-decoration: none;
}

.site-main {
    min-height: 70vh;
}

.site-footer__inner {
    padding-block: 1.25rem;
    color: var(--fk-muted);
}

.fk-page-hero,
.fk-species-hero {
    padding-block: clamp(2.5rem, 5vw, 5rem);
    background: linear-gradient(180deg, #ffffff 0%, #edf4f1 100%);
    border-bottom: 1px solid var(--fk-border);
}

.fk-species-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.fk-kicker {
    margin: 0 0 0.4rem;
    color: var(--fk-accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.fk-page-title,
.fk-species-title {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    line-height: 0.98;
}

.fk-page-intro,
.fk-species-intro {
    max-width: 68ch;
    margin-top: 1rem;
    color: var(--fk-muted);
    font-size: 1.05rem;
}

.fk-species-hero__media {
    margin: 0;
}

.fk-species-hero__image,
.fk-species-hero__placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius);
    background:
        linear-gradient(135deg, rgba(8, 125, 122, 0.18), rgba(181, 111, 38, 0.14)),
        var(--fk-surface-muted);
}

.fk-species-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 1.5rem;
    padding-block: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.fk-species-layout__primary,
.fk-content-flow {
    display: grid;
    gap: 1.5rem;
}

.fk-species-layout__aside {
    position: sticky;
    top: 1rem;
}

.fk-panel {
    padding: clamp(1rem, 2.4vw, 1.5rem);
    background: var(--fk-surface);
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius);
    box-shadow: var(--fk-shadow);
}

.fk-panel__header {
    margin-bottom: 1rem;
}

.fk-panel__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    line-height: 1.15;
}

.fk-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--fk-border);
}

.fk-tabs__link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.45rem 0.75rem;
    color: var(--fk-text);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    background: var(--fk-surface-muted);
    border: 1px solid transparent;
    border-radius: var(--fk-radius);
    cursor: pointer;
}

.fk-tabs__link:hover,
.fk-tabs__link:focus,
.fk-tabs__link.is-active {
    color: var(--fk-accent-strong);
    border-color: var(--fk-accent);
    background: #ffffff;
}

.fk-tabs__link:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.fk-shortcode-output > *:first-child,
.fk-guide-output > *:first-child {
    margin-top: 0;
}

.fk-shortcode-output > *:last-child,
.fk-guide-output > *:last-child {
    margin-bottom: 0;
}

.fk-shortcode-output h2,
.fk-shortcode-output h3 {
    line-height: 1.2;
}

.fk-shortcode-output p,
.fk-shortcode-output li {
    max-width: 78ch;
}

.fk-shortcode-output pre {
    overflow-x: auto;
}

.fk-shortcode-output iframe,
.fk-shortcode-output canvas,
.fk-shortcode-output svg {
    max-width: 100%;
}

.fk-page-shell .fk-content-flow {
    padding-block: clamp(1.5rem, 4vw, 3rem);
}

.fk-species-prototype {
    background: #f7fbfa;
}

.fk-species-prototype :where(a, p, li, dd, dt, th, td, caption, figcaption, small, span, strong, b, code) {
    overflow-wrap: break-word;
}

.fk-species-prototype :where(pre, code) {
    max-width: 100%;
}

.fk-species-prototype pre {
    overflow-x: auto;
}

.fk-prototype-hero {
    padding-block: clamp(1rem, 2.5vw, 2rem);
    background:
        radial-gradient(circle at 18% 0%, rgba(31, 190, 190, 0.16), transparent 34rem),
        linear-gradient(180deg, #ffffff 0%, #eef8f7 100%);
    border-bottom: 1px solid var(--fk-border);
}

.fk-prototype-hero__inner {
    display: grid;
    gap: 0.9rem;
}

.fk-prototype-label {
    display: inline-flex;
    justify-self: start;
    padding: 0.25rem 0.55rem;
    color: var(--fk-accent-strong);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(8, 125, 122, 0.08);
    border: 1px solid rgba(8, 125, 122, 0.18);
    border-radius: 999px;
}

.fk-prototype-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.fk-prototype-identity-row {
    display: grid;
    gap: 0.9rem;
}

.fk-prototype-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 1.25rem;
    padding-block: clamp(1.25rem, 3vw, 2.5rem);
    align-items: start;
}

.fk-prototype-main,
.fk-prototype-aside {
    display: grid;
    gap: 1rem;
}

.fk-prototype-aside {
    position: sticky;
    top: 1rem;
}

.fk-prototype-section,
.fk-prototype-module {
    background: var(--fk-surface);
    border: 1px solid var(--fk-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(23, 33, 29, 0.06);
}

.fk-prototype-section {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.fk-prototype-module {
    margin-top: 0.75rem;
    padding: 0.9rem;
}

.fk-prototype-section__title,
.fk-prototype-module__title {
    margin: 0 0 0.75rem;
    color: var(--fk-text);
    line-height: 1.2;
}

.fk-prototype-section__title {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.fk-prototype-module__title {
    font-size: 1rem;
}

.fk-prototype-output > *:first-child {
    margin-top: 0;
}

.fk-prototype-output > *:last-child {
    margin-bottom: 0;
}

.fk-prototype-hero__inner,
.fk-prototype-identity-row,
.fk-prototype-layout,
.fk-prototype-main,
.fk-prototype-aside,
.fk-prototype-section,
.fk-prototype-module,
.fk-prototype-media,
.fk-prototype-meta > *,
.fk-prototype-layout > *,
.fk-prototype-output {
    max-width: 100%;
    min-width: 0;
}

.fk-prototype-output p,
.fk-prototype-output li {
    max-width: 78ch;
}

.fk-prototype-output table {
    max-width: 100%;
    font-size: 0.95rem;
}

.fk-prototype-output th,
.fk-prototype-output td {
    overflow-wrap: break-word;
}

.fk-prototype-output iframe,
.fk-prototype-output canvas,
.fk-prototype-output svg,
.fk-prototype-output .leaflet-container {
    max-width: 100%;
}

.fk-prototype-output div[id^="fish-map-"] {
    width: 100% !important;
    max-width: 100% !important;
}

.fk-species-prototype .leaflet-control-container,
.fk-species-prototype .leaflet-control,
.fk-species-prototype .leaflet-control-layers {
    max-width: 100%;
}

.fk-species-prototype .leaflet-control-layers label {
    white-space: normal;
}

.fk-prototype-module--map .fk-prototype-output {
    min-height: 320px;
}

.fk-species-prototype .fk-card {
    max-width: 100%;
}

.fk-species-prototype .fk-chip,
.fk-species-prototype .fk-country-chip {
    max-width: 100%;
    white-space: normal;
}

.fk-species-prototype .fk-prototype-identity-panel,
.fk-species-prototype .fk-prototype-media,
.fk-species-prototype .fk-prototype-bio,
.fk-species-prototype .fk-prototype-optimal,
.fk-species-prototype .fk-prototype-suitability {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(8, 125, 122, 0.16);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(23, 33, 29, 0.07);
}

.fk-species-prototype .fk-prototype-lineage-strip {
    padding: 0.45rem 0.65rem;
    color: var(--fk-muted);
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(8, 125, 122, 0.14);
    border-radius: 999px;
}

.fk-species-prototype .fk-prototype-lineage-strip .fk-crumbs {
    margin: 0 !important;
    white-space: normal !important;
}

.fk-species-prototype .fk-prototype-lineage-strip a {
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

.fk-species-prototype .fk-prototype-identity-panel {
    padding: clamp(0.95rem, 2vw, 1.35rem);
}

.fk-species-prototype .fk-prototype-media {
    display: grid;
    position: relative;
    isolation: isolate;
    gap: 0.6rem;
    align-self: start;
    margin: 0;
    padding: clamp(0.55rem, 1.2vw, 0.85rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 12%, rgba(92, 229, 225, 0.24), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(230, 247, 246, 0.86));
    border-radius: 14px;
}

.fk-species-prototype .fk-prototype-media::before {
    position: absolute;
    inset: 0.55rem;
    z-index: -1;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.58), transparent 34%),
        linear-gradient(180deg, transparent 58%, rgba(7, 95, 93, 0.08));
    border-radius: 12px;
}

.fk-species-prototype .fk-prototype-media__frame {
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    min-height: clamp(17rem, 34vw, 32rem);
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.95), rgba(232, 249, 248, 0.68) 48%, rgba(205, 235, 234, 0.62)),
        repeating-linear-gradient(0deg, rgba(8, 125, 122, 0.035) 0 1px, transparent 1px 18px);
    border: 1px solid rgba(8, 125, 122, 0.2);
    border-radius: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 -22px 50px rgba(10, 96, 94, 0.08);
    aspect-ratio: 4 / 3;
}

.fk-species-prototype .fk-prototype-media__frame::after {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 28%, transparent 70%, rgba(255, 255, 255, 0.14)),
        linear-gradient(180deg, transparent 64%, rgba(5, 55, 57, 0.16));
    opacity: 0;
}

.fk-species-prototype .fk-prototype-media--photo .fk-prototype-media__frame::after {
    opacity: 1;
}

.fk-species-prototype .fk-prototype-media--photo .fk-prototype-media__frame {
    background:
        radial-gradient(circle at 42% 22%, rgba(255, 255, 255, 0.3), transparent 26%),
        linear-gradient(135deg, #d8f2f1, #f8ffff);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        inset 0 -42px 76px rgba(5, 55, 57, 0.14);
}

.fk-species-prototype .fk-prototype-media__backdrop {
    display: none;
}

.fk-species-prototype .fk-prototype-media--photo .fk-prototype-media__backdrop {
    display: block;
    position: absolute;
    inset: -10%;
    z-index: 0;
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center;
    opacity: 0.62;
    filter: blur(22px) saturate(1.18) brightness(1.08);
    transform: scale(1.04);
}

.fk-species-prototype .fk-prototype-media--specimen .fk-prototype-media__frame {
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.96), rgba(224, 248, 247, 0.72) 48%, rgba(180, 224, 224, 0.55)),
        repeating-linear-gradient(0deg, rgba(8, 125, 122, 0.035) 0 1px, transparent 1px 18px);
}

.fk-species-prototype .fk-prototype-media--panoramic .fk-prototype-media__frame {
    aspect-ratio: 16 / 9;
}

.fk-species-prototype .fk-prototype-media--landscape .fk-prototype-media__frame {
    aspect-ratio: 16 / 10;
}

.fk-species-prototype .fk-prototype-media--square .fk-prototype-media__frame {
    aspect-ratio: 1 / 1;
}

.fk-species-prototype .fk-prototype-media--portrait .fk-prototype-media__frame {
    aspect-ratio: 3 / 4;
    max-height: clamp(25rem, 52vw, 38rem);
}

.fk-species-prototype .fk-prototype-media__link {
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.fk-species-prototype .fk-prototype-media__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.04) contrast(1.02);
    transition: transform 160ms ease, filter 160ms ease;
}

.fk-species-prototype .fk-prototype-media--photo .fk-prototype-media__image {
    width: calc(100% - 0.8rem);
    height: calc(100% - 0.8rem);
    object-fit: contain;
    border-radius: 9px;
    box-shadow: 0 16px 38px rgba(5, 55, 57, 0.16);
}

.fk-species-prototype .fk-prototype-media--specimen .fk-prototype-media__image {
    width: calc(100% - 1rem);
    height: calc(100% - 1rem);
    object-fit: contain;
}

.fk-species-prototype .fk-prototype-media__link:hover .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media__link:focus .fk-prototype-media__image {
    transform: scale(1.018);
    filter: saturate(1.08) contrast(1.04);
}

.fk-species-prototype .fk-prototype-media--png .fk-prototype-media__image {
    width: calc(100% - 1.6rem);
    height: calc(100% - 1.6rem);
    filter: drop-shadow(0 18px 22px rgba(10, 56, 54, 0.2)) saturate(1.04);
}

.fk-species-prototype .fk-prototype-media--png .fk-prototype-media__link:hover .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media--png .fk-prototype-media__link:focus .fk-prototype-media__image {
    filter: drop-shadow(0 20px 24px rgba(10, 56, 54, 0.24)) saturate(1.08);
}

.fk-species-prototype .fk-prototype-media__caption {
    margin: 0;
    color: var(--fk-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.fk-species-prototype .fk-prototype-bio,
.fk-species-prototype .fk-prototype-optimal,
.fk-species-prototype .fk-prototype-suitability {
    padding: 0.65rem 0.75rem;
    box-shadow: 0 10px 26px rgba(23, 33, 29, 0.05);
}

.fk-species-prototype .fk-prototype-optimal h3 {
    margin: 0 0 0.55rem;
    color: #17332e;
    font-size: 1.08rem;
    line-height: 1.25;
}

.fk-species-prototype .fk-prototype-bio h3 {
    margin: 0 0 0.55rem;
    color: #17332e;
    font-size: 1.08rem;
    line-height: 1.25;
}

.fk-species-prototype .fk-prototype-identity .fish-identity > *:first-child {
    margin-top: 0;
}

.fk-species-prototype .fk-prototype-identity .fish-identity > *:last-child {
    margin-bottom: 0;
}

.fk-species-prototype .fk-prototype-identity .fish-identity h2 {
    margin: 0 0 0.4rem;
    color: #102823;
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.fk-species-prototype .fk-prototype-identity .fish-identity p,
.fk-species-prototype .fk-prototype-identity .fish-identity__line {
    margin-block: 0.45rem;
}

.fk-species-prototype .fk-prototype-identity .fish-trade-codes {
    color: #213f39;
    font-size: 0.95rem;
}

.fk-species-prototype .fk-prototype-identity .fish-trade-codes a {
    font-weight: 750;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

.fk-species-prototype .fk-prototype-identity .fish-identity__toggle {
    display: inline;
    margin: 0;
    padding: 0;
    color: var(--fk-accent-strong);
    font: inherit;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 0.16em;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.fk-species-prototype .fk-prototype-identity .fish-identity__toggle:hover,
.fk-species-prototype .fk-prototype-identity .fish-identity__toggle:focus {
    color: #064f4d;
}

.fk-species-prototype .fk-prototype-identity .fish-identity__more-text {
    color: var(--fk-text);
}

.fk-species-prototype .fk-prototype-identity .fish-badges {
    gap: 0.4rem !important;
    margin: 0.45rem 0 0.65rem !important;
}

.fk-species-prototype .fk-prototype-identity .fish-badges .badge {
    color: #075f5d;
    font-weight: 750;
    line-height: 1.2;
    background: #ffffff;
    border-color: rgba(8, 125, 122, 0.28) !important;
}

.fk-species-prototype .fk-prototype-identity .fish-badges a.badge {
    text-decoration: none;
    box-shadow: inset 0 -1px 0 rgba(8, 125, 122, 0.25);
}

.fk-species-prototype .fk-prototype-identity .fish-badges a.badge:hover,
.fk-species-prototype .fk-prototype-identity .fish-badges a.badge:focus {
    color: #ffffff;
    background: var(--fk-accent-strong);
    border-color: var(--fk-accent-strong) !important;
}

.fk-species-prototype .fk-prototype-identity form {
    display: inline-flex;
    max-width: 100%;
    margin: 0.65rem 0 0.8rem !important;
    padding: 0.55rem 0.65rem;
    background: #f5fbfa;
    border: 1px solid rgba(8, 125, 122, 0.18);
    border-radius: 10px;
}

.fk-species-prototype .fk-prototype-identity label {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    color: var(--fk-muted);
    font-weight: 700;
}

.fk-species-prototype .fk-prototype-identity select {
    max-width: min(100%, 32rem);
    min-height: 2.25rem;
    color: var(--fk-text);
    background: #ffffff;
    border: 1px solid rgba(8, 125, 122, 0.3);
    border-radius: 8px;
}

.fk-species-prototype .fk-prototype-bio .fish-table,
.fk-species-prototype .fk-prototype-optimal .fish-table {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(8, 125, 122, 0.16);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
}

.fk-species-prototype .fk-prototype-bio .fish-table th,
.fk-species-prototype .fk-prototype-optimal .fish-table th {
    width: 34%;
    color: #253b35;
    font-weight: 800;
    background: #f3faf8;
}

.fk-species-prototype .fk-prototype-bio .fish-table th,
.fk-species-prototype .fk-prototype-bio .fish-table td,
.fk-species-prototype .fk-prototype-optimal .fish-table th,
.fk-species-prototype .fk-prototype-optimal .fish-table td {
    padding: 0.62rem 0.75rem;
}

.fk-species-prototype .fk-prototype-optimal .fk-keeper-notes,
.fk-species-prototype .fk-prototype-bio .fish-bio-snapshot__source,
.fk-species-prototype .fk-prototype-optimal .fk-note {
    margin: 0.55rem 0 0;
    color: var(--fk-muted);
    font-size: 0.92rem;
}

.fk-species-prototype .fk-prototype-alerts {
    display: grid;
    gap: 0.6rem;
}

.fk-species-prototype .fk-prototype-section--alerts {
    padding: 0.75rem;
}

.fk-species-prototype .fk-prototype-flags {
    margin: 0;
}

.fk-species-prototype .fk-alert {
    margin: 0;
    padding: 0.8rem 0.95rem;
    max-width: 100%;
    color: #24322d;
    line-height: 1.45;
    overflow-wrap: anywhere;
    background: #f4fbfa;
    border: 1px solid rgba(8, 125, 122, 0.22);
    border-left-width: 5px;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(23, 33, 29, 0.07);
}

.fk-species-prototype .fk-alert.warn {
    color: #4d3400;
    background: #fff7df;
    border-color: #d99b18;
}

.fk-species-prototype .fk-alert.danger {
    color: #5f1717;
    background: #fff0ed;
    border-color: #c74335;
}

.fk-species-prototype .fk-alert b {
    color: inherit;
    font-weight: 800;
}

.fk-species-prototype .fk-flags,
.fk-species-prototype .fish-flags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
    margin-top: 0.5rem !important;
    max-width: 100%;
}

.fk-species-prototype .fk-prototype-flags .fk-flags {
    margin: 0 !important;
}

.fk-species-prototype .fk-flag,
.fk-species-prototype .fish-flags > span {
    display: inline-flex !important;
    flex: 0 1 auto;
    align-items: center;
    max-width: 100%;
    padding: 0.28em 0.65em !important;
    color: #263732;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    background: #eef8f7;
    border: 1px solid rgba(8, 125, 122, 0.24) !important;
    border-radius: 999px !important;
}

.fk-species-prototype .fk-flag--info {
    color: #214540;
    background: #e8f7f5;
    border-color: rgba(8, 125, 122, 0.28) !important;
}

.fk-species-prototype .fk-flag--warn {
    color: #4d3400;
    background: #fff3cc;
    border-color: #d99b18 !important;
}

.fk-species-prototype .fk-flag--danger {
    color: #5f1717;
    background: #ffe6e1;
    border-color: #c74335 !important;
}

.fk-species-prototype .fk-prototype-hero {
    --fk-hero-glass: rgba(255, 255, 255, 0.18);
    --fk-hero-border: rgba(255, 255, 255, 0.36);
    --fk-hero-shadow: 0 28px 80px rgba(0, 18, 28, 0.36);
    --fk-hero-text: #f7fffd;
    --fk-hero-muted: rgba(247, 255, 253, 0.82);
    --fk-hero-accent: #64ded7;
    --fk-hero-warm: #f6c069;
    --fk-hero-danger: #ff9a92;
    position: relative;
    isolation: isolate;
    min-height: clamp(44rem, 88vh, 62rem);
    padding-block: clamp(1.1rem, 2.4vw, 2rem) clamp(2rem, 5vw, 4rem);
    color: var(--fk-hero-text);
    overflow: hidden;
    background:
        radial-gradient(circle at 74% 45%, rgba(99, 222, 215, 0.3), transparent 17rem),
        linear-gradient(90deg, rgba(1, 18, 29, 0.5) 0%, rgba(1, 18, 29, 0.18) 48%, rgba(1, 18, 29, 0.58) 100%),
        linear-gradient(180deg, rgba(1, 18, 29, 0.08) 0%, rgba(1, 18, 29, 0.74) 100%),
        var(--fk-prototype-hero-bg);
    background-position: center;
    background-size: cover;
    border-bottom: 0;
}

.fk-species-prototype .fk-prototype-hero::before,
.fk-species-prototype .fk-prototype-hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
}

.fk-species-prototype .fk-prototype-hero::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%),
        radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.22), transparent 15rem),
        linear-gradient(0deg, rgba(2, 35, 43, 0.38), transparent 32%);
    mix-blend-mode: screen;
    opacity: 0.78;
}

.fk-species-prototype .fk-prototype-hero::after {
    background:
        linear-gradient(90deg, rgba(0, 8, 14, 0.7) 0%, rgba(0, 8, 14, 0.08) 48%, rgba(0, 8, 14, 0.46) 100%),
        linear-gradient(180deg, rgba(0, 8, 14, 0.08) 0%, rgba(0, 8, 14, 0.42) 78%, rgba(247, 251, 250, 1) 100%);
}

.fk-species-prototype .fk-prototype-habitat--freshwater {
    --fk-hero-accent: #7ce5c3;
    --fk-hero-warm: #f1d27a;
}

.fk-species-prototype .fk-prototype-habitat--brackish {
    --fk-hero-accent: #8be0d4;
    --fk-hero-warm: #f1bd72;
}

.fk-species-prototype .fk-prototype-habitat--marine {
    --fk-hero-accent: #6be5ff;
    --fk-hero-warm: #f4ba66;
}

.fk-species-prototype .fk-prototype-habitat--mixed {
    --fk-hero-accent: #80e2cf;
    --fk-hero-warm: #f0c36d;
}

.fk-species-prototype .fk-prototype-hero__inner {
    position: relative;
    z-index: 1;
    width: min(1480px, calc(100vw - 48px));
    min-height: clamp(38rem, 80vh, 56rem);
    align-content: start;
    gap: clamp(0.75rem, 1.5vw, 1.15rem);
}

.fk-species-prototype .fk-prototype-label {
    color: #062821;
    background: rgba(255, 255, 255, 0.66);
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 28px rgba(0, 18, 28, 0.14);
    backdrop-filter: blur(18px);
}

.fk-species-prototype .fk-prototype-lineage-strip {
    max-width: max-content;
    color: var(--fk-hero-muted);
    background: rgba(2, 27, 34, 0.34);
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 16px 36px rgba(0, 18, 28, 0.18);
    backdrop-filter: blur(18px);
}

.fk-species-prototype .fk-prototype-lineage-strip a {
    color: #e8fffb;
}

.fk-species-prototype .fk-prototype-identity-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: clamp(1rem, 2.4vw, 2rem);
}

.fk-species-prototype .fk-prototype-identity-row--with-media {
    grid-template-columns: minmax(20rem, 0.84fr) minmax(28rem, 1.16fr);
}

.fk-species-prototype .fk-prototype-hero--no-media .fk-prototype-identity-row {
    grid-template-columns: minmax(0, 1fr);
}

.fk-species-prototype .fk-prototype-hero__content {
    display: grid;
    gap: clamp(0.85rem, 1.6vw, 1.2rem);
    align-content: center;
    max-width: 100%;
    min-width: 0;
}

.fk-species-prototype .fk-prototype-hero--no-media .fk-prototype-hero__content {
    max-width: min(1120px, 100%);
}

.fk-species-prototype .fk-prototype-identity-panel,
.fk-species-prototype .fk-prototype-bio,
.fk-species-prototype .fk-prototype-optimal,
.fk-species-prototype .fk-prototype-suitability,
.fk-species-prototype .fk-prototype-hero-alerts,
.fk-species-prototype .fk-prototype-meta .fk-prototype-module {
    color: var(--fk-hero-text);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1)),
        rgba(7, 29, 39, 0.34);
    border: 1px solid var(--fk-hero-border);
    box-shadow: var(--fk-hero-shadow);
    backdrop-filter: blur(22px) saturate(1.15);
}

.fk-species-prototype .fk-prototype-identity-panel {
    padding: clamp(1rem, 2.5vw, 1.7rem);
    border-radius: 16px;
}

.fk-species-prototype .fk-prototype-identity .fish-identity h2 {
    max-width: min(100%, 24ch);
    color: #ffffff;
    text-shadow: 0 4px 24px rgba(0, 14, 22, 0.42);

    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
}

@media (min-width: 900px) {
    .fk-species-prototype .fk-prototype-identity .fish-identity h2 {
        max-width: min(100%, 30ch);
    }
}

@media (max-width: 560px) {
    .fk-species-prototype .fk-prototype-identity .fish-identity h2 {
        max-width: 100%;
        overflow-wrap: break-word;
        text-wrap: balance;
    }
}

.fk-species-prototype .fk-prototype-identity .fish-identity p,
.fk-species-prototype .fk-prototype-identity .fish-identity__line,
.fk-species-prototype .fk-prototype-identity .fish-trade-codes,
.fk-species-prototype .fk-prototype-identity .fish-identity__more-text,
.fk-species-prototype .fk-prototype-bio .fish-bio-snapshot__source,
.fk-species-prototype .fk-prototype-optimal .fk-note,
.fk-species-prototype .fk-prototype-optimal .fk-keeper-notes {
    color: var(--fk-hero-muted);
}

.fk-species-prototype .fk-prototype-identity a,
.fk-species-prototype .fk-prototype-meta a {
    color: #eafffb;
    text-decoration-color: rgba(234, 255, 251, 0.58);
}

.fk-species-prototype .fk-prototype-identity .fish-badges .badge {
    color: #07352e;
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(255, 255, 255, 0.68) !important;
}

.fk-species-prototype .fk-prototype-identity form {
    color: var(--fk-hero-text);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}

.fk-species-prototype .fk-prototype-identity label {
    color: var(--fk-hero-muted);
}

.fk-species-prototype .fk-prototype-hero-alerts {
    display: grid;
    gap: 0.7rem;
    padding: clamp(0.65rem, 1.4vw, 0.9rem);
    border-radius: 16px;
}

.fk-species-prototype .fk-prototype-hero-alerts .fk-prototype-alerts {
    display: grid;
    gap: 0.7rem;
}

.fk-species-prototype .fk-prototype-hero-alerts .fk-alert {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    margin: 0;
    padding: clamp(0.85rem, 1.6vw, 1.05rem) clamp(0.95rem, 2vw, 1.2rem);
    color: #fff7ef;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
        rgba(28, 28, 31, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-left: 3px solid var(--fk-hero-warm);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 14, 22, 0.26);
    backdrop-filter: blur(18px);
}

.fk-species-prototype .fk-prototype-hero-alerts .fk-alert.warn {
    color: #fff4dd;
    background:
        linear-gradient(135deg, rgba(255, 211, 130, 0.2), rgba(255, 255, 255, 0.08)),
        rgba(39, 31, 16, 0.38);
    border-color: rgba(255, 210, 128, 0.58);
    border-left-color: var(--fk-hero-warm);
}

.fk-species-prototype .fk-prototype-hero-alerts .fk-alert.danger {
    color: #fff0ef;
    background:
        linear-gradient(135deg, rgba(255, 118, 108, 0.24), rgba(255, 255, 255, 0.08)),
        rgba(42, 20, 21, 0.42);
    border-color: rgba(255, 154, 146, 0.62);
    border-left-color: var(--fk-hero-danger);
}

.fk-species-prototype .fk-prototype-hero-alerts .fk-alert b {
    color: #ffffff;
    font-size: 1.05em;
}

.fk-species-prototype .fk-prototype-hero-alerts .fk-flags,
.fk-species-prototype .fk-prototype-hero-alerts .fish-flags {
    margin: 0 !important;
}

.fk-species-prototype .fk-prototype-hero-alerts .fk-flag,
.fk-species-prototype .fk-prototype-hero-alerts .fish-flags > span {
    color: #f9fffd;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.34) !important;
    box-shadow: 0 8px 22px rgba(0, 14, 22, 0.2);
    backdrop-filter: blur(12px);
}

.fk-species-prototype .fk-prototype-care-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.fk-species-prototype .fk-prototype-care-grid--single {
    width: 100%;
}

.fk-species-prototype .fk-prototype-care-card,
.fk-species-prototype .fk-prototype-optimal {
    width: 100%;
    padding: clamp(0.8rem, 1.7vw, 1.05rem);
    border-radius: 14px;
}

.fk-species-prototype .fk-prototype-bio-inline {
    margin: 0 0 0.75rem;
}

.fk-species-prototype .fk-prototype-bio-inline .fish-bio-snapshot {
    margin: 0;
}

.fk-species-prototype .fk-prototype-bio-inline h3 {
    display: none;
}

.fk-species-prototype .fk-prototype-bio h3,
.fk-species-prototype .fk-prototype-optimal h3,
.fk-species-prototype .fk-prototype-meta .fk-prototype-module__title {
    color: #ffffff;
}

.fk-species-prototype .fk-prototype-bio-inline .fish-table,
.fk-species-prototype .fk-prototype-optimal-inline .fish-table,
.fk-species-prototype .fk-prototype-bio .fish-table,
.fk-species-prototype .fk-prototype-optimal .fish-table {
    overflow: hidden;
    color: var(--fk-hero-text);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
}

.fk-species-prototype .fk-prototype-bio-inline .fish-table th,
.fk-species-prototype .fk-prototype-optimal-inline .fish-table th,
.fk-species-prototype .fk-prototype-bio .fish-table th,
.fk-species-prototype .fk-prototype-optimal .fish-table th {
    width: 28%;
    color: #ffffff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.14);
}

.fk-species-prototype .fk-prototype-bio-inline .fish-table th,
.fk-species-prototype .fk-prototype-bio-inline .fish-table td,
.fk-species-prototype .fk-prototype-optimal-inline .fish-table th,
.fk-species-prototype .fk-prototype-optimal-inline .fish-table td,
.fk-species-prototype .fk-prototype-bio .fish-table th,
.fk-species-prototype .fk-prototype-bio .fish-table td,
.fk-species-prototype .fk-prototype-optimal .fish-table th,
.fk-species-prototype .fk-prototype-optimal .fish-table td {
    padding: 0.62rem 0.75rem;
    border-bottom-color: rgba(255, 255, 255, 0.16);
}

.fk-species-prototype .fk-prototype-bio-inline .fish-table tr:last-child th,
.fk-species-prototype .fk-prototype-bio-inline .fish-table tr:last-child td,
.fk-species-prototype .fk-prototype-optimal-inline .fish-table tr:last-child th,
.fk-species-prototype .fk-prototype-optimal-inline .fish-table tr:last-child td,
.fk-species-prototype .fk-prototype-optimal .fish-table tr:last-child th,
.fk-species-prototype .fk-prototype-optimal .fish-table tr:last-child td {
    border-bottom: 0;
}

.fk-species-prototype .fk-prototype-meta {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.fk-species-prototype .fk-prototype-meta .fk-prototype-module {
    margin-top: 0;
    border-radius: 14px;
}

.fk-species-prototype .fk-prototype-media {
    align-self: center;
    justify-self: stretch;
    margin: 0;
    padding: 0;
    overflow: visible;
    color: var(--fk-hero-muted);
    background: transparent;
    border: 0;
    box-shadow: none;
}

.fk-species-prototype .fk-prototype-media::before {
    display: none;
}

.fk-species-prototype .fk-prototype-media__frame {
    min-height: clamp(24rem, 54vw, 45rem);
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    aspect-ratio: 5 / 4;
}

.fk-species-prototype .fk-prototype-media__frame::after {
    display: none;
}

.fk-species-prototype .fk-prototype-media__link {
    overflow: visible;
}

.fk-species-prototype .fk-prototype-media__backdrop {
    display: block;
    inset: 10% -2% -3%;
    width: 104%;
    height: 82%;
    opacity: 0.28;
    filter: blur(30px) saturate(1.2) brightness(0.8);
    transform: scale(1.04);
    mask-image: radial-gradient(ellipse at 50% 52%, #000 0%, #000 42%, transparent 72%);
}

.fk-species-prototype .fk-prototype-media__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 34px 34px rgba(0, 14, 22, 0.32)) saturate(1.08) contrast(1.03);
    transition: transform 260ms ease, filter 260ms ease;
}

.fk-species-prototype .fk-prototype-media--photo .fk-prototype-media__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(0, 14, 22, 0.36);
    mask-image:
        linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
        linear-gradient(180deg, transparent 0%, #000 10%, #000 86%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-image:
        linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
        linear-gradient(180deg, transparent 0%, #000 10%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in;
}

.fk-species-prototype .fk-prototype-media--specimen .fk-prototype-media__frame {
    background: radial-gradient(circle at 54% 58%, rgba(255, 229, 177, 0.34), rgba(101, 222, 215, 0.14) 28%, transparent 52%);
}

.fk-species-prototype .fk-prototype-media--specimen .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media--png .fk-prototype-media__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 36px 28px rgba(0, 14, 22, 0.42)) saturate(1.08) contrast(1.04);
}

.fk-species-prototype .fk-prototype-media__link:hover .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media__link:focus .fk-prototype-media__image {
    transform: translateY(-0.35rem) scale(1.018);
    filter: drop-shadow(0 40px 32px rgba(0, 14, 22, 0.42)) saturate(1.12) contrast(1.04);
}

.fk-species-prototype .fk-prototype-media--png .fk-prototype-media__link:hover .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media--png .fk-prototype-media__link:focus .fk-prototype-media__image {
    filter: drop-shadow(0 40px 32px rgba(0, 14, 22, 0.42)) saturate(1.12) contrast(1.04);
}

.fk-species-prototype .fk-prototype-media__caption {
    justify-self: end;
    max-width: min(32rem, 100%);
    color: rgba(247, 255, 253, 0.72);
    text-align: right;
    text-shadow: 0 2px 10px rgba(0, 14, 22, 0.42);
}

@media (prefers-reduced-motion: reduce) {
    .fk-species-prototype .fk-prototype-media__image,
    .fk-species-prototype .fk-prototype-media--specimen .fk-prototype-media__image,
    .fk-species-prototype .fk-prototype-media--png .fk-prototype-media__image {
        animation: none;
        transition: none;
    }

    .fk-species-prototype .fk-prototype-media__link:hover .fk-prototype-media__image,
    .fk-species-prototype .fk-prototype-media__link:focus .fk-prototype-media__image {
        transform: none;
    }
}

@media (min-width: 901px) {
    .fk-species-prototype .fk-prototype-identity-row--with-media {
        grid-template-columns: minmax(0, 0.84fr) minmax(420px, 1.16fr);
        align-items: center;
        gap: clamp(1rem, 2vw, 1.5rem);
    }

    .fk-species-prototype .fk-prototype-hero--no-media .fk-prototype-care-grid {
        grid-template-columns: 1fr;
    }

    .fk-species-prototype .fk-prototype-layout {
        width: min(1400px, calc(100vw - 48px));
        grid-template-columns: minmax(0, 1fr) minmax(420px, clamp(420px, 38vw, 560px));
        gap: clamp(1.25rem, 2vw, 1.75rem);
    }

    .fk-species-prototype .fk-prototype-aside {
        width: 100%;
    }

    .fk-species-prototype .fk-prototype-module--map .fk-prototype-output {
        min-height: 360px;
    }

    .fk-species-prototype .fk-prototype-output div[id^="fish-map-"] {
        min-height: 360px;
    }
}

@media (max-width: 900px) {
    .site-header__inner,
    .fk-species-hero__grid,
    .fk-species-layout,
    .fk-prototype-layout {
        grid-template-columns: 1fr;
    }

    .fk-species-prototype .fk-prototype-hero {
        min-height: auto;
        padding-block: 1rem 2rem;
    }

    .fk-species-prototype .fk-prototype-hero__inner {
        width: min(100vw - 28px, 1480px);
        min-height: auto;
    }

    .fk-species-prototype .fk-prototype-identity-row,
    .fk-species-prototype .fk-prototype-identity-row--with-media {
        grid-template-columns: 1fr;
    }

    .site-header__inner {
        display: grid;
        align-items: start;
    }

    .site-nav__list {
        justify-content: flex-start;
    }

    .fk-species-layout__aside,
    .fk-prototype-aside {
        position: static;
    }

    .fk-page-title,
    .fk-species-title {
        max-width: 100%;
    }

    .fk-species-prototype .fk-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fk-species-prototype .fk-card [style*="grid-template-columns"] {
        max-width: 100%;
        min-width: min(34rem, 160vw);
    }

    .fk-species-prototype .fk-card [style*="white-space:nowrap"] {
        white-space: normal !important;
    }

    .fk-species-prototype .fk-card [style*="grid-template-columns: 200px"] {
        grid-template-columns: minmax(8.5rem, 1.2fr) minmax(4.75rem, 0.7fr) minmax(4.75rem, 0.7fr) minmax(0, 1fr) !important;
    }

    .fk-species-prototype .fk-card [style*="grid-template-columns:220px"],
    .fk-species-prototype .fk-card [style*="grid-template-columns: 220px"] {
        grid-template-columns: minmax(8.5rem, 1fr) minmax(0, 1.35fr) minmax(4rem, 0.55fr) !important;
    }
}

@media (max-width: 560px) {
    :root {
        --fk-wrap: min(100vw - 20px, 1180px);
    }

    body {
        font-size: 15px;
    }

    .site-header__inner {
        min-height: auto;
    }

    .fk-page-hero,
    .fk-species-hero {
        padding-block: 2rem;
    }

    .fk-panel {
        padding: 1rem;
    }

    .fk-species-prototype {
        overflow-x: hidden;
        overflow-x: clip;
    }

    .fk-species-prototype :where(a, p, li, dd, dt, th, td, caption, figcaption, small, span, strong, b, code) {
        overflow-wrap: anywhere;
    }

    .fk-species-prototype :where(.fk-prototype-section, .fk-prototype-module, .fk-prototype-identity-panel, .fk-prototype-media, .fk-prototype-bio, .fk-prototype-optimal, .fk-prototype-suitability) {
        max-width: 100%;
    }

    .fk-species-prototype .fk-prototype-hero {
        padding-block: 1rem;
    }

    .fk-species-prototype .fk-prototype-layout {
        gap: 0.9rem;
    }

    .fk-species-prototype .fk-prototype-section {
        padding: 0.75rem;
    }

    .fk-species-prototype .fk-prototype-module {
        padding: 0.75rem;
    }

    .fk-species-prototype .fk-prototype-identity-panel,
    .fk-species-prototype .fk-prototype-bio,
    .fk-species-prototype .fk-prototype-optimal,
    .fk-species-prototype .fk-prototype-suitability {
        border-radius: 10px;
    }

    .fk-species-prototype .fk-prototype-identity form {
        display: block;
        width: 100%;
    }

    .fk-species-prototype .fk-prototype-identity label,
    .fk-species-prototype .fk-prototype-identity select {
        width: 100%;
    }

    .fk-species-prototype .fk-prototype-lineage-strip {
        border-radius: 10px;
    }

    .fk-species-prototype .fk-prototype-identity .fish-identity h2 {
        font-size: clamp(1.65rem, 10vw, 2.15rem);
    }

    .fk-species-prototype .fk-alert {
        padding: 0.7rem;
        font-size: 0.93rem;
    }

    .fk-species-prototype .fk-alert b {
        margin-right: 0.2rem;
    }

    .fk-species-prototype .fk-flag,
    .fk-species-prototype .fish-flags > span {
        max-width: 100%;
        font-size: 0.88rem;
    }

    .fk-species-prototype .fk-prototype-bio .fish-table,
    .fk-species-prototype .fk-prototype-optimal .fish-table {
        table-layout: fixed;
        font-size: 0.92rem;
    }

    .fk-species-prototype .fk-prototype-bio .fish-table th,
    .fk-species-prototype .fk-prototype-bio .fish-table td,
    .fk-species-prototype .fk-prototype-optimal .fish-table th,
    .fk-species-prototype .fk-prototype-optimal .fish-table td {
        padding: 0.55rem;
    }

    .fk-species-prototype .fk-prototype-output table:not(.fish-table) {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fk-species-prototype .fk-prototype-module--map .fk-prototype-output {
        min-height: 260px;
    }

    .fk-species-prototype .fk-prototype-output div[id^="fish-map-"] {
        height: clamp(260px, 70vw, 360px) !important;
    }

    .fk-species-prototype .fk-prototype-media__frame {
        min-height: clamp(15rem, 64vw, 24rem);
    }

    .fk-species-prototype .fk-prototype-media--portrait .fk-prototype-media__frame {
        aspect-ratio: 4 / 5;
        max-height: min(24rem, 68vh);
    }

    .fk-species-prototype .leaflet-control-layers {
        max-width: calc(100vw - 3.5rem);
        font-size: 0.86rem;
    }

    .fk-species-prototype .fk-card {
        padding: 0.75rem !important;
    }

    .fk-tabs {
        gap: 0.4rem;
    }

    .fk-tabs__link {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@supports selector(body:has(.fk-species-prototype)) {
    @media (max-width: 600px) {
        body:has(.fk-species-prototype) #wpadminbar {
            min-width: 0;
        }
    }
}

/* -------------------------------------------------------------------------
   Fishkeep prototype hero media correction
   Habitat background remains the hero. Featured image is an overlaid misted layer.
   Append at the end of app.css.
   ------------------------------------------------------------------------- */

/* Keep hero as scenic habitat canvas */
.fk-species-prototype .fk-prototype-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg,
            rgba(0, 7, 13, 0.82) 0%,
            rgba(0, 10, 18, 0.48) 36%,
            rgba(0, 10, 18, 0.20) 58%,
            rgba(0, 7, 13, 0.70) 100%
        ),
        linear-gradient(180deg,
            rgba(0, 12, 24, 0.20) 0%,
            rgba(0, 12, 24, 0.10) 48%,
            rgba(247, 251, 250, 0.95) 100%
        ),
        var(--fk-prototype-hero-bg);
    background-size: cover;
    background-position: center;
    border: 0;
}

/* Static dark/mist depth layer over the habitat */
.fk-species-prototype .fk-prototype-hero::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(ellipse at 72% 54%,
            rgba(0, 8, 16, 0.18) 0%,
            rgba(0, 8, 16, 0.38) 38%,
            rgba(0, 8, 16, 0.70) 70%,
            transparent 100%
        ),
        radial-gradient(ellipse at 42% 80%,
            rgba(74, 226, 232, 0.20) 0%,
            transparent 42%
        ),
        linear-gradient(180deg,
            transparent 58%,
            rgba(247, 251, 250, 0.96) 100%
        );
}

/* Do not let older CSS turn media into a card/tile */
.fk-species-prototype .fk-prototype-media,
.fk-species-prototype .fk-prototype-media__frame,
.fk-species-prototype .fk-prototype-media__link {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

/* Media area: this is a stage floating over the habitat, not a card */
.fk-species-prototype .fk-prototype-media {
    grid-area: media;
    position: relative;
    align-self: center;
    justify-self: stretch;
    min-width: 0;
    overflow: visible;
    z-index: 2;
}

/* Create space for the featured image without making a visible box */
.fk-species-prototype .fk-prototype-media__frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: clamp(420px, 48vw, 760px);
    aspect-ratio: 16 / 10;
    overflow: visible;
}

/*
   Dark mist behind the uploaded image.
   This is the key layer that hides rectangular photo edges.
*/
.fk-species-prototype .fk-prototype-media__frame::before {
    position: absolute;
    inset: 2% -6% -2% -10%;
    z-index: 0;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(ellipse at 55% 55%,
            rgba(0, 0, 0, 0.10) 0%,
            rgba(0, 8, 18, 0.28) 34%,
            rgba(0, 8, 18, 0.56) 58%,
            transparent 82%
        ),
        radial-gradient(ellipse at 54% 78%,
            rgba(255, 255, 255, 0.18) 0%,
            transparent 34%
        );
    filter: blur(2px);
}

/*
   Optional blurred duplicate behind normal photos.
   This helps ordinary rectangular photos melt into the dark mist.
*/
.fk-species-prototype .fk-prototype-media__backdrop {
    display: block;
    position: absolute;
    inset: 6% -2% 2%;
    z-index: 1;
    width: 104%;
    height: 92%;
    object-fit: contain;
    object-position: center;
    opacity: 0.42;
    filter: blur(30px) saturate(1.18) brightness(0.52) contrast(1.08);
    transform: scale(1.045);
    pointer-events: none;

    mask-image: radial-gradient(
        ellipse at 52% 52%,
        #000 0%,
        #000 40%,
        rgba(0, 0, 0, 0.52) 58%,
        transparent 78%
    );
    -webkit-mask-image: radial-gradient(
        ellipse at 52% 52%,
        #000 0%,
        #000 40%,
        rgba(0, 0, 0, 0.52) 58%,
        transparent 78%
    );
}

/* Link wrapper should not create layout/card behaviour */
.fk-species-prototype .fk-prototype-media__link {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    overflow: visible;
    text-decoration: none;
}

/*
   Actual featured image:
   - separate layer over habitat
   - contain, not cover
   - no hard crop
   - edges fade out to transparent
*/
.fk-species-prototype .fk-prototype-media__image {
    position: relative;
    z-index: 3;
    display: block;
    width: auto;
    max-width: min(96%, 980px);
    max-height: clamp(360px, 44vw, 720px);
    object-fit: contain;
    object-position: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    animation: none;

    filter:
        drop-shadow(0 38px 54px rgba(0, 5, 12, 0.52))
        saturate(1.08)
        contrast(1.04);

    mask-image:
        radial-gradient(
            ellipse at 52% 52%,
            #000 0%,
            #000 54%,
            rgba(0, 0, 0, 0.82) 66%,
            rgba(0, 0, 0, 0.34) 80%,
            transparent 94%
        ),
        linear-gradient(
            90deg,
            transparent 0%,
            #000 10%,
            #000 90%,
            transparent 100%
        ),
        linear-gradient(
            180deg,
            transparent 0%,
            #000 9%,
            #000 88%,
            transparent 100%
        );

    -webkit-mask-image:
        radial-gradient(
            ellipse at 52% 52%,
            #000 0%,
            #000 54%,
            rgba(0, 0, 0, 0.82) 66%,
            rgba(0, 0, 0, 0.34) 80%,
            transparent 94%
        ),
        linear-gradient(
            90deg,
            transparent 0%,
            #000 10%,
            #000 90%,
            transparent 100%
        ),
        linear-gradient(
            180deg,
            transparent 0%,
            #000 9%,
            #000 88%,
            transparent 100%
        );

    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

/* Landscape and panoramic photos should still show most of the image */
.fk-species-prototype .fk-prototype-media--landscape .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media--panoramic .fk-prototype-media__image {
    max-width: min(104%, 1040px);
    max-height: clamp(340px, 42vw, 690px);
}

/* Portrait photos should not become huge vertical slabs */
.fk-species-prototype .fk-prototype-media--portrait .fk-prototype-media__image {
    max-width: min(72%, 620px);
    max-height: clamp(430px, 52vw, 760px);
}

/* Square images sit between portrait and landscape behaviour */
.fk-species-prototype .fk-prototype-media--square .fk-prototype-media__image {
    max-width: min(82%, 760px);
    max-height: clamp(390px, 48vw, 720px);
}

/* Absolutely no bobbing/floating motion */
.fk-species-prototype .fk-prototype-media--specimen .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media--png .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media__image {
    animation: none;
    transform: none;
}

/* Captions/credits should be quiet, not a tile */
.fk-species-prototype .fk-prototype-media__caption {
    position: absolute;
    right: clamp(0.5rem, 2vw, 1.4rem);
    bottom: clamp(0.35rem, 1.2vw, 1rem);
    z-index: 4;
    max-width: min(34rem, 70%);
    padding: 0.32rem 0.6rem;
    color: rgba(241, 255, 255, 0.78);
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: right;
    background: rgba(0, 8, 14, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(12px) saturate(1.18);
    -webkit-backdrop-filter: blur(12px) saturate(1.18);
}

/* Mobile: keep media as a misted layer, still not a tile */
@media (max-width: 900px) {
    .fk-species-prototype .fk-prototype-media__frame {
        min-height: clamp(260px, 72vw, 520px);
    }

    .fk-species-prototype .fk-prototype-media__image {
        max-width: min(100%, 720px);
        max-height: clamp(240px, 68vw, 500px);
    }

    .fk-species-prototype .fk-prototype-media--portrait .fk-prototype-media__image {
        max-width: min(78%, 460px);
        max-height: clamp(320px, 82vw, 560px);
    }
}

@media (max-width: 560px) {
    .fk-species-prototype .fk-prototype-media__caption {
        position: static;
        max-width: 100%;
        margin-top: 0.35rem;
        text-align: left;
        border-radius: 12px;
    }
}

/* -------------------------------------------------------------------------
   Fishkeep prototype hero media: Gemini-style foreground blend
   Habitat remains the true hero background. Featured media is a masked CSS
   background layer, not an image card.
   ------------------------------------------------------------------------- */

.fk-species-prototype .fk-prototype-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg,
            rgba(0, 7, 13, 0.82) 0%,
            rgba(0, 10, 18, 0.48) 36%,
            rgba(0, 10, 18, 0.20) 58%,
            rgba(0, 7, 13, 0.70) 100%
        ),
        linear-gradient(180deg,
            rgba(0, 12, 24, 0.20) 0%,
            rgba(0, 12, 24, 0.10) 48%,
            rgba(247, 251, 250, 0.95) 100%
        ),
        var(--fk-prototype-hero-bg);
    background-size: cover;
    background-position: center;
    border: 0;
}

.fk-species-prototype .fk-prototype-hero::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(ellipse at 72% 54%,
            rgba(0, 8, 16, 0.18) 0%,
            rgba(0, 8, 16, 0.38) 38%,
            rgba(0, 8, 16, 0.70) 70%,
            transparent 100%
        ),
        radial-gradient(ellipse at 42% 80%,
            rgba(74, 226, 232, 0.20) 0%,
            transparent 42%
        ),
        linear-gradient(180deg,
            transparent 58%,
            rgba(247, 251, 250, 0.96) 100%
        );
}

.fk-species-prototype .fk-prototype-identity-row {
    position: relative;
}

.fk-species-prototype .fk-prototype-hero__content {
    position: relative;
    z-index: 10;
}

.fk-species-prototype .fk-prototype-media {
    display: none;
}

.fk-species-prototype .fk-prototype-media__frame,
.fk-species-prototype .fk-prototype-media__link,
.fk-species-prototype .fk-prototype-media__image,
.fk-species-prototype .fk-prototype-media__backdrop {
    display: none;
}

/* Prototype hero alert cards: closer Gemini glass finish */
.fk-species-prototype .fk-prototype-alerts .fk-alert {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* FIX: Adds clean spacing between your bold label and description */
    margin: 0;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    color: #ffffff;

    /* FIX: Forces any default theme backgrounds to zero so the glass works */
    background-color: transparent !important;

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 1px 0 1px rgba(255, 255, 255, 0.15);

    border: 1px solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
}

/* Pink / expert danger card */
.fk-species-prototype .fk-prototype-alerts .fk-alert.danger {
    background-image:
        linear-gradient(90deg, rgba(30, 20, 30, 0.45) 0%, rgba(20, 25, 45, 0.25) 100%),
        linear-gradient(135deg, rgba(255, 110, 130, 1) 0%, rgba(255, 110, 130, 0.3) 25%, rgba(255, 255, 255, 0.05) 100%);
}

/* Orange/gold warning card */
.fk-species-prototype .fk-prototype-alerts .fk-alert.warn {
    background-image:
        linear-gradient(90deg, rgba(35, 25, 20, 0.45) 0%, rgba(20, 25, 45, 0.25) 100%),
        linear-gradient(135deg, rgba(255, 185, 85, 1) 0%, rgba(255, 185, 85, 0.3) 25%, rgba(255, 255, 255, 0.05) 100%);
}

/* Fallback/info card if an alert lacks danger/warn */
.fk-species-prototype .fk-prototype-alerts .fk-alert:not(.danger):not(.warn) {
    background-image:
        linear-gradient(90deg, rgba(20, 35, 25, 0.45) 0%, rgba(20, 25, 45, 0.25) 100%),
        linear-gradient(135deg, rgba(210, 245, 130, 1) 0%, rgba(180, 230, 100, 0.3) 25%, rgba(255, 255, 255, 0.05) 100%);
}

/* Typography alignment */
.fk-species-prototype .fk-prototype-alerts .fk-alert b {
    /* FIX: Acts like a neat column to prevent the labels from wrapping messily */
    flex-shrink: 0;
    flex-basis: 110px;

    color: #ffffff;
    font-weight: 800;
    line-height: 1.15;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.fk-species-prototype .fk-prototype-alerts .fk-alert :where(span, p, strong) {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.4;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
    margin: 0; /* Prevents paragraph margins from messing up vertical center */
}

@media (max-width: 700px) {
    .fk-species-prototype .fk-prototype-alerts .fk-alert {
        display: block;
        padding: 0.9rem 1rem;
    }

    .fk-species-prototype .fk-prototype-alerts .fk-alert b {
        display: block;
        flex-basis: auto; /* Resets the column width for mobile */
        margin-bottom: 0.4rem;
    }
}
.fk-species-prototype .fk-prototype-media__caption {
    display: none;
}

/* =========================================================================
   HERO MEDIA LAYER & RESPONSIVE LAYOUT — HYBRID W + 6
   Desktop: pseudo-image layer.
   Tablet/mobile: real DOM image in normal flow.
   ========================================================================= */

/* 1. Kill legacy media chrome only — DO NOT kill .fk-prototype-hero::after globally */
.fk-species-prototype .fk-prototype-media,
.fk-species-prototype .fk-prototype-media__frame,
.fk-species-prototype .fk-prototype-media__link {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.fk-species-prototype .fk-prototype-media::before,
.fk-species-prototype .fk-prototype-media::after,
.fk-species-prototype .fk-prototype-media__frame::before,
.fk-species-prototype .fk-prototype-media__frame::after,
.fk-species-prototype .fk-prototype-media__backdrop {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* 2. Base hero */
.fk-species-prototype .fk-prototype-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 760px;
    background-image: var(--fk-prototype-hero-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 3. Base specimen image styling for mobile/tablet DOM image */
.fk-species-prototype .fk-prototype-media__image {
    display: block !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    background: transparent;
    border: 0;
    box-shadow: none;
    filter: drop-shadow(0 20px 30px rgba(0, 5, 12, 0.4)) saturate(1.04);
    transform: none !important;
    animation: none !important;

    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%) !important;
    -webkit-mask-composite: source-in !important;
    mask-image:
        linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%) !important;
    mask-composite: intersect !important;
}

/* 4. Desktop: use pseudo-layer only */
@media (min-width: 1101px) {
    .fk-species-prototype .fk-prototype-media {
        display: none !important;
    }

    .fk-species-prototype .fk-prototype-hero::after {
        content: "";
        position: absolute;
        z-index: 2;
        top: 47%;
        left: 70%;
        width: clamp(460px, 46vw, 900px);
        height: clamp(340px, 64vh, 760px);
        transform: translate(-50%, -50%);
        pointer-events: none;
        opacity: 0.92;

        background-image: var(--fk-species-image);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;

        -webkit-mask-image:
            linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%),
            linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%) !important;
        -webkit-mask-composite: source-in !important;
        mask-image:
            linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%),
            linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%) !important;
        mask-composite: intersect !important;
    }

    .fk-species-prototype .fk-prototype-hero__content {
        position: relative;
        z-index: 5;
    }

    .fk-species-prototype .fk-prototype-identity-row--with-media {
        grid-template-columns: minmax(0, 0.84fr) minmax(420px, 1.16fr);
    }
}

/* 5. Tablet/mobile: remove pseudo-layer and use normal-flow image */
@media (max-width: 1100px) {
    .fk-species-prototype .fk-prototype-hero {
        min-height: auto;
        padding-bottom: 2.5rem;
    }

    .fk-species-prototype .fk-prototype-hero::after {
        display: none !important;
        content: none !important;
    }

    .fk-species-prototype .fk-prototype-hero__inner {
        display: flex;
        flex-direction: column;
        width: var(--fk-wrap, calc(100% - 32px)) !important;
        margin-inline: auto;
    }

    .fk-species-prototype .fk-prototype-hero__content,
    .fk-species-prototype .fk-prototype-identity-row,
    .fk-species-prototype .fk-prototype-identity-row--with-media {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 1.25rem;
    }

    .fk-species-prototype .fk-prototype-media,
    .fk-species-prototype .fk-prototype-media__frame,
    .fk-species-prototype .fk-prototype-media__link {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
        width: 100%;
        min-height: auto;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .fk-species-prototype .fk-prototype-media {
        margin: 1.5rem 0 0.75rem 0 !important;
    }

    .fk-species-prototype .fk-prototype-media__image {
        max-width: 100% !important;
        max-height: clamp(300px, 55vh, 650px) !important;
    }

    .fk-species-prototype .fk-prototype-alerts .fk-alert {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
        padding: 1.25rem;
    }

    .fk-species-prototype .fk-prototype-alerts .fk-alert b {
        flex-basis: auto;
        margin-bottom: 0;
    }
}

/* =========================================================================
   MOBILE PORTRAIT MEDIA CONTAINMENT FIX
   Stops tall portrait images painting over identity/alert cards.
   Append after the current hybrid W + 6 block.
   ========================================================================= */

@media (max-width: 1100px) {
    /* Keep glass/content cards above any media bleed */
    .fk-species-prototype .fk-prototype-identity-panel,
    .fk-species-prototype .fk-prototype-hero-alerts,
    .fk-species-prototype .fk-prototype-bio,
    .fk-species-prototype .fk-prototype-optimal,
    .fk-species-prototype .fk-prototype-suitability {
        position: relative;
        z-index: 2;
    }

    /* The media must be a normal block, not a floating visual layer */
    .fk-species-prototype .fk-prototype-media {
        display: block !important;
        position: relative !important;
        z-index: 0 !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 1.25rem 0 1.75rem !important;
        padding: 0 !important;
        overflow: hidden !important;
        isolation: auto !important;
    }

    .fk-species-prototype .fk-prototype-media__frame,
    .fk-species-prototype .fk-prototype-media__link {
        display: block !important;
        position: relative !important;
        z-index: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        overflow: hidden !important;
    }

    .fk-species-prototype .fk-prototype-media__frame::before,
    .fk-species-prototype .fk-prototype-media__frame::after,
    .fk-species-prototype .fk-prototype-media__backdrop {
        display: none !important;
        content: none !important;
    }

    .fk-species-prototype .fk-prototype-media__image {
        display: block !important;
        position: relative !important;
        z-index: auto !important;
        width: auto !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: min(62vh, 520px) !important;
        margin: 0 auto !important;
        object-fit: contain !important;
        object-position: center !important;
        transform: none !important;
        animation: none !important;
    }

    .fk-species-prototype .fk-prototype-media--portrait .fk-prototype-media__image {
        max-width: min(82%, 430px) !important;
        max-height: min(58vh, 480px) !important;
    }
}

@media (max-width: 560px) {
    .fk-species-prototype .fk-prototype-media {
        margin: 1rem 0 1.5rem !important;
    }

    .fk-species-prototype .fk-prototype-media__image {
        max-height: min(54vh, 440px) !important;
    }

    .fk-species-prototype .fk-prototype-media--portrait .fk-prototype-media__image {
        max-width: min(88%, 360px) !important;
        max-height: min(52vh, 410px) !important;
    }
}

/* =========================================================================
   MOBILE PORTRAIT IMAGE SIZE TUNE
   Keeps containment fix, but lets portrait images breathe again.
   ========================================================================= */

@media (max-width: 1100px) {
    .fk-species-prototype .fk-prototype-media {
        margin: 0.75rem 0 1.15rem !important;
    }

    .fk-species-prototype .fk-prototype-media__image {
        max-height: min(68vh, 620px) !important;
    }

    .fk-species-prototype .fk-prototype-media--portrait .fk-prototype-media__image {
        max-width: min(92%, 520px) !important;
        max-height: min(66vh, 590px) !important;
    }
}

@media (max-width: 560px) {
    .fk-species-prototype .fk-prototype-media {
        margin: 0.5rem 0 1rem !important;
    }

    .fk-species-prototype .fk-prototype-media__image {
        max-height: min(62vh, 520px) !important;
    }

    .fk-species-prototype .fk-prototype-media--portrait .fk-prototype-media__image {
        max-width: min(94%, 430px) !important;
        max-height: min(80svh, 800px) !important;
    }
}

/* =========================================================================
   DESKTOP FOREGROUND IMAGE POSITION FIX v4
   Anchor the desktop fish layer to the hero inner container, not the viewport.
   This keeps the fish visually paired with the data column on wide screens
   and removes the pre-tablet jump.
   ========================================================================= */

@media (min-width: 1101px) {
    /*
       Turn off the old viewport-anchored hero pseudo image.
       We will draw the specimen on the inner container instead.
    */
    .fk-species-prototype .fk-prototype-hero::after {
        display: none !important;
        content: none !important;
        background: none !important;
    }

    .fk-species-prototype .fk-prototype-media {
        display: none !important;
    }

    .fk-species-prototype .fk-prototype-hero__inner {
        position: relative !important;
        isolation: isolate;
    }

    .fk-species-prototype .fk-prototype-hero__content,
    .fk-species-prototype .fk-prototype-identity-panel,
    .fk-species-prototype .fk-prototype-hero-alerts,
    .fk-species-prototype .fk-prototype-bio,
    .fk-species-prototype .fk-prototype-optimal,
    .fk-species-prototype .fk-prototype-suitability {
        position: relative;
        z-index: 5;
    }

    /*
       Default desktop stage.
       Left is measured from the centred inner container, not from the viewport.
       This keeps the image near the cards even on very wide displays.
    */
    .fk-species-prototype .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(500px, 43%, 650px);

        content: "" !important;
        position: absolute !important;
        z-index: 2 !important;
        pointer-events: none !important;

        top: 50% !important;
        left: var(--fk-media-left) !important;
        right: auto !important;
        transform: translateY(-50%) !important;

        width: min(
            clamp(580px, 48%, 860px),
            calc(100% - var(--fk-media-left) - 1rem)
        ) !important;

        height: clamp(430px, 42vh, 700px) !important;

        opacity: 0.92 !important;
        background-image: var(--fk-species-image) !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: transparent !important;

        filter:
            drop-shadow(0 36px 54px rgba(0, 5, 12, 0.42))
            saturate(1.04);

        -webkit-mask-image:
            linear-gradient(90deg,
                transparent 0%,
                rgba(0,0,0,0.10) 7%,
                #000 18%,
                #000 82%,
                rgba(0,0,0,0.10) 93%,
                transparent 100%
            ),
            linear-gradient(180deg,
                transparent 0%,
                rgba(0,0,0,0.10) 7%,
                #000 18%,
                #000 82%,
                rgba(0,0,0,0.10) 93%,
                transparent 100%
            ) !important;
        -webkit-mask-composite: source-in !important;

        mask-image:
            linear-gradient(90deg,
                transparent 0%,
                rgba(0,0,0,0.10) 7%,
                #000 18%,
                #000 82%,
                rgba(0,0,0,0.10) 93%,
                transparent 100%
            ),
            linear-gradient(180deg,
                transparent 0%,
                rgba(0,0,0,0.10) 7%,
                #000 18%,
                #000 82%,
                rgba(0,0,0,0.10) 93%,
                transparent 100%
            ) !important;
        mask-composite: intersect !important;
    }

    /*
       Portrait: tall stage, but still kept near the cards.
    */
    .fk-species-prototype .fk-prototype-hero:has(.fk-prototype-media--portrait) .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(540px, 46%, 700px);

        width: min(
            clamp(380px, 32%, 560px),
            calc(100% - var(--fk-media-left) - 1rem)
        ) !important;

        height: clamp(660px, 78vh, 980px) !important;
        top: 52% !important;

        background-size: cover !important;
        background-position: center center !important;

        -webkit-mask-image:
            linear-gradient(90deg,
                transparent 0%,
                rgba(0,0,0,0.10) 8%,
                #000 19%,
                #000 81%,
                rgba(0,0,0,0.10) 92%,
                transparent 100%
            ),
            linear-gradient(180deg,
                transparent 0%,
                rgba(0,0,0,0.10) 5%,
                #000 14%,
                #000 86%,
                rgba(0,0,0,0.10) 95%,
                transparent 100%
            ) !important;

        mask-image:
            linear-gradient(90deg,
                transparent 0%,
                rgba(0,0,0,0.10) 8%,
                #000 19%,
                #000 81%,
                rgba(0,0,0,0.10) 92%,
                transparent 100%
            ),
            linear-gradient(180deg,
                transparent 0%,
                rgba(0,0,0,0.10) 5%,
                #000 14%,
                #000 86%,
                rgba(0,0,0,0.10) 95%,
                transparent 100%
            ) !important;
    }

    /*
       Normal landscape: not letterbox, not viewport-right.
    */
    .fk-species-prototype .fk-prototype-hero:has(.fk-prototype-media--landscape) .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(500px, 43%, 650px);

        width: min(
            clamp(620px, 52%, 940px),
            calc(100% - var(--fk-media-left) - 1rem)
        ) !important;

        height: clamp(430px, 36vw, 660px) !important;
        top: 50% !important;

        background-size: cover !important;
        background-position: center center !important;
    }

    /*
       True panoramic: wider and shallower, but still tied to the inner container.
    */
    .fk-species-prototype .fk-prototype-hero:has(.fk-prototype-media--panoramic) .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(500px, 42%, 640px);

        width: min(
            clamp(700px, 58%, 1080px),
            calc(100% - var(--fk-media-left) - 1rem)
        ) !important;

        height: clamp(360px, 30vw, 560px) !important;
        top: 50% !important;

        background-size: cover !important;
        background-position: center center !important;
    }

    .fk-species-prototype .fk-prototype-hero:has(.fk-prototype-media--square) .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(520px, 44%, 680px);

        width: min(
            clamp(500px, 40%, 720px),
            calc(100% - var(--fk-media-left) - 1rem)
        ) !important;

        height: clamp(500px, 56vh, 760px) !important;

        background-size: cover !important;
        background-position: center center !important;
    }
}

/* Mobile/tablet: keep using the real DOM image, not the pseudo-layer */
@media (max-width: 1100px) {
    .fk-species-prototype .fk-prototype-hero__inner::after {
        display: none !important;
        content: none !important;
    }
}

/* =========================================================================
   DESKTOP IMAGE RESTORE
   Re-enable the inner pseudo-layer after failed real-image v5 test.
   ========================================================================= */

@media (min-width: 1101px) {
    .fk-species-prototype .fk-prototype-media {
        display: none !important;
    }

    .fk-species-prototype .fk-prototype-hero::after {
        display: none !important;
        content: none !important;
    }

    .fk-species-prototype .fk-prototype-hero__inner {
        position: relative !important;
        isolation: isolate;
    }

    .fk-species-prototype .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(470px, 39%, 610px);

        display: block !important;
        content: "" !important;
        position: absolute !important;
        z-index: 2 !important;
        pointer-events: none !important;

        top: 50% !important;
        left: var(--fk-media-left) !important;
        right: auto !important;
        transform: translateY(-50%) !important;

        width: min(
            clamp(580px, 48%, 900px),
            calc(100% - var(--fk-media-left) - 1rem)
        ) !important;

        height: clamp(430px, 46vh, 700px) !important;

        opacity: 0.92 !important;
        background-image: var(--fk-species-image) !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;

        -webkit-mask-image:
            linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.12) 7%, #000 18%, #000 82%, rgba(0,0,0,0.12) 93%, transparent 100%),
            linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.12) 7%, #000 18%, #000 82%, rgba(0,0,0,0.12) 93%, transparent 100%) !important;
        -webkit-mask-composite: source-in !important;

        mask-image:
            linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.12) 7%, #000 18%, #000 82%, rgba(0,0,0,0.12) 93%, transparent 100%),
            linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.12) 7%, #000 18%, #000 82%, rgba(0,0,0,0.12) 93%, transparent 100%) !important;
        mask-composite: intersect !important;
    }

    .fk-species-prototype .fk-prototype-hero:has(.fk-prototype-media--portrait) .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(500px, 41%, 640px);
        width: min(clamp(390px, 32%, 600px), calc(100% - var(--fk-media-left) - 1rem)) !important;
        height: clamp(660px, 78vh, 980px) !important;
        top: 52% !important;
    }

    .fk-species-prototype .fk-prototype-hero:has(.fk-prototype-media--landscape) .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(450px, 37%, 570px);
        width: min(clamp(700px, 56%, 1080px), calc(100% - var(--fk-media-left) - 1rem)) !important;
        height: clamp(390px, 44vh, 650px) !important;
        top: 50% !important;
    }

    .fk-species-prototype .fk-prototype-hero:has(.fk-prototype-media--panoramic) .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(440px, 36%, 560px);
        width: min(clamp(760px, 60%, 1220px), calc(100% - var(--fk-media-left) - 1rem)) !important;
        height: clamp(340px, 38vh, 560px) !important;
        top: 50% !important;
    }

    .fk-species-prototype .fk-prototype-hero:has(.fk-prototype-media--square) .fk-prototype-hero__inner::after {
        --fk-media-left: clamp(470px, 39%, 600px);
        width: min(clamp(500px, 42%, 760px), calc(100% - var(--fk-media-left) - 1rem)) !important;
        height: clamp(500px, 56vh, 760px) !important;
        top: 50% !important;
    }
}

@media (max-width: 1100px) {
    .fk-species-prototype .fk-prototype-hero__inner::after {
        display: none !important;
        content: none !important;
    }
}