.srd-bestiary {
    color: #e7bf8f;
    margin: 0 auto;
    max-width: 1440px;
    padding: 2.5rem 1.25rem;
}

.srd-bestiary__header {
    margin-bottom: 1.5rem;
}

.srd-bestiary__eyebrow,
.srd-bestiary__status,
.srd-bestiary-card__type,
.srd-bestiary-card__meta {
    color: rgba(231, 191, 143, 0.82);
}

.srd-bestiary h1,
.srd-bestiary h2,
.srd-bestiary h3 {
    color: #fec76f;
    letter-spacing: 0;
}

.srd-bestiary__header h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 1;
    margin: 0;
}

.srd-bestiary__filters {
    align-items: end;
    background: #1e2d34;
    border: 1px solid rgba(231, 191, 143, 0.38);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 1fr) minmax(92px, 140px) minmax(92px, 140px) auto;
    margin-bottom: 1rem;
    padding: 1rem;
}

.srd-bestiary__field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.srd-bestiary__field span {
    color: #e7bf8f;
    font-size: 0.95rem;
}

.srd-bestiary__field input {
    background: #212429;
    border: 1px solid rgba(231, 191, 143, 0.45);
    border-radius: 6px;
    color: #ded0b6;
    min-height: 46px;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    width: 100%;
}

.srd-bestiary__field input::placeholder {
    color: rgba(222, 208, 182, 0.45);
}

.srd-bestiary__actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    min-width: max-content;
}

.srd-bestiary__actions .btn,
.srd-bestiary-pagination a {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 46px;
    text-decoration: none;
}

.srd-bestiary__status {
    min-height: 1.5rem;
    padding: 0 0.25rem 0.75rem;
}

.srd-bestiary__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.srd-bestiary-card {
    background: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.26);
    border-radius: 8px;
    color: #ded0b6;
    display: grid;
    gap: 0.75rem;
    min-height: 245px;
    padding: 1rem;
    text-decoration: none;
}

.srd-bestiary-card:hover,
.srd-bestiary-card:focus {
    background: #1b2a32;
    border-color: rgba(231, 191, 143, 0.55);
    color: #ded0b6;
    outline: none;
}

.srd-bestiary-card h2 {
    color: #fec76f;
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 0;
    overflow-wrap: anywhere;
}

.srd-bestiary-card p {
    margin: 0;
}

.srd-bestiary-card__type {
    font-size: 0.9rem;
    text-transform: capitalize;
}

.srd-bestiary-card__stats {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.srd-bestiary-card__stats span {
    background: rgba(8, 13, 17, 0.45);
    border: 1px solid rgba(231, 191, 143, 0.12);
    border-radius: 6px;
    color: #ded0b6;
    display: grid;
    gap: 0.15rem;
    min-height: 52px;
    padding: 0.45rem 0.55rem;
}

.srd-bestiary-card__stats strong {
    color: rgba(231, 191, 143, 0.78);
    font-size: 0.75rem;
    font-weight: 600;
}

.srd-bestiary-card__meta {
    font-size: 0.95rem;
}

.srd-bestiary-card__summary {
    color: rgba(222, 208, 182, 0.78);
    line-height: 1.45;
}

.srd-bestiary__empty {
    background: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.28);
    border-radius: 8px;
    color: #ded0b6;
    padding: 1rem;
}

.srd-bestiary-pagination {
    align-items: center;
    color: #ded0b6;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.srd-bestiary-pagination a {
    background: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.35);
    border-radius: 6px;
    color: #fec76f;
    padding: 0.6rem 0.9rem;
}

.srd-bestiary-related a {
    color: #fec76f;
}

.srd-bestiary--detail {
    padding-top: 2rem;
}

.srd-bestiary--detail .monster-details {
    max-width: 1200px;
}

.srd-bestiary--detail .info-card,
.srd-bestiary--detail .action-section {
    color: #e7bf8f;
}

.srd-bestiary--detail .monster-ability-list {
    align-items: start;
}

.srd-bestiary--detail .monster-ability-card,
.srd-bestiary--detail .monster-ability-card__body,
.srd-bestiary--detail .action-description {
    max-width: 100%;
    min-width: 0;
}

.srd-bestiary--detail .monster-ability-card {
    height: auto;
    overflow: hidden;
}

.srd-bestiary--detail .stat-row {
    gap: 1rem;
}

.srd-bestiary--detail .row-value {
    color: #ded0b6;
    font-weight: 700;
}

.srd-bestiary--detail .monster-ability-card__name {
    color: #fec76f;
}

.srd-bestiary--detail .action-description {
    color: #ded0b6;
    overflow-wrap: anywhere;
    word-break: normal;
}

.bestiary-reference-text p {
    color: #e9be8b;
    line-height: 1.65;
}

.srd-bestiary-related,
.srd-bestiary__license {
    background: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.24);
    border-radius: 8px;
    margin: 1.5rem auto 0;
    max-width: 1200px;
    padding: 1.25rem;
}

.srd-bestiary-related div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.srd-bestiary__license p {
    color: #ded0b6;
    margin: 0;
}

.srd-bestiary-loading-card {
    background: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.2);
    border-radius: 8px;
    display: grid;
    gap: 0.85rem;
    min-height: 245px;
    padding: 1rem;
}

.srd-bestiary-loading-line {
    animation: srd-bestiary-pulse 1.15s ease-in-out infinite;
    background: rgba(231, 191, 143, 0.14);
    border-radius: 6px;
    height: 1rem;
}

.srd-bestiary-loading-line--title {
    height: 1.45rem;
    width: 72%;
}

.srd-bestiary-loading-line--stats {
    height: 3rem;
    width: 100%;
}

.srd-bestiary-loading-label {
    align-items: center;
    color: rgba(231, 191, 143, 0.78);
    display: inline-flex;
    gap: 0.5rem;
}

.srd-bestiary-spinner {
    animation: srd-bestiary-spin 0.85s linear infinite;
    border: 2px solid rgba(231, 191, 143, 0.25);
    border-top-color: #fec76f;
    border-radius: 50%;
    height: 1rem;
    width: 1rem;
}

@keyframes srd-bestiary-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes srd-bestiary-pulse {
    50% {
        opacity: 0.45;
    }
}

@media (max-width: 980px) {
    .srd-bestiary__filters {
        grid-template-columns: minmax(0, 1fr) minmax(92px, 1fr) minmax(92px, 1fr);
    }

    .srd-bestiary__field--search,
    .srd-bestiary__actions {
        grid-column: 1 / -1;
    }

    .srd-bestiary__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .srd-bestiary {
        padding: 2rem 1rem;
    }

    .srd-bestiary__filters {
        grid-template-columns: 1fr;
    }

    .srd-bestiary__field--search,
    .srd-bestiary__actions {
        grid-column: auto;
    }

    .srd-bestiary__actions {
        flex-wrap: wrap;
    }

    .srd-bestiary__actions .btn {
        flex: 1 1 140px;
    }
}
