body.re-ds-body {
    background:
        radial-gradient(circle at 20% 12%, rgba(136, 176, 92, 0.16), rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 82% 22%, rgba(198, 164, 92, 0.12), rgba(255, 255, 255, 0) 46%),
        radial-gradient(circle at 50% 110%, rgba(164, 18, 33, 0.12), rgba(255, 255, 255, 0) 52%),
        linear-gradient(180deg, #040506 0%, #06080b 55%, #030405 100%);
}

body.re-ds-body::before {
    background:
        url("../images/re-ds/ui/tiles/wallpaper.png") 0 0 / 512px 512px repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 20%, transparent 80%, rgba(255, 255, 255, 0.02)),
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.03), transparent 18%);
    opacity: 0.42;
    mix-blend-mode: overlay;
}

body.re-ds-body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.14) 0px,
            rgba(0, 0, 0, 0.14) 1px,
            rgba(255, 255, 255, 0) 1px,
            rgba(255, 255, 255, 0) 4px
        ),
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 58%);
    opacity: 0.07;
    mix-blend-mode: overlay;
}

.nds-shell {
    width: min(1220px, calc(100vw - 1.5rem));
    margin: 0 auto;
    padding: clamp(5rem, 8vw, 6.4rem) 0 0;
}

.nds-header__bar {
    position: relative;
    width: 100%;
    margin: 0 auto;
    height: clamp(60px, 7vw, 78px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background-image:
        url("../images/re-ds/ui/progress/track-left.png"),
        url("../images/re-ds/ui/progress/track-right.png"),
        url("../images/re-ds/ui/progress/track-mid.png");
    background-repeat: no-repeat, no-repeat, repeat-x;
    background-position: left center, right center, left center;
    background-size: auto 100%, auto 100%, auto 100%;
    box-shadow:
        0 18px 60px rgba(0, 0, 0, 0.55),
        0 6px 20px rgba(0, 0, 0, 0.35);
    overflow: visible;
    z-index: 0;
}

.nds-header__bar::before {
    content: "";
    position: absolute;
    inset: 6px clamp(46px, 6vw, 92px);
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 60%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.32), rgba(255, 255, 255, 0) 22%, rgba(0, 0, 0, 0.18));
    opacity: 0.24;
    mix-blend-mode: overlay;
    z-index: 0;
}

.nds-header__bar::after {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: clamp(-20px, -2.1vw, -14px);
    height: clamp(14px, 2.2vw, 20px);
    pointer-events: none;
    background-image: url("../images/re-ds/ui/progress/stripe.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    opacity: 0.92;
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.42));
    z-index: 1;
}

.nds-header__logo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(900px, 92%);
    height: auto;
    display: block;
    margin: 0;
    transform: translate(-50%, -38%);
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.78));
    z-index: 2;
}

.nds-header__meta {
    margin-top: clamp(2.0rem, 3.6vw, 2.8rem);
    padding: 0 0.25rem;
    text-align: center;
}

.nds-header__meta--spacer {
    min-height: clamp(3.25rem, 6vw, 4.5rem);
}

.nds-kicker {
    color: rgba(246, 241, 234, 0.72);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nds-title {
    margin-top: 0.55rem;
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}

.nds-lede {
    margin: 0.9rem auto 0;
    max-width: 64ch;
    color: rgba(246, 241, 234, 0.72);
    font-size: 1.08rem;
}

.nds-grid {
    margin-top: 1.9rem;
    display: grid;
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) 96px;
    gap: 1.2rem;
    align-items: start;
}

.nds-menu {
    position: sticky;
    top: 92px;
}

.nds-menu__inner {
    position: relative;
    border: 34px solid transparent;
    border-image: url("../images/re-ds/ui/frame.png") 52 stretch;
    background:
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 30%),
        url("../images/re-ds/ui/tiles/parchment.png");
    background-repeat: no-repeat, repeat;
    background-size: auto, 256px 256px;
    background-clip: padding-box;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.nds-menu__title {
    padding: 1.05rem 1.1rem;
    border-bottom: 1px solid rgba(70, 55, 28, 0.22);
    font-size: 1.08rem;
    letter-spacing: 0.16em;
    color: rgba(34, 26, 14, 0.92);
}

.nds-menu__nav {
    display: grid;
}

.nds-menu__link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1.1rem;
    border-top: 1px solid rgba(70, 55, 28, 0.14);
    color: rgba(24, 18, 10, 0.88);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.nds-menu__link::before {
    content: "";
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 10px;
    background-color: rgba(10, 14, 18, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.12),
        0 10px 18px rgba(0, 0, 0, 0.18);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    filter: saturate(1.1) contrast(1.08);
}

.nds-menu__link--overview::before {
    background-image: url("../images/re-ds/ui/icons/document.png");
}

.nds-menu__link--tools::before {
    background-image: url("../images/re-ds/ui/icons/gear.png");
}

.nds-menu__link--puzzles::before {
    background-image: url("../images/re-ds/ui/icons/key.png");
}

.nds-menu__link--maps::before {
    background-image: url("../images/re-ds/ui/icons/map.png");
}

.nds-menu__link--combat::before {
    background-image: url("../images/re-ds/ui/icons/knife.png");
}

.nds-menu__link--guides::before {
    background-image: url("../images/re-ds/ui/icons/medkit.png");
}

.nds-menu__link:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateX(2px);
}

.nds-menu__link.is-active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 0 1px rgba(70, 55, 28, 0.14);
    transform: translateX(4px);
}

.nds-menu__link:focus-visible {
    outline: 2px solid rgba(22, 34, 24, 0.6);
    outline-offset: 2px;
}

.nds-menu__footer {
    padding: 1rem 1.1rem 1.2rem;
    border-top: 1px solid rgba(70, 55, 28, 0.18);
}

.nds-menu__cta {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    background-image: url("../images/re-ds/ui/buttons/normal.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: rgba(246, 241, 234, 0.92);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: "Oswald", sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.nds-menu__cta:focus-visible {
    outline: 2px solid rgba(246, 241, 234, 0.65);
    outline-offset: 2px;
}

.nds-menu__cta:hover {
    background-image: url("../images/re-ds/ui/buttons/hover.png");
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.nds-menu__cta:active {
    background-image: url("../images/re-ds/ui/buttons/pressed.png");
    transform: translateY(0);
}

.nds-panel__inner {
    position: relative;
    border: 38px solid transparent;
    border-image: url("../images/re-ds/ui/frame.png") 52 stretch;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 32%),
        url("../images/re-ds/ui/tiles/parchment.png");
    background-repeat: no-repeat, repeat;
    background-size: auto, 256px 256px;
    background-clip: padding-box;
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.26);
    overflow: hidden;
}

.nds-panel__inner > * {
    position: relative;
    z-index: 1;
}

.nds-panel__inner::after,
.nds-menu__inner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.12) 0px,
            rgba(0, 0, 0, 0.12) 1px,
            rgba(255, 255, 255, 0) 1px,
            rgba(255, 255, 255, 0) 6px
        );
    opacity: 0.08;
    mix-blend-mode: multiply;
}

.nds-panel__header {
    position: relative;
    padding: 1.4rem 1.6rem 1.2rem;
    border-bottom: 0;
    background:
        linear-gradient(180deg, rgba(22, 34, 24, 0.78), rgba(22, 34, 24, 0.14)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
}

.nds-panel__header::after {
    content: "";
    display: block;
    height: 22px;
    margin-top: 1rem;
    background-image: url("../images/re-ds/ui/progress/stripe.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    opacity: 0.88;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.32));
}

.nds-panel__tag {
    margin: 0;
    color: rgba(246, 241, 234, 0.82);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.86rem;
}

.nds-panel__title {
    margin-top: 0.6rem;
    color: rgba(246, 241, 234, 0.96);
    font-size: 2rem;
}

.nds-panel__lede {
    margin-top: 0.75rem;
    max-width: 68ch;
    color: rgba(246, 241, 234, 0.76);
}

.nds-panel__grid {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.nds-card {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, rgba(224, 206, 168, 0.86), rgba(198, 176, 136, 0.88)),
        url("../images/re-ds/ui/tiles/parchment.png");
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: auto, auto, 256px 256px;
    padding: 1.15rem 1.2rem;
    box-shadow: inset 0 0 0 2px rgba(70, 55, 28, 0.12);
}

.nds-card--wide {
    grid-column: 1 / -1;
}

.nds-panel__header,
.nds-card {
    scroll-margin-top: 120px;
}

.nds-card__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    letter-spacing: 0.16em;
    color: rgba(24, 18, 10, 0.92);
}

.nds-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 12px;
    background-color: rgba(10, 14, 18, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.12),
        0 12px 22px rgba(0, 0, 0, 0.18);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    filter: saturate(1.12) contrast(1.08);
}

.nds-icon--tools {
    background-image: url("../images/re-ds/ui/icons/gear.png");
}

.nds-icon--puzzles {
    background-image: url("../images/re-ds/ui/icons/key.png");
}

.nds-icon--maps {
    background-image: url("../images/re-ds/ui/icons/map.png");
}

.nds-icon--combat {
    background-image: url("../images/re-ds/ui/icons/knife.png");
}

.nds-icon--guides {
    background-image: url("../images/re-ds/ui/icons/medkit.png");
}

.nds-card__copy {
    margin-top: 0.65rem;
    color: rgba(24, 18, 10, 0.74);
}

.nds-card__list {
    margin-top: 0.75rem;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.4rem;
    color: rgba(24, 18, 10, 0.82);
}

.nds-card__list--cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.3rem;
}

.nds-card__actions {
    margin-top: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.nds-card__hint {
    margin-top: 0.8rem;
    color: rgba(24, 18, 10, 0.66);
    font-size: 0.95rem;
}

.nds-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.6rem 1.1rem;
    border-radius: 12px;
    border: 0;
    background: transparent;
    background-image: url("../images/re-ds/ui/buttons/normal.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: rgba(246, 241, 234, 0.94);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.nds-button:focus-visible {
    outline: 2px solid rgba(22, 34, 24, 0.55);
    outline-offset: 2px;
}

.nds-button:hover {
    background-image: url("../images/re-ds/ui/buttons/hover.png");
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.nds-button:active {
    background-image: url("../images/re-ds/ui/buttons/pressed.png");
    transform: translateY(0);
}

.nds-button--ghost {
    background-image: url("../images/re-ds/ui/buttons/disabled.png");
    color: rgba(246, 241, 234, 0.9);
}

.nds-button--ghost:hover {
    background-image: url("../images/re-ds/ui/buttons/disabled.png");
}

.nds-button--ghost:active {
    background-image: url("../images/re-ds/ui/buttons/disabled.png");
}

.nds-meter {
    margin-top: 0.85rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    color: rgba(24, 18, 10, 0.82);
}

.nds-meter__label,
.nds-meter__value {
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.nds-meter__track {
    position: relative;
    display: block;
    height: 26px;
    padding: 5px 10px;
    border-radius: 14px;
    border: 0;
    box-sizing: border-box;
    background-image: url("../images/re-ds/ui/progress/track.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    overflow: hidden;
    box-shadow: none;
}

.nds-meter__fill {
    display: block;
    height: 100%;
    width: 38%;
    background: linear-gradient(90deg, rgba(80, 142, 78, 0.98), rgba(136, 176, 92, 0.92));
    border-radius: 999px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nds-button-row {
    margin-top: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.nds-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    border-radius: 12px;
    border: 0;
    background: transparent;
    background-image: url("../images/re-ds/ui/buttons/normal.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: rgba(246, 241, 234, 0.92);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.nds-chip--active {
    background-image: url("../images/re-ds/ui/buttons/hover.png");
}

.nds-chip--pressed {
    background-image: url("../images/re-ds/ui/buttons/pressed.png");
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.55);
}

.nds-chip--disabled {
    background-image: url("../images/re-ds/ui/buttons/disabled.png");
    opacity: 0.55;
    filter: saturate(0.8);
}

.nds-rail {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(8, 11, 14, 0.76), rgba(8, 11, 14, 0.9)),
        url("../images/re-ds/ui/tiles/vent.png");
    background-repeat: no-repeat, repeat;
    background-size: auto, 256px 256px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1040px) {
    .nds-grid {
        grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
    }

    .nds-rail {
        display: none;
    }
}

@media (max-width: 820px) {
    .nds-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .nds-menu {
        position: static;
    }

    .nds-panel__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .nds-card__list--cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .nds-menu__inner {
        border-width: 28px;
    }

    .nds-panel__inner {
        border-width: 30px;
    }
}

body.re-ds-body code {
    padding: 0.08rem 0.32rem;
    border-radius: 0.35rem;
    background: rgba(10, 14, 18, 0.12);
    color: rgba(24, 18, 10, 0.92);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.nds-menu__group {
    border-top: 1px solid rgba(70, 55, 28, 0.18);
}

.nds-menu__subtitle {
    padding: 0.9rem 1.1rem 0.35rem;
    color: rgba(70, 55, 28, 0.82);
    font-family: "Oswald", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nds-menu__link.is-current-page {
    background: rgba(22, 34, 24, 0.14);
    box-shadow: inset 0 0 0 1px rgba(22, 34, 24, 0.2);
}

.nds-icon--overview {
    background-image: url("../images/re-ds/ui/icons/document.png");
}

.nds-card__list a {
    color: rgba(24, 18, 10, 0.9);
    text-decoration: underline;
    text-decoration-color: rgba(24, 18, 10, 0.3);
    text-underline-offset: 0.12em;
}

.nds-panel__inner--tool {
    padding-bottom: 1.2rem;
}

.re-ds-tool-section {
    padding: 1.2rem 1.25rem;
    display: grid;
    gap: 1rem;
    min-width: 0;
    scroll-margin-top: 120px;
}

.re-ds-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.re-ds-section-title {
    color: rgba(24, 18, 10, 0.92);
    font-size: 1.45rem;
}

.re-ds-section-copy {
    max-width: 66ch;
    color: rgba(24, 18, 10, 0.74);
}

.re-ds-control-card,
.re-ds-map-card,
.re-ds-legend-card,
.re-ds-results-card,
.re-ds-detail-card,
.re-ds-metric,
.re-ds-diff-column,
.re-ds-guide-card,
.re-ds-preview-card {
    min-width: 0;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, rgba(232, 216, 182, 0.92), rgba(209, 187, 146, 0.92)),
        url("../images/re-ds/ui/tiles/parchment.png");
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: auto, auto, 256px 256px;
    box-shadow: inset 0 0 0 2px rgba(70, 55, 28, 0.1);
}

.re-ds-control-card,
.re-ds-map-card,
.re-ds-legend-card,
.re-ds-results-card,
.re-ds-detail-card {
    padding: 1rem;
}

.re-ds-control-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem;
    min-width: 0;
}

.re-ds-control-grid--compact {
    grid-template-columns: minmax(220px, 360px);
}

.re-ds-field {
    display: grid;
    gap: 0.38rem;
    min-width: 0;
}

.re-ds-field--search {
    grid-column: span 2;
}

.re-ds-field__label,
.re-ds-subtitle,
.re-ds-room-card__eyebrow,
.re-ds-detail-kicker,
.re-ds-diff-title,
.re-ds-guide-list__label,
.re-ds-preview-label {
    color: rgba(24, 18, 10, 0.88);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.re-ds-field select,
.re-ds-field input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0.72rem 0.9rem;
    border: 1px solid rgba(70, 55, 28, 0.22);
    border-radius: 14px;
    background: rgba(255, 250, 242, 0.78);
    color: rgba(24, 18, 10, 0.92);
    font: inherit;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.re-ds-field input::placeholder {
    color: rgba(24, 18, 10, 0.5);
}

.re-ds-toggle {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(24, 18, 10, 0.84);
}

.re-ds-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.re-ds-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.re-ds-version-layout {
    display: grid;
    gap: 1rem;
}

.re-ds-hotspot-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.re-ds-spotlight-card,
.re-ds-map-thumb {
    min-width: 0;
    padding: 0;
    border: 1px solid rgba(70, 55, 28, 0.18);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 252, 246, 0.72);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.re-ds-spotlight-card:hover,
.re-ds-spotlight-card:focus-visible,
.re-ds-map-thumb:hover,
.re-ds-map-thumb:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(22, 34, 24, 0.3);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
    outline: none;
}

.re-ds-spotlight-card img,
.re-ds-map-thumb img {
    width: 100%;
    display: block;
    background: rgba(13, 18, 22, 0.9);
}

.re-ds-spotlight-card img {
    aspect-ratio: 5 / 3.35;
    object-fit: cover;
}

.re-ds-spotlight-card__body,
.re-ds-map-thumb__body {
    padding: 0.8rem 0.85rem 0.9rem;
}

.re-ds-spotlight-card__eyebrow,
.re-ds-map-thumb__meta {
    color: rgba(24, 18, 10, 0.66);
    font-family: "Oswald", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.re-ds-spotlight-card__title,
.re-ds-map-thumb__title {
    margin-top: 0.25rem;
    color: rgba(24, 18, 10, 0.94);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.re-ds-spotlight-card__copy {
    margin-top: 0.4rem;
    color: rgba(24, 18, 10, 0.72);
}

.re-ds-map-strip {
    display: grid;
    grid-template-columns: repeat(11, minmax(150px, 1fr));
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.re-ds-map-thumb {
    min-width: 150px;
}

.re-ds-map-thumb.is-active {
    border-color: rgba(76, 118, 50, 0.34);
    box-shadow: inset 0 0 0 2px rgba(76, 118, 50, 0.18);
}

.re-ds-map-thumb img {
    aspect-ratio: 1.05 / 1;
    object-fit: contain;
    padding: 0.45rem;
}

.re-ds-version-callout {
    margin-top: 0.95rem;
    padding: 1rem;
    border-radius: 14px;
    background: rgba(17, 28, 18, 0.09);
    box-shadow: inset 0 0 0 1px rgba(22, 34, 24, 0.08);
}

.re-ds-version-callout__eyebrow,
.re-ds-version-card__platform,
.re-ds-feature-cell__version {
    color: rgba(24, 18, 10, 0.68);
    font-family: "Oswald", sans-serif;
    font-size: 0.84rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.re-ds-version-callout__title,
.re-ds-version-card__title {
    color: rgba(24, 18, 10, 0.94);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.re-ds-version-callout__title {
    margin-top: 0.35rem;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.re-ds-version-callout__copy,
.re-ds-version-card__summary {
    margin-top: 0.5rem;
    color: rgba(24, 18, 10, 0.74);
}

.re-ds-version-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.re-ds-version-card {
    min-width: 0;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(70, 55, 28, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, rgba(232, 216, 182, 0.92), rgba(209, 187, 146, 0.92)),
        url("../images/re-ds/ui/tiles/parchment.png");
    box-shadow: inset 0 0 0 2px rgba(70, 55, 28, 0.08);
}

.re-ds-version-card.is-primary {
    background:
        linear-gradient(180deg, rgba(127, 171, 94, 0.24), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, rgba(232, 216, 182, 0.92), rgba(209, 187, 146, 0.92)),
        url("../images/re-ds/ui/tiles/parchment.png");
    box-shadow: inset 0 0 0 2px rgba(76, 118, 50, 0.18);
}

.re-ds-version-card.is-secondary {
    background:
        linear-gradient(180deg, rgba(175, 146, 58, 0.18), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, rgba(232, 216, 182, 0.92), rgba(209, 187, 146, 0.92)),
        url("../images/re-ds/ui/tiles/parchment.png");
}

.re-ds-version-card__meta {
    margin-top: 0.6rem;
    color: rgba(24, 18, 10, 0.76);
}

.re-ds-score-grid {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.5rem;
}

.re-ds-score-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
}

.re-ds-score-row dt {
    color: rgba(24, 18, 10, 0.72);
}

.re-ds-score-row dd {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.re-ds-score {
    position: relative;
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    height: 10px;
    border-radius: 999px;
    background: rgba(20, 24, 28, 0.12);
    overflow: hidden;
}

.re-ds-score__fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, rgba(76, 118, 50, 0.95), rgba(148, 178, 88, 0.92));
    border-radius: inherit;
}

.re-ds-score__value {
    flex: 0 0 auto;
    color: rgba(24, 18, 10, 0.76);
    font-size: 0.92rem;
}

.re-ds-feature-list {
    display: grid;
    gap: 0.85rem;
}

.re-ds-feature-row {
    min-width: 0;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(70, 55, 28, 0.18);
    background: rgba(255, 252, 246, 0.46);
    box-shadow: inset 0 0 0 1px rgba(70, 55, 28, 0.08);
}

.re-ds-feature-row__label {
    color: rgba(24, 18, 10, 0.9);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.re-ds-feature-row__values {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.re-ds-feature-cell {
    min-width: 0;
    padding: 0.75rem 0.8rem;
    border-radius: 14px;
    background: rgba(255, 252, 246, 0.68);
    box-shadow: inset 0 0 0 1px rgba(70, 55, 28, 0.08);
}

.re-ds-feature-cell.is-primary {
    background: rgba(217, 229, 205, 0.62);
}

.re-ds-feature-cell.is-secondary {
    background: rgba(232, 224, 196, 0.72);
}

.re-ds-feature-cell p {
    margin-top: 0.4rem;
    color: rgba(24, 18, 10, 0.76);
    overflow-wrap: anywhere;
}

.re-ds-metric {
    padding: 0.95rem 1rem;
}

.re-ds-metric__label {
    color: rgba(24, 18, 10, 0.74);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.re-ds-metric__value {
    margin-top: 0.35rem;
    color: rgba(24, 18, 10, 0.94);
    font-family: "Oswald", sans-serif;
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.re-ds-metric__note {
    margin-top: 0.32rem;
    color: rgba(24, 18, 10, 0.68);
    font-size: 0.98rem;
}

.re-ds-map-layout,
.re-ds-results-layout,
.re-ds-detail-grid,
.re-ds-mode-columns {
    min-width: 0;
}

.re-ds-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 1rem;
    align-items: start;
}

.re-ds-map-stage {
    padding: 0.25rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(12, 16, 19, 0.84), rgba(15, 19, 22, 0.96));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.re-ds-map-viewport {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(6, 10, 12, 0.9), rgba(11, 16, 19, 0.96)),
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.04), transparent 20%);
}

.re-ds-map-image,
.re-ds-map-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.re-ds-map-image {
    object-fit: contain;
}

.re-ds-room-shape {
    fill: rgba(196, 200, 176, 0.12);
    stroke: rgba(255, 246, 223, 0.35);
    stroke-width: 2;
    cursor: pointer;
    transition: fill 0.18s ease, stroke 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.re-ds-room-shape:hover,
.re-ds-room-shape:focus-visible {
    fill: rgba(188, 200, 80, 0.34);
    stroke: rgba(255, 246, 223, 0.8);
    outline: none;
}

.re-ds-room-shape.is-warm {
    fill: rgba(175, 146, 58, 0.38);
}

.re-ds-room-shape.is-hot {
    fill: rgba(162, 37, 37, 0.5);
}

.re-ds-room-shape.is-selected {
    fill: rgba(118, 176, 90, 0.46);
    stroke: rgba(236, 248, 230, 0.94);
    filter: drop-shadow(0 0 10px rgba(140, 196, 114, 0.4));
}

.re-ds-map-caption,
.re-ds-legend-copy,
.re-ds-muted,
.re-ds-room-card__meta,
.re-ds-detail-copy,
.re-ds-guide-list__note,
.re-ds-empty,
.re-ds-room-card__hint {
    color: rgba(24, 18, 10, 0.68);
}

.re-ds-map-caption {
    margin-top: 0.75rem;
}

.re-ds-legend-list {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.re-ds-legend-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(24, 18, 10, 0.82);
}

.re-ds-legend-swatch {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 246, 223, 0.55);
    flex: 0 0 auto;
}

.re-ds-legend-swatch--quiet {
    background: rgba(196, 200, 176, 0.2);
}

.re-ds-legend-swatch--medium {
    background: rgba(175, 146, 58, 0.58);
}

.re-ds-legend-swatch--hot {
    background: rgba(162, 37, 37, 0.68);
}

.re-ds-results-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
}

.re-ds-results-card__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.re-ds-room-list {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.7rem;
}

.re-ds-room-card {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(70, 55, 28, 0.18);
    background: rgba(255, 252, 246, 0.48);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.re-ds-room-card:hover,
.re-ds-room-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(22, 34, 24, 0.32);
    outline: none;
    background: rgba(255, 252, 246, 0.72);
}

.re-ds-room-card.is-active {
    border-color: rgba(22, 34, 24, 0.42);
    background: rgba(217, 229, 205, 0.46);
    box-shadow: inset 0 0 0 1px rgba(22, 34, 24, 0.16);
}

.re-ds-room-card__title,
.re-ds-detail-title {
    color: rgba(24, 18, 10, 0.94);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.re-ds-room-card__title {
    font-size: 1.1rem;
}

.re-ds-room-card__counts,
.re-ds-pill-row,
.re-ds-guide-list,
.re-ds-entry-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.re-ds-pill,
.re-ds-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 20, 25, 0.12);
    color: rgba(24, 18, 10, 0.88);
    font-family: "Oswald", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.re-ds-pill--accent {
    background: rgba(76, 118, 50, 0.16);
}

.re-ds-count-pill--hot {
    background: rgba(162, 37, 37, 0.16);
}

.re-ds-count-pill--cool {
    background: rgba(76, 118, 50, 0.14);
}

.re-ds-room-detail {
    display: grid;
    gap: 1.15rem;
}

.re-ds-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto;
    gap: 1rem 1.2rem;
    align-items: start;
}

.re-ds-detail-hero > div:first-child {
    min-width: 0;
    display: grid;
    gap: 0.55rem;
}

.re-ds-detail-kicker {
    font-size: 0.86rem;
    line-height: 1.35;
    color: rgba(24, 18, 10, 0.74);
    overflow-wrap: anywhere;
}

.re-ds-detail-title {
    line-height: 1.14;
    overflow-wrap: anywhere;
}

.re-ds-detail-copy {
    max-width: 72ch;
}

.re-ds-preview-card {
    padding: 0.8rem;
}

.re-ds-fan-art-link {
    display: grid;
    gap: 0.65rem;
    color: inherit;
    text-decoration: none;
}

.re-ds-preview-card img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(70, 55, 28, 0.12);
    aspect-ratio: 5 / 4;
    object-fit: cover;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.re-ds-fan-art-link:hover img,
.re-ds-fan-art-link:focus-visible img {
    transform: translateY(-2px);
    border-color: rgba(113, 72, 31, 0.42);
    box-shadow: 0 14px 28px rgba(49, 30, 11, 0.18);
}

.re-ds-fan-art-link:focus-visible {
    outline: 2px solid rgba(113, 72, 31, 0.58);
    outline-offset: 4px;
    border-radius: 16px;
}

.re-ds-fan-art-link__hint {
    color: rgba(70, 45, 14, 0.8);
    font-family: "Oswald", sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-align: right;
    text-transform: uppercase;
}

.re-ds-lightbox {
    width: min(96vw, 1080px);
    max-width: 1080px;
    max-height: 94vh;
    padding: 1rem;
    border: none;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(36, 27, 18, 0.96), rgba(12, 9, 7, 0.98)),
        rgba(12, 9, 7, 0.98);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
}

.re-ds-lightbox::backdrop {
    background: rgba(8, 6, 4, 0.82);
    backdrop-filter: blur(4px);
}

.re-ds-lightbox__toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.8rem;
}

.re-ds-lightbox__close {
    min-height: 42px;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 246, 231, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(246, 241, 234, 0.94);
    cursor: pointer;
    font: inherit;
}

.re-ds-lightbox__figure {
    margin: 0;
    display: grid;
    gap: 0.85rem;
}

.re-ds-lightbox__figure img {
    width: 100%;
    max-height: calc(94vh - 120px);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

.re-ds-lightbox__caption {
    color: rgba(246, 241, 234, 0.82);
    font-family: "Oswald", sans-serif;
    font-size: 0.96rem;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
}

.re-ds-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.95rem;
}

.re-ds-guide-card,
.re-ds-diff-column {
    padding: 1rem 1.05rem;
}

.re-ds-guide-list {
    margin-top: 0.7rem;
    display: grid;
    gap: 0.65rem;
}

.re-ds-guide-list li {
    list-style: none;
    min-width: 0;
    display: grid;
    gap: 0.2rem;
}

.re-ds-guide-list__note,
.re-ds-entry-list li,
.re-ds-room-card__hint,
.re-ds-detail-copy {
    overflow-wrap: anywhere;
}

.re-ds-mode-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.95rem;
}

.re-ds-diff-column--added {
    background:
        linear-gradient(180deg, rgba(127, 171, 94, 0.22), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, rgba(232, 216, 182, 0.92), rgba(209, 187, 146, 0.92)),
        url("../images/re-ds/ui/tiles/parchment.png");
}

.re-ds-diff-column--removed {
    background:
        linear-gradient(180deg, rgba(166, 69, 63, 0.18), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, rgba(232, 216, 182, 0.92), rgba(209, 187, 146, 0.92)),
        url("../images/re-ds/ui/tiles/parchment.png");
}

.re-ds-diff-column--shared {
    background: rgba(255, 252, 246, 0.62);
}

.re-ds-diff-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(70, 55, 28, 0.12);
}

.re-ds-diff-title__meta {
    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;
}

.re-ds-entry-list {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.45rem;
}

.re-ds-entity-strip {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.re-ds-entity-strip--compact {
    gap: 0.38rem;
}

.re-ds-entity-thumb {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    border-radius: 12px;
    border: 1px solid rgba(70, 55, 28, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
        rgba(255, 252, 246, 0.72);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        0 8px 20px rgba(33, 24, 14, 0.08);
    overflow: hidden;
}

.re-ds-entity-thumb--compact {
    width: 42px;
    height: 42px;
    padding: 0.16rem;
    border-radius: 10px;
}

.re-ds-entity-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.re-ds-entity-thumb.is-contain img {
    object-fit: contain;
    background: radial-gradient(circle at 50% 50%, rgba(246, 241, 234, 0.78), rgba(246, 241, 234, 0.26));
}

.re-ds-entry-list li {
    list-style: none;
    display: block;
    padding: 0.55rem 0.6rem;
    border: 1px solid rgba(70, 55, 28, 0.12);
    border-radius: 14px;
    background: rgba(255, 252, 246, 0.48);
    color: rgba(24, 18, 10, 0.86);
}

.re-ds-entry-list__main {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
}

.re-ds-entry-list__copy {
    min-width: 0;
    display: grid;
    gap: 0.22rem;
}

.re-ds-entry-list__label {
    min-width: 0;
    font-weight: 600;
    color: rgba(24, 18, 10, 0.92);
}

.re-ds-entry-list li:last-child {
    padding-bottom: 0.55rem;
}

.re-ds-entry-list__category {
    width: fit-content;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(15, 20, 25, 0.08);
    color: rgba(24, 18, 10, 0.62);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.re-ds-reference-grid {
    padding: 0;
}

.re-ds-empty {
    padding: 0.9rem;
    border-radius: 12px;
    background: rgba(255, 252, 246, 0.52);
}

.re-ds-loading {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 252, 246, 0.52);
    color: rgba(24, 18, 10, 0.76);
}

@media (max-width: 1040px) {
    .re-ds-hotspot-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .re-ds-version-grid,
    .re-ds-feature-row__values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .re-ds-map-layout,
    .re-ds-results-layout,
    .re-ds-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .re-ds-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .re-ds-control-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .re-ds-field--search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .re-ds-hotspot-gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .re-ds-version-grid,
    .re-ds-feature-row__values {
        grid-template-columns: minmax(0, 1fr);
    }

    .re-ds-tool-section {
        padding: 1rem;
    }

    .re-ds-control-grid,
    .re-ds-metric-grid,
    .re-ds-mode-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .re-ds-map-card,
    .re-ds-legend-card,
    .re-ds-results-card,
    .re-ds-detail-card,
    .re-ds-control-card {
        padding: 0.85rem;
    }

    .re-ds-entry-list li {
        padding: 0.5rem 0.55rem;
    }

    .re-ds-entity-thumb {
        width: 50px;
        height: 50px;
    }
}
