:root {
    --nv-db-ink: #070202;
    --nv-db-night: #110303;
    --nv-db-blood: #5a0f0a;
    --nv-db-lava: #ff5b1f;
    --nv-db-ember: #ff9f4a;
    --nv-db-bone: #f6e2cb;
    --nv-db-muted: #d1b09b;
    --nv-db-line: rgb(255 214 189 / 0.12);
}

.nv-db {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow: clip;
    color: var(--nv-db-bone);
    background:
        radial-gradient(circle at 74% 10%, rgb(255 85 31 / 0.16), transparent 28rem),
        radial-gradient(circle at 12% 56%, rgb(255 128 42 / 0.08), transparent 22rem),
        linear-gradient(180deg, #140505 0%, #0c0202 50%, #060101 100%);
}

.nv-db::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.12;
    background-image:
        linear-gradient(rgb(255 255 255 / 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.018) 1px, transparent 1px);
    background-size: 74px 74px;
    mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 82%, transparent 100%);
}

.nv-db__ambient {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.nv-db__ambient-orb,
.nv-db__ambient-smoke {
    position: absolute;
    border-radius: 50%;
    filter: blur(92px);
}

.nv-db__ambient-orb {
    top: 18rem;
    right: 6%;
    width: 42rem;
    height: 28rem;
    background: rgb(255 95 35 / 0.16);
}

.nv-db__ambient-smoke {
    top: 54rem;
    left: 10%;
    width: 38rem;
    height: 24rem;
    background: rgb(159 37 17 / 0.15);
}

.nv-db__shell {
    width: min(1500px, calc(100% - 32px));
    margin-inline: auto;
    padding: 1.25rem 0 5rem;
}

.nv-db__breadcrumb {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.5rem;
    margin: 0 auto 1rem;
    color: #b68c7d;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nv-db__breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f0c8b1;
    transition: color 180ms ease;
}

.nv-db__breadcrumb a:hover,
.nv-db__breadcrumb a:focus-visible {
    color: #fff2e7;
}

.nv-db__breadcrumb strong {
    color: #ff9f6b;
}

.nv-db-hero {
    position: relative;
    min-height: 45rem;
}

.nv-db-hero__stage {
    position: relative;
    isolation: isolate;
    min-height: 44rem;
    overflow: hidden;
    border: 1px solid var(--nv-db-line);
    border-radius: 2rem;
    background:
        radial-gradient(circle at 50% 12%, rgb(255 150 96 / 0.13), transparent 16rem),
        linear-gradient(180deg, #1d0908 0%, #140505 46%, #0c0202 100%);
    box-shadow:
        0 2rem 5rem rgb(0 0 0 / 0.6),
        inset 0 0 0 1px rgb(255 255 255 / 0.03),
        inset 0 -9rem 8rem rgb(0 0 0 / 0.35);
}

.nv-db-hero__stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 0 8rem rgb(0 0 0 / 0.72);
}

.nv-db-scene__sky {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 70% 12%, rgb(255 117 53 / 0.14), transparent 18rem),
        linear-gradient(180deg, #2d0b08 0%, #40110d 24%, #22110d 54%, #0d0404 100%);
}

.nv-db-scene__halo {
    position: absolute;
    z-index: 1;
    top: 8%;
    right: 16%;
    width: 26rem;
    height: 26rem;
    border-radius: 50%;
    background: rgb(255 79 25 / 0.18);
    filter: blur(82px);
    pointer-events: none;
}

.nv-db-scene__embers {
    position: absolute;
    inset: 0;
    z-index: 13;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgb(255 177 94 / 0.32) 0 1.5px, transparent 2px),
        radial-gradient(circle, rgb(255 112 32 / 0.28) 0 1.2px, transparent 1.9px),
        radial-gradient(circle, rgb(255 214 160 / 0.24) 0 1.1px, transparent 1.8px);
    background-size: 240px 240px, 180px 180px, 320px 320px;
    background-position: 12% 82%, 66% 24%, 84% 72%;
    opacity: 0.55;
    animation: nv-db-embers-float 10s linear infinite alternate;
}

.nv-db-scene__layer,
.nv-db-scene__veil {
    --db-parallax-x: 0px;
    --db-parallax-y: 0px;
    position: absolute;
    pointer-events: none;
    transform: translate3d(var(--db-parallax-x), var(--db-parallax-y), 0);
    will-change: transform;
}

.nv-db-scene__layer img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.nv-db-scene__layer--backdrop {
    z-index: 2;
    top: -3%;
    left: -3%;
    width: 106%;
    opacity: 0.96;
    filter: saturate(1.04) brightness(0.92) contrast(1.08);
}

.nv-db-scene__layer--backdrop img {
    animation: nv-db-backdrop-breathe 12s ease-in-out infinite alternate;
}

.nv-db-scene__layer--platform {
    z-index: 7;
    left: 7%;
    bottom: -9.5%;
    width: 82%;
    filter: drop-shadow(0 2rem 2rem rgb(0 0 0 / 0.48));
}

.nv-db-scene__layer--platform img {
    animation: nv-db-platform-pulse 7s ease-in-out infinite;
}

.nv-db-scene__layer--left {
    z-index: 15;
    left: -3%;
    bottom: -27%;
    width: 40%;
    filter: drop-shadow(-0.4rem 1rem 1.2rem rgb(0 0 0 / 0.55));
}

.nv-db-scene__layer--right {
    z-index: 15;
    right: -4%;
    bottom: -27%;
    width: 39%;
    filter: drop-shadow(0.4rem 1rem 1.2rem rgb(0 0 0 / 0.55));
}

.nv-db-scene__layer--foreground {
    z-index: 14;
    left: -45px;
    bottom: -6%;
    width: 110%;
    filter: drop-shadow(0 0.8rem 1.4rem rgb(0 0 0 / 0.48));
}

.nv-db-scene__layer--foreground img {
    animation: nv-db-lava-flicker 6s ease-in-out infinite alternate;
}

.nv-db-scene__veil {
    left: -10%;
    width: 120%;
    border-radius: 50%;
    filter: blur(26px);
    opacity: 0.42;
}

.nv-db-scene__veil--back {
    z-index: 5;
    bottom: 27%;
    height: 12rem;
    background: linear-gradient(180deg, rgb(247 136 84 / 0.12), rgb(18 5 3 / 0.22));
}

.nv-db-scene__veil--front {
    z-index: 13;
    bottom: 3%;
    height: 14rem;
    background: linear-gradient(180deg, rgb(255 116 48 / 0.16), rgb(10 2 2 / 0.46));
}

.nv-db-scene__vignette {
    position: absolute;
    inset: 0;
    z-index: 14;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 78%, transparent 0 22%, rgb(0 0 0 / 0.18) 64%, rgb(0 0 0 / 0.46) 100%),
        linear-gradient(180deg, rgb(0 0 0 / 0) 40%, rgb(0 0 0 / 0.22) 100%);
}

.nv-db-hero__hint {
    position: absolute;
    z-index: 16;
    right: 1.4rem;
    bottom: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: rgb(11 3 3 / 0.48);
    border: 1px solid rgb(255 197 170 / 0.18);
    color: #f5cdb8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.nv-db-hero__hint span {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffca9e, #ff5c24);
    box-shadow: 0 0 0.9rem rgb(255 116 62 / 0.7);
}

.nv-db-hero__scroll {
    position: absolute;
    z-index: 16;
    left: 50%;
    bottom: -1.2rem;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 999px;
    color: #ffe7d5;
    background: linear-gradient(180deg, #3a0e0d 0%, #1f0908 100%);
    border: 1px solid rgb(255 210 185 / 0.18);
    box-shadow: 0 1rem 2rem rgb(0 0 0 / 0.35);
}

.nv-db-section,
.nv-db-finale,
.nv-db-hero {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 560ms ease,
        transform 560ms ease;
}

.nv-db-section.is-visible,
.nv-db-finale.is-visible,
.nv-db-hero.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.nv-db-section {
    margin-top: 4rem;
}

.nv-db-intro__card,
.nv-db-finale {
    position: relative;
    overflow: hidden;
    border-radius: 1.8rem;
    border: 1px solid var(--nv-db-line);
    background:
        linear-gradient(135deg, rgb(29 8 7 / 0.82), rgb(15 4 4 / 0.9)),
        linear-gradient(180deg, rgb(255 121 61 / 0.05), transparent);
    box-shadow: 0 1.4rem 3rem rgb(0 0 0 / 0.35);
}

.nv-db-intro__card {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: clamp(1.5rem, 2vw, 2rem);
}

.nv-db-eyebrow,
.nv-db-heading p,
.nv-db-finale__copy p {
    margin: 0 0 0.8rem;
    color: #ff9365;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.nv-db-intro h1,
.nv-db-heading h2,
.nv-db-finale__copy h2 {
    margin: 0;
    font-size: clamp(2.6rem, 5vw, 5rem);
    line-height: 0.95;
    font-weight: 900;
    color: #fff0e4;
    text-transform: uppercase;
}

.nv-db-intro__tagline {
    margin: 1rem 0 0;
    max-width: 44rem;
    color: #f7d8c3;
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    line-height: 1.72;
}

.nv-db-intro__aside,
.nv-db-heading span,
.nv-db-finale__copy span {
    margin-top: 1rem;
    max-width: 52rem;
    color: var(--nv-db-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.nv-db-intro__actions,
.nv-db-finale__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.nv-db-intro__actions {
    justify-content: flex-end;
    align-self: stretch;
}

.nv-db-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 3.25rem;
    padding: 0.9rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgb(255 208 188 / 0.18);
    color: #ffe2d0;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: rgb(28 8 7 / 0.72);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

.nv-db-button:hover,
.nv-db-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgb(255 208 188 / 0.3);
    background: rgb(52 13 11 / 0.82);
}

.nv-db-button--primary {
    background: linear-gradient(135deg, #702114 0%, #b63218 48%, #ff6a28 100%);
    color: #fff6ef;
    border-color: rgb(255 215 192 / 0.24);
    box-shadow: 0 0.85rem 1.8rem rgb(166 43 15 / 0.26);
}

.nv-db-heading--center {
    text-align: center;
}

.nv-db-heading span {
    display: inline-block;
    max-width: 44rem;
}

.nv-db-memory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
    margin-top: 2rem;
}

.nv-db-memory-card {
    position: relative;
    overflow: hidden;
    padding: 1.25rem 1.25rem 1.35rem;
    border-radius: 1.3rem;
    border: 1px solid rgb(255 210 190 / 0.12);
    background:
        linear-gradient(180deg, rgb(36 10 9 / 0.95), rgb(18 5 5 / 0.95)),
        linear-gradient(180deg, rgb(255 130 79 / 0.06), transparent);
    transform: rotate(var(--memory-rotation));
    box-shadow: 0 1rem 2rem rgb(0 0 0 / 0.28);
}

.nv-db-memory-card.is-revealed {
    animation: nv-db-card-in 360ms ease both;
    animation-delay: var(--reveal-delay, 0ms);
}

.nv-db-memory-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #f9d9c4;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nv-db-memory-card__topline small {
    color: #ff8d60;
    font-size: 0.76rem;
}

.nv-db-memory-card blockquote {
    margin: 0;
    color: #ffeede;
    line-height: 1.8;
    font-size: 0.98rem;
}

.nv-db-memory-card__mark {
    position: absolute;
    right: 1rem;
    bottom: 0.9rem;
    color: rgb(255 130 79 / 0.45);
    font-size: 1rem;
}

.nv-db-inline-link {
    display: inline-flex;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem auto 0;
    color: #ffc5a6;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.nv-db-section--echoes {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nv-db-finale {
    margin-top: 4rem;
    padding: clamp(1.5rem, 3vw, 2.4rem);
}

.nv-db-finale__glow {
    position: absolute;
    inset: auto -10% -20% auto;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background: rgb(255 92 29 / 0.16);
    filter: blur(82px);
    pointer-events: none;
}

.nv-db-finale__copy {
    position: relative;
    max-width: 60rem;
}

.nv-db-finale__copy small {
    display: inline-block;
    margin-top: 1rem;
    color: #b98e7a;
    letter-spacing: 0.06em;
}

@keyframes nv-db-backdrop-breathe {
    0% { transform: scale(1) translateY(0); }
    100% { transform: scale(1.018) translateY(0.35rem); }
}

@keyframes nv-db-platform-pulse {
    0%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
    50% { transform: translateY(-0.22rem) scale(1.005); filter: brightness(1.04); }
}

@keyframes nv-db-lava-flicker {
    0%, 100% { filter: brightness(1) saturate(1); }
    50% { filter: brightness(1.07) saturate(1.05); }
}

@keyframes nv-db-embers-float {
    0% { transform: translateY(0); opacity: 0.42; }
    100% { transform: translateY(-12px); opacity: 0.65; }
}

@keyframes nv-db-card-in {
    from { opacity: 0; transform: translateY(18px) rotate(var(--memory-rotation)); }
    to { opacity: 1; transform: translateY(0) rotate(var(--memory-rotation)); }
}

@media (max-width: 1180px) {
    .nv-db-memory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nv-db-scene__layer--platform {
        left: 5%;
        width: 90%;
    }

    .nv-db-scene__layer--left,
    .nv-db-scene__layer--right {
        width: 29%;
        bottom: -22%;
    }
}

@media (max-width: 920px) {
    .nv-db__shell {
        width: min(100%, calc(100% - 20px));
    }

    .nv-db-hero {
        min-height: auto;
    }

    .nv-db-hero__stage {
        min-height: 34rem;
        border-radius: 1.55rem;
    }

    .nv-db-intro__card {
        grid-template-columns: 1fr;
    }

    .nv-db-intro__actions {
        justify-content: flex-start;
    }

    .nv-db-memory-grid {
        grid-template-columns: 1fr;
    }

    .nv-db-scene__layer--left,
    .nv-db-scene__layer--right {
        width: 32%;
    }
}

@media (max-width: 640px) {
    .nv-db__shell {
        padding-top: 0.8rem;
    }

    .nv-db__breadcrumb {
        gap: 0.45rem;
        font-size: 0.68rem;
        flex-wrap: wrap;
    }

    .nv-db-hero__stage {
        min-height: 28rem;
    }

    .nv-db-hero__hint {
        right: 0.8rem;
        left: 0.8rem;
        bottom: 0.8rem;
        justify-content: center;
        font-size: 0.66rem;
        padding-inline: 0.8rem;
    }

    .nv-db-scene__layer--backdrop {
        left: -20%;
        width: 140%;
    }

    .nv-db-scene__layer--platform {
        left: -7%;
        width: 114%;
        bottom: 8%;
    }

    .nv-db-scene__layer--left,
    .nv-db-scene__layer--right {
        width: 40%;
        bottom: -19%;
    }

    .nv-db-scene__layer--foreground {
        width: 130%;
        left: -15%;
    }

    .nv-db-button {
        width: 100%;
    }

    .nv-db-finale__actions,
    .nv-db-intro__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nv-db-section,
    .nv-db-finale,
    .nv-db-hero,
    .nv-db-scene__layer,
    .nv-db-scene__veil,
    .nv-db-scene__layer img,
    .nv-db-scene__embers,
    .nv-db-button {
        animation: none !important;
        transition: none !important;
    }
}

/* Diablo inventory puzzle */
.nv-db-inventory-game {
    --db-slot: clamp(42px, 5.4vw, 76px);
    width: 100%;
}

.nv-db-inventory-game__panel {
    position: relative;
    margin-top: 2rem;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid rgb(255 203 174 / 0.13);
    border-radius: 1.7rem;
    background:
        radial-gradient(circle at 76% 14%, rgb(135 26 14 / 0.2), transparent 26rem),
        linear-gradient(145deg, rgb(26 7 6 / 0.98), rgb(9 2 2 / 0.98));
    box-shadow:
        0 1.7rem 3.5rem rgb(0 0 0 / 0.36),
        inset 0 0 0 1px rgb(255 255 255 / 0.018);
    overflow: hidden;
}

.nv-db-inventory-game__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.14;
    background-image:
        linear-gradient(45deg, transparent 46%, rgb(255 132 83 / 0.13) 48%, transparent 50%),
        linear-gradient(-45deg, transparent 46%, rgb(255 132 83 / 0.08) 48%, transparent 50%);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

.nv-db-inventory-game__toolbar,
.nv-db-inventory-game__layout,
.nv-db-inventory-game__live {
    position: relative;
    z-index: 1;
}

.nv-db-inventory-game__toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgb(255 205 181 / 0.09);
}

.nv-db-inventory-game__toolbar > p {
    margin: 0;
    max-width: 48rem;
    color: #c9a896;
    font-size: 0.92rem;
    line-height: 1.6;
}

.nv-db-inventory-game__status {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    white-space: nowrap;
    color: #bb907b;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.nv-db-inventory-game__status strong {
    color: #ffaf7f;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.nv-db-inventory-game__reset,
.nv-db-inventory-win button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgb(255 205 181 / 0.16);
    border-radius: 0.8rem;
    color: #ffe7d7;
    background: linear-gradient(180deg, rgb(60 18 13 / 0.88), rgb(28 8 7 / 0.92));
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nv-db-inventory-game__reset:hover,
.nv-db-inventory-game__reset:focus-visible,
.nv-db-inventory-win button:hover,
.nv-db-inventory-win button:focus-visible {
    transform: translateY(-1px);
    border-color: rgb(255 177 132 / 0.34);
    background: linear-gradient(180deg, rgb(91 28 17 / 0.96), rgb(42 10 8 / 0.96));
}

.nv-db-inventory-game__layout {
    display: grid;
    grid-template-columns: minmax(18rem, 0.8fr) minmax(25rem, 1.2fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: stretch;
}

.nv-db-inventory-game__loot-panel,
.nv-db-inventory-game__board-panel {
    position: relative;
    min-width: 0;
    padding: 1rem;
    border-radius: 1.2rem;
    border: 1px solid rgb(255 210 188 / 0.11);
    background:
        linear-gradient(180deg, rgb(22 7 6 / 0.94), rgb(12 3 3 / 0.96));
}

.nv-db-inventory-game__panel-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    color: #ff9d70;
}

.nv-db-inventory-game__panel-title span {
    color: #ff6b36;
    filter: drop-shadow(0 0 0.45rem rgb(255 76 28 / 0.4));
}

.nv-db-inventory-game__panel-title h3 {
    margin: 0;
    color: #ffeada;
    font-size: 0.94rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nv-db-inventory-game__panel-title--board {
    justify-content: center;
}

.nv-db-inventory-game__loot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    align-content: start;
}

.nv-db-loot-item {
    position: relative;
    display: grid;
    grid-template-columns: 4.4rem minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 5.6rem;
    padding: 0.55rem;
    border: 1px solid rgb(255 216 196 / 0.09);
    border-radius: 0.85rem;
    color: #f5d7c4;
    background:
        radial-gradient(circle at 22% 50%, rgb(162 48 22 / 0.13), transparent 4rem),
        linear-gradient(180deg, rgb(34 10 8 / 0.9), rgb(18 5 5 / 0.92));
    cursor: grab;
    touch-action: pan-y;
    text-align: left;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.nv-db-loot-item:hover,
.nv-db-loot-item:focus-visible,
.nv-db-loot-item.is-selected {
    border-color: rgb(255 146 95 / 0.42);
    background:
        radial-gradient(circle at 22% 50%, rgb(195 55 22 / 0.21), transparent 4rem),
        linear-gradient(180deg, rgb(44 12 9 / 0.94), rgb(21 6 5 / 0.96));
}

.nv-db-loot-item.is-selected {
    box-shadow: inset 0 0 0 1px rgb(255 127 69 / 0.18), 0 0 1.2rem rgb(152 37 14 / 0.16);
}

.nv-db-loot-item.is-dragging {
    opacity: 0.3;
    cursor: grabbing;
}

.nv-db-loot-item__art {
    display: grid;
    place-items: center;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 0.65rem;
    background:
        linear-gradient(135deg, rgb(255 255 255 / 0.025), transparent),
        rgb(4 1 1 / 0.7);
    overflow: hidden;
}

.nv-db-loot-item__art img {
    display: block;
    width: var(--db-item-width);
    height: var(--db-item-height);
    max-width: none;
    max-height: none;
    padding: 0.2rem;
    object-fit: contain;
    transform: translate(var(--db-item-shift-x), var(--db-item-shift-y)) scale(var(--db-item-scale));
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 0.35rem 0.5rem rgb(0 0 0 / 0.6));
}

.nv-db-loot-item__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.3rem;
}

.nv-db-loot-item__meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f8ddcc;
    font-size: 0.82rem;
    white-space: nowrap;
}

.nv-db-loot-item__meta small {
    color: #ff9f73;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.nv-db-loot-item {
    --db-item-scale: 1;
    --db-item-shift-x: 0%;
    --db-item-shift-y: 0%;
    --db-item-width: 100%;
    --db-item-height: 100%;
}

.nv-db-loot-item[data-item-id="hell-saber"] {
    --db-item-scale: 1.22;
    --db-item-width: 112%;
    --db-item-height: 112%;
    --db-item-shift-y: -3%;
}

.nv-db-loot-item[data-item-id="skull-axe"] {
    --db-item-scale: 1.18;
    --db-item-width: 112%;
    --db-item-height: 112%;
}

.nv-db-loot-item[data-item-id="blood-spear"] {
    --db-item-scale: 1.34;
    --db-item-width: 138%;
    --db-item-height: 112%;
}

.nv-db-loot-item[data-item-id="rune-sword"] {
    --db-item-scale: 1.32;
    --db-item-width: 132%;
    --db-item-height: 112%;
}

.nv-db-loot-item[data-item-id="soul-vial"],
.nv-db-loot-item[data-item-id="cursed-flask"] {
    --db-item-scale: 1.08;
    --db-item-width: 106%;
    --db-item-height: 106%;
}

.nv-db-drag-ghost[data-item-id="hell-saber"] img {
    transform: translateY(-3%) scale(1.12);
}

.nv-db-drag-ghost[data-item-id="skull-axe"] img {
    transform: scale(1.1);
}

.nv-db-drag-ghost[data-item-id="blood-spear"] img {
    transform: scale(1.24);
}

.nv-db-drag-ghost[data-item-id="rune-sword"] img {
    transform: scale(1.22);
}

.nv-db-drag-ghost[data-item-id="soul-vial"] img,
.nv-db-drag-ghost[data-item-id="cursed-flask"] img {
    transform: scale(1.06);
}

.nv-db-inventory-board-shell {
    position: relative;
    width: min(100%, calc(var(--db-slot) * 6));
    margin-inline: auto;
    padding: 0.55rem;
    border-radius: 1rem;
    background:
        linear-gradient(145deg, #4e2517, #1c0a07 32%, #0d0303 70%, #32130d),
        #180806;
    border: 1px solid rgb(248 190 145 / 0.2);
    box-shadow:
        inset 0 0 0 1px rgb(0 0 0 / 0.75),
        inset 0 0 2.6rem rgb(0 0 0 / 0.76),
        0 1.1rem 2rem rgb(0 0 0 / 0.36);
}

.nv-db-inventory-board-shell::before,
.nv-db-inventory-board-shell::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.nv-db-inventory-board-shell::before {
    inset: 0.2rem;
    border-radius: 0.86rem;
    border: 1px solid rgb(255 176 123 / 0.1);
}

.nv-db-inventory-board-shell::after {
    inset: 0.5rem;
    border-radius: 0.65rem;
    box-shadow: inset 0 0 2rem rgb(143 33 13 / 0.16);
}

.nv-db-inventory-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    aspect-ratio: 1;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgb(0 0 0 / 0.78);
    border-radius: 0.55rem;
    background:
        radial-gradient(circle at 48% 40%, rgb(106 39 22 / 0.16), transparent 60%),
        #0d0706;
}

.nv-db-inventory-slot {
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-right: 1px solid rgb(175 128 100 / 0.18);
    border-bottom: 1px solid rgb(175 128 100 / 0.18);
    background:
        linear-gradient(135deg, rgb(255 255 255 / 0.015), transparent 42%),
        rgb(14 8 7 / 0.74);
    cursor: pointer;
    transition: background 90ms ease, box-shadow 90ms ease;
}

.nv-db-inventory-slot:nth-child(6n) { border-right: 0; }
.nv-db-inventory-slot:nth-last-child(-n + 6) { border-bottom: 0; }

.nv-db-inventory-slot.is-preview-valid {
    background: rgb(46 111 54 / 0.44);
    box-shadow: inset 0 0 0 1px rgb(117 255 139 / 0.35);
}

.nv-db-inventory-slot.is-preview-invalid {
    background: rgb(129 26 17 / 0.5);
    box-shadow: inset 0 0 0 1px rgb(255 91 62 / 0.42);
}

.nv-db-inventory-grid .nv-db-loot-item {
    position: absolute;
    z-index: 4;
    display: block;
    min-height: 0;
    padding: 0.12rem;
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    cursor: grab;
    overflow: visible;
    touch-action: none;
    transform: translateZ(0);
}

.nv-db-inventory-grid .nv-db-loot-item:hover,
.nv-db-inventory-grid .nv-db-loot-item:focus-visible,
.nv-db-inventory-grid .nv-db-loot-item.is-selected {
    background: rgb(255 91 35 / 0.055);
    outline: 1px solid rgb(255 138 91 / 0.22);
    outline-offset: -2px;
}

.nv-db-inventory-grid .nv-db-loot-item__art {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 0.25rem;
    background: transparent;
    overflow: visible;
}

.nv-db-inventory-grid .nv-db-loot-item__art img {
    padding: clamp(0.02rem, 0.24vw, 0.12rem);
    filter:
        drop-shadow(0 0.32rem 0.34rem rgb(0 0 0 / 0.72))
        drop-shadow(0 0 0.3rem rgb(145 34 15 / 0.2));
}

.nv-db-inventory-grid .nv-db-loot-item__meta {
    display: none;
}

.nv-db-drag-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    display: grid;
    place-items: center;
    width: 110px;
    height: 110px;
    transform: translate(-50%, -50%);
    opacity: 0.92;
    filter: drop-shadow(0 1rem 1rem rgb(0 0 0 / 0.62));
}

.nv-db-drag-ghost img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nv-db-inventory-game__live {
    min-height: 1.4rem;
    margin: 0.9rem 0 0;
    color: #d3a995;
    text-align: center;
    font-size: 0.82rem;
}

.nv-db-inventory-game__panel.is-invalid {
    animation: nv-db-inventory-shake 260ms ease;
}

.nv-db-inventory-win {
    position: absolute;
    inset: 0.55rem;
    z-index: 20;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 0.62rem;
    background:
        radial-gradient(circle at 50% 45%, rgb(156 33 15 / 0.28), transparent 34%),
        linear-gradient(180deg, rgb(7 1 1 / 0.96), rgb(16 3 2 / 0.98));
    opacity: 0;
    visibility: hidden;
    transform: scale(0.985);
    transition: opacity 420ms ease, visibility 420ms ease, transform 420ms ease;
}

.nv-db-inventory-game.is-won .nv-db-inventory-win {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.nv-db-inventory-win__embers {
    position: absolute;
    inset: 0;
    opacity: 0.65;
    background-image:
        radial-gradient(circle, rgb(255 169 89 / 0.78) 0 1px, transparent 1.8px),
        radial-gradient(circle, rgb(255 74 30 / 0.62) 0 1.2px, transparent 2px),
        radial-gradient(circle, rgb(255 221 153 / 0.42) 0 1px, transparent 1.6px);
    background-size: 88px 88px, 127px 127px, 171px 171px;
    animation: nv-db-win-embers 2.8s linear infinite;
}

.nv-db-inventory-win__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(90%, 34rem);
    text-align: center;
}

.nv-db-inventory-win__content p {
    margin: 0 0 0.6rem;
    color: #ff8d5e;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.22em;
}

.nv-db-inventory-win__content img {
    display: block;
    width: min(100%, 26rem);
    height: auto;
    margin: 0.2rem 0 0.75rem;
    filter:
        drop-shadow(0 0 0.55rem rgb(255 73 31 / 0.35))
        drop-shadow(0 1rem 1.4rem rgb(0 0 0 / 0.7));
    animation: nv-db-logo-rise 760ms cubic-bezier(.2,.8,.2,1) both;
}

.nv-db-inventory-win__content h3 {
    margin: 0;
    color: #fff0df;
    font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.nv-db-inventory-win__content > span {
    margin: 0.5rem 0 1rem;
    color: #caa996;
    font-size: 0.9rem;
    line-height: 1.55;
}

@keyframes nv-db-inventory-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    55% { transform: translateX(4px); }
    80% { transform: translateX(-2px); }
}

@keyframes nv-db-win-embers {
    from { background-position: 0 80px, 0 40px, 0 110px; }
    to { background-position: 0 -80px, 0 -105px, 0 -60px; }
}

@keyframes nv-db-logo-rise {
    from { opacity: 0; transform: translateY(18px) scale(0.9); filter: blur(4px) drop-shadow(0 0 0 rgb(0 0 0 / 0)); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1100px) {
    .nv-db-inventory-game__layout {
        grid-template-columns: 1fr;
    }

    .nv-db-inventory-game__loot {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nv-db-inventory-game__board-panel {
        order: -1;
    }
}

@media (max-width: 760px) {
    .nv-db-inventory-game__toolbar {
        grid-template-columns: 1fr auto;
    }

    .nv-db-inventory-game__toolbar > p {
        grid-column: 1 / -1;
    }

    .nv-db-inventory-game__loot {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nv-db-loot-item {
        grid-template-columns: 3.4rem minmax(0, 1fr);
        min-height: 4.6rem;
    }

    .nv-db-loot-item__art {
        width: 3.4rem;
        height: 3.4rem;
    }
}

@media (max-width: 480px) {
    .nv-db-inventory-game__panel {
        padding: 0.75rem;
        border-radius: 1.25rem;
    }

    .nv-db-inventory-game__loot-panel,
    .nv-db-inventory-game__board-panel {
        padding: 0.7rem;
    }

    .nv-db-inventory-game__loot {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .nv-db-loot-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        min-height: 6.4rem;
        text-align: center;
    }

    .nv-db-loot-item__art {
        width: 100%;
        height: 4.2rem;
    }

    .nv-db-loot-item__meta strong {
        font-size: 0.72rem;
    }

    .nv-db-inventory-game__reset {
        padding-inline: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nv-db-inventory-game__panel,
    .nv-db-inventory-win,
    .nv-db-inventory-win__embers,
    .nv-db-inventory-win__content img,
    .nv-db-loot-item,
    .nv-db-inventory-slot {
        animation: none !important;
        transition: none !important;
    }
}
