/* RE-DS Threat Guide page-specific styling. Keep overrides scoped. */

.nds-shell[data-re-ds-threat-guide] {
    width: min(1480px, calc(100vw - 1.5rem));
}

@media (min-width: 821px) {
    .nds-shell[data-re-ds-threat-guide] .nds-grid {
        grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
    }
}

.nds-shell[data-re-ds-threat-guide] .nds-rail {
    display: none;
}

[data-re-ds-threat-guide] .re-ds-threat-grid .re-ds-threat-field--wide,
[data-re-ds-threat-guide] .re-ds-threat-grid .re-ds-field--wide {
    grid-column: span 4;
}

[data-re-ds-threat-guide] .re-ds-threat-meta {
    margin-top: 0.85rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
}

[data-re-ds-threat-guide] .re-ds-threat-count {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

[data-re-ds-threat-guide] .re-ds-threat-layout {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 1.1rem;
    align-items: start;
    min-width: 0;
}

[data-re-ds-threat-guide] .re-ds-threat-list {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.7rem;
    min-width: 0;
}

[data-re-ds-threat-guide] .re-ds-threat-card__row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    min-width: 0;
}

[data-re-ds-threat-guide] .re-ds-threat-card__body {
    min-width: 0;
}

[data-re-ds-threat-guide] .re-ds-threat-thumb {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    border: 1px solid rgba(70, 55, 28, 0.18);
    background: rgba(12, 16, 19, 0.92);
    object-fit: cover;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 14px 24px rgba(0, 0, 0, 0.16);
}

[data-re-ds-threat-guide] .re-ds-threat-thumb--placeholder {
    display: block;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 55%),
        rgba(12, 16, 19, 0.92);
}

[data-re-ds-threat-guide] .re-ds-threat-card__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.7rem;
    min-width: 0;
}

[data-re-ds-threat-guide] .re-ds-threat-card__meta {
    margin-top: 0.35rem;
    color: rgba(24, 18, 10, 0.72);
    overflow-wrap: anywhere;
}

[data-re-ds-threat-guide] .re-ds-threat-card__strip {
    margin-top: 0.75rem;
    padding: 0.6rem 0.65rem;
    border-radius: 16px;
    border: 1px solid rgba(70, 55, 28, 0.12);
    background: rgba(255, 252, 246, 0.38);
}

[data-re-ds-threat-guide] .re-ds-threat-card__strip-label {
    margin: 0;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(24, 18, 10, 0.68);
}

[data-re-ds-threat-guide] .re-ds-threat-card__strip .re-ds-entity-strip {
    margin-top: 0.55rem;
}

[data-re-ds-threat-guide] .re-ds-threat-detail-placeholder {
    padding: 0.25rem 0.1rem;
    color: rgba(24, 18, 10, 0.74);
}

/* Kind pills */
[data-re-ds-threat-guide] .re-ds-pill--enemy {
    background: rgba(18, 74, 118, 0.18);
}

[data-re-ds-threat-guide] .re-ds-pill--boss {
    background: rgba(162, 37, 37, 0.18);
}

[data-re-ds-threat-guide] .re-ds-pill--hazard {
    background: rgba(175, 146, 58, 0.22);
}

[data-re-ds-threat-guide] .re-ds-pill--setpiece {
    background: rgba(98, 64, 160, 0.18);
}

[data-re-ds-threat-guide] .re-ds-detail-card {
    box-shadow:
        inset 0 0 0 2px rgba(70, 55, 28, 0.1),
        0 18px 44px rgba(0, 0, 0, 0.12);
}

[data-re-ds-threat-guide] .re-ds-detail-card {
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(70, 55, 28, 0.32) rgba(15, 20, 25, 0.08);
}

[data-re-ds-threat-guide] .re-ds-detail-card::-webkit-scrollbar {
    width: 12px;
}

[data-re-ds-threat-guide] .re-ds-detail-card::-webkit-scrollbar-thumb {
    background: rgba(70, 55, 28, 0.22);
    border-radius: 999px;
    border: 3px solid rgba(255, 252, 246, 0.42);
}

[data-re-ds-threat-guide] .re-ds-detail-card::-webkit-scrollbar-track {
    background: rgba(15, 20, 25, 0.06);
    border-radius: 999px;
}

[data-re-ds-threat-guide] .re-ds-detail-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 360px);
    align-items: start;
}

[data-re-ds-threat-guide] .re-ds-preview-card.re-ds-threat-preview img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: radial-gradient(circle at 35% 35%, rgba(246, 241, 234, 0.86), rgba(246, 241, 234, 0.22));
}

[data-re-ds-threat-guide] .re-ds-preview-card.re-ds-threat-preview {
    border-color: rgba(70, 55, 28, 0.14);
    background: rgba(255, 252, 246, 0.58);
    box-shadow: inset 0 0 0 1px rgba(70, 55, 28, 0.1);
}

[data-re-ds-threat-guide] .re-ds-detail-grid.re-ds-threat-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(70, 55, 28, 0.12);
}

[data-re-ds-threat-guide] .re-ds-threat-block {
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(70, 55, 28, 0.12);
}

[data-re-ds-threat-guide] .re-ds-threat-block:first-child {
    margin-top: 0.75rem;
}

[data-re-ds-threat-guide] .re-ds-threat-compare {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

[data-re-ds-threat-guide] .re-ds-threat-compare-col {
    min-width: 0;
    padding: 0.75rem 0.8rem;
    border-radius: 16px;
    border: 1px solid rgba(70, 55, 28, 0.12);
    background: rgba(255, 252, 246, 0.46);
}

[data-re-ds-threat-guide] .re-ds-threat-compare-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(70, 55, 28, 0.12);
}

[data-re-ds-threat-guide] .re-ds-threat-compare-tag {
    flex: 0 0 auto;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 20, 25, 0.08);
    color: rgba(24, 18, 10, 0.66);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

[data-re-ds-threat-guide] .re-ds-entity-thumb {
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

[data-re-ds-threat-guide] .re-ds-entity-thumb:hover,
[data-re-ds-threat-guide] .re-ds-entity-thumb:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(22, 34, 24, 0.32);
    outline: none;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        0 10px 24px rgba(33, 24, 14, 0.12);
}

[data-re-ds-threat-guide] .re-ds-room-detail.is-entering {
    animation: reDsThreatGuideDetailIn 160ms ease-out;
}

@keyframes reDsThreatGuideDetailIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 981px) {
    [data-re-ds-threat-guide] .re-ds-detail-card {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow: auto;
        scrollbar-gutter: stable;
    }
}

@media (max-width: 980px) {
    [data-re-ds-threat-guide] .re-ds-threat-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    [data-re-ds-threat-guide] .re-ds-detail-hero,
    [data-re-ds-threat-guide] .re-ds-detail-grid.re-ds-threat-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    [data-re-ds-threat-guide] .re-ds-threat-compare {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-re-ds-threat-guide] .re-ds-room-detail.is-entering {
        animation: none;
    }
}

