.species-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 370px));
    gap: 1.5rem;
    margin-top: 2rem;
}
.species-card {
    overflow: hidden;
    background: white;
    border: 1px solid #d5e7ea;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}
.species-card img { display: block; width: 100%; height: auto; }
#specie .species-card > img,
#specie .species-card > .luogo-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
}
#specie .species-card > img {
    height: auto;
    object-fit: cover;
    object-position: center 48%;
}
.luogo-photo {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e8f4f6;
    color: #536675;
}
.luogo-photo img,
.species-figure .luogo-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.luogo-photo img[hidden] { display: none; }
.species-figure .luogo-photo { border-radius: var(--border-radius); }
.species-card-body { padding: 1.25rem; }
.species-card-body h3 mark {
    padding: 0 0.08em;
    color: inherit;
    background: #c9eef5;
    border-radius: 0.2rem;
}
.species-card-body h3 { margin: 0.75rem 0 0; }
.species-latin { color: #536675; }
.species-card-body .btn { margin-top: 1rem; }
.species-photo-credit { margin-top: 0.75rem; font-size: 0.8rem; color: #536675; }
#specie .species-catalog { margin-top: 1rem; }
#specie .species-card { display: flex; flex-direction: column; }
#specie .species-card-body { display: flex; flex: 1; flex-direction: column; }
#specie .species-card-body .btn { align-self: flex-start; margin-top: auto; }
#specie .species-catalog .species-card[hidden],
.species-group[hidden] { display: none; }
.species-filter-options { display: grid; gap: 0.75rem; padding: 0.65rem; border-top: 1px solid #e0e9e9; }
.species-filter-options fieldset { padding-top: 0.65rem; border: 0; }
.species-filter-options legend { padding: 0 0.25rem; color: #35485a; font-size: 0.86rem; font-weight: 700; }

.species-search { margin-top: 1.25rem; }
.species-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
}
.species-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; }
.species-search-field { position: relative; display: flex; align-items: center; min-width: 0; }
.species-search-icon {
    position: absolute;
    left: 0.9rem;
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: #326273;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.species-search-field input {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 2.9rem 0.65rem 2.75rem;
    color: var(--color-primary);
    background: #f8fbfb;
    border: 1px solid #9abfc4;
    border-radius: 0.6rem;
    font: inherit;
}
.species-search-field input::placeholder { color: #5f7382; opacity: 1; }
.species-search-field input:hover { border-color: #78bcc8; }
.species-search-field input:focus { background: #fff; border-color: #087c91; }
.species-search-field:focus-within .species-search-icon { stroke: #087c91; }
.species-search-field input::-webkit-search-cancel-button,
.species-search-field input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.species-search-clear {
    position: absolute;
    right: 0.45rem;
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #326273;
    background: #e4f2f4;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}
.species-search-clear[hidden] { display: none; }
.species-search-clear:hover { color: #fff; background: #087c91; }
.species-search-clear svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.species-search-submit {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    white-space: nowrap;
}
.species-search-submit svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.species-search-noscript { margin-top: 1rem; color: #536675; font-size: 0.9rem; }
.species-empty {
    display: grid;
    gap: 0.35rem;
    justify-items: start;
    margin-top: 1.25rem;
}
.species-empty[hidden] { display: none; }
.species-empty p { margin: 0; color: #536675; }
.species-empty strong { color: #173247; }
.species-empty .btn { margin-top: 0.35rem; }
@media (max-width: 520px) {
    .species-search-controls { grid-template-columns: 1fr; }
    .species-search-submit { width: 100%; }
}

.species-detail { max-width: 1000px; padding-top: 2rem; }
.species-detail section { padding: 2rem 0 0; }
.species-back { display: inline-block; margin-bottom: 1.5rem; }
.species-intro { display: grid; gap: 1.5rem; align-items: center; }
.species-intro h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.6rem 0 0.4rem; }
.species-intro .species-latin { font-size: 1.15rem; }
.species-meta { margin-top: 1rem; }
.species-figure img { display: block; width: 100%; height: auto; border-radius: var(--border-radius); }
.species-figure figcaption { margin-top: 0.45rem; font-size: 0.78rem; line-height: 1.45; color: #536675; }
.species-figure figcaption a { color: inherit; font-weight: 700; }
.species-figure figcaption a:hover,
.species-figure figcaption a:focus-visible { color: #1f6675; }
.species-index { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 1.75rem; }
.species-detail h3 { margin-bottom: 0.75rem; font-size: 1.5rem; }
.species-detail h4 { margin: 1rem 0 0.25rem; font-size: 1.05rem; }
.species-detail ul { padding-left: 1.3rem; }
.species-detail li + li { margin-top: 0.4rem; }
.species-detail section[id] { scroll-margin-top: 6rem; }
.species-facts { margin-top: 1rem; border-top: 1px solid #d5e7ea; }
.species-facts div { display: grid; grid-template-columns: minmax(110px, 190px) 1fr; gap: 0.5rem; padding: 0.75rem 0; border-bottom: 1px solid #d5e7ea; }
.species-facts dt { font-weight: 700; }
.species-facts dd { margin: 0; }
.species-notice { margin-top: 1rem; padding: 1rem; border-left: 4px solid var(--color-accent); background: #e8f4f6; }
.species-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.species-sources { font-size: 0.9rem; }
@media (min-width: 768px) {
    .species-intro { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem; }
}
@media (min-width: 900px) {
    #specie .species-catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (max-width: 600px) {
    #specie { padding-right: 0.15rem; padding-left: 0.15rem; }
    #specie .species-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; }
    #specie .species-card-body { padding: 0.8rem; overflow-wrap: anywhere; }
    #specie .species-card-body h3 { margin-top: 0.5rem; font-size: 0.98rem; line-height: 1.25; }
    #specie .species-card-body .species-latin { font-size: 0.78rem; }
    #specie .species-card-body > p:not(.species-latin) { display: none; }
    #specie .species-card-body .btn {
        display: flex;
        width: 100%;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        margin-top: auto;
        padding: 0.45rem 0.3rem;
        font-size: 0.78rem;
        line-height: 1.2;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .species-facts div { grid-template-columns: 1fr; gap: 0.15rem; }
}
.luogo-summary { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 1.5rem; }
.luogo-summary .species-notice { flex: 1 1 26rem; }
.luogo-summary > p { margin-top: 1rem; }
.luogo-status { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 0.4rem; font-size: 0.8rem; font-weight: 700; }
.luogo-status-verified { color: #15552e; background: #d7efdd; }
.luogo-status-reserved { color: #714500; background: #fff0c7; }
.luogo-status-check { color: #743114; background: #ffe4d5; }
.luogo-status-unavailable { color: #374151; background: #e5e7eb; }
