.duna-games {
    --rule: #363835;
    color: #f5f2e9;
    font-family: "DM Sans", system-ui, sans-serif;
}
.duna-games__sheet {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    min-height: 100svh;
    overflow: clip;
    padding: var(--section-top) var(--section-inset) clamp(1rem, 1.8vw, 2rem);
}
.duna-games__body {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(1.2rem, 3.5vw, 5.5rem);
    padding-block: clamp(1.8rem, 3.4vw, 4.5rem);
}
.duna-games__copy { container-type: inline-size; width: 100%; max-width: 50rem; min-width: 0; }
.duna-games__copy h2 {
    font: 900 clamp(2rem, min(13cqw, 9.5svh), 6.5rem)/1.04 Orbitron, sans-serif;
    letter-spacing: -.025em;
    margin-bottom: clamp(1rem, 2.4svh, 1.6rem);
}
.duna-games__copy h2 span {
    display: block;
    margin-top: .08em;
}
.duna-games__prose {
    color: #e0e0d9;
    font-size: clamp(.91rem, 1.14vw, 1.14rem);
    line-height: 1.6;
}
.duna-games__prose > p + p {
    margin-block-start: 1.2em;
}
.duna-games__lead {
    display: block;
    color: #f5f2e9;
    font-weight: 700;
    margin-bottom: .18em;
}
.duna-games__end {
    margin-top: clamp(1.1rem, 2.6svh, 1.65rem);
    display: grid;
    justify-items: start;
    row-gap: clamp(1.5rem, 4.8svh, 3rem);
}
.duna-games__closing {
    font-size: clamp(.98rem, 1.17vw, 1.19rem);
    line-height: 1.35;
}
.duna-games__explore {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    min-height: 44px;
    color: inherit;
    border-bottom: 1px solid #878980;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 550;
}
.duna-games__explore:hover { border-color: currentColor; }
.duna-games__links { display: flex; align-items: baseline; gap: 1.1rem; }
.duna-games__read {
    color: #d8dbd3;
    background: transparent;
    border: 0;
    padding: 0 .25rem;
    min-height: 44px;
    font: 500 .82rem/1.2 "DM Sans", system-ui, sans-serif;
    cursor: pointer;
}
.duna-games__read:hover { color: white; text-decoration: underline; }
.duna-games__read:focus-visible { outline: 2px solid currentColor; }
.duna-games a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.duna-games__gallery {
    min-width: 0;
}
.duna-games__covers {
    container-type: inline-size;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.duna-games__cover {
    min-width: 0;
    aspect-ratio: 640 / 1000;
}
.duna-games__gallery[data-carousel] .duna-games__covers {
    position: relative;
    display: block;
    aspect-ratio: 1.3;
    margin-inline-end: calc(0px - var(--section-inset));
}
.duna-games__gallery[data-carousel] .duna-games__cover {
    position: absolute;
    top: 10%;
    left: 0;
    width: 35%;
    height: 69%;
    z-index: var(--stack);
    transform: translate3d(var(--x), var(--rise), 0) rotate(var(--angle));
    transform-origin: 50% 74%;
}
.duna-games__cover[data-position="before"] { --x: -10cqw; --rise: 3%; --angle: -22deg; --stack: 0; }
.duna-games__cover[data-position="0"] { --x: 5cqw; --rise: 0%; --angle: -14deg; --stack: 1; }
.duna-games__cover[data-position="1"] { --x: 23cqw; --rise: 1.5%; --angle: -6deg; --stack: 2; }
.duna-games__cover[data-position="2"] { --x: 45cqw; --rise: 10%; --angle: 5deg; --stack: 3; }
.duna-games__cover[data-position="3"] { --x: 66cqw; --rise: 21%; --angle: 13deg; --stack: 4; }
.duna-games__cover[data-position="after"] { --x: 87cqw; --rise: 32%; --angle: 21deg; --stack: 5; }
.duna-games__cover[inert] { opacity: 0; pointer-events: none; }
.duna-games__cover a {
    display: block;
    position: relative;
    height: 100%;
    color: #fff;
    background: #303b37;
    text-decoration: none;
    box-shadow: .18rem .4rem .65rem rgb(0 0 0 / 40%);
}
.duna-games__cover img, .duna-games__cover a::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.duna-games__cover img { object-fit: cover; object-position: var(--focus, center); }
.duna-games__cover a::after {
    content: "";
    background: linear-gradient(180deg, #07100f80, transparent 27%, transparent 53%, #080d0edb 100%);
}
.duna-games__name {
    position: absolute;
    left: 7%;
    z-index: 1;
    text-shadow: 0 1px 4px #0008;
    bottom: 8%;
    max-width: 88%;
    font: 900 clamp(.58rem, 2.25cqw, 1.25rem)/1.17 Orbitron, sans-serif;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.duna-games__gallery[data-carousel] .duna-games__cover:focus-within { z-index: 6; }
@media (hover: hover) {
    .duna-games__gallery[data-carousel] .duna-games__cover:hover { z-index: 6; }
}
@media (prefers-reduced-motion: no-preference) {
    .duna-games__gallery[data-carousel] .duna-games__cover {
        transition: transform .6s cubic-bezier(.22,.75,.22,1), opacity .36s ease;
    }
    .duna-games__cover a { transition: transform .22s ease-out; }
    .duna-games__cover:focus-within a { transform: translateY(-.4rem); }
    @media (hover: hover) {
        .duna-games__cover:hover a { transform: translateY(-.4rem); }
    }
}
.duna-games__navigation:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-top: 1px solid var(--rule);
    padding-top: .4rem;
}
.duna-games__current {
    font: 900 clamp(.62rem, .87vw, .84rem)/1.4 Orbitron, sans-serif;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.duna-games__buttons { display: flex; }
.duna-games__buttons button {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    color: #f5f2e9;
    background: transparent;
    cursor: pointer;
    font: 400 1.25rem/1 system-ui, sans-serif;
}
.duna-games__buttons button:hover { background: #202020; }
.duna-games__buttons button:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.duna-games__buttons [hidden] { display: none; }
.duna-games__buttons [data-play] span { width: 9px; height: 12px; border-inline: 3px solid currentColor; }
.duna-games__buttons [data-play][data-paused] span {
    width: 0;
    height: 0;
    border: solid transparent;
    border-width: 6px 0 6px 10px;
    border-left-color: currentColor;
}

@media (max-width: 44rem) {
    .duna-games__body { grid-template-columns: 1fr; gap: 1.4rem; }
    .duna-games__copy { max-width: none; }
    .duna-games__gallery { width: 100%; max-width: 30rem; justify-self: center; }
    .duna-games__gallery[data-carousel] .duna-games__covers { margin: 0; aspect-ratio: 1.48; }
    .duna-games__gallery[data-carousel] .duna-games__cover { width: 32%; height: 70%; }
    .duna-games__cover[data-position="3"] { --x: 64cqw; --angle: 10deg; }
    .duna-games__covers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Match the opening's measured height. The native six-link fallback can
   still flow down the page when scripting is unavailable. */
.duna-games[data-paged] .duna-games__sheet {
    height: var(--opening-height, 100svh);
    grid-template-rows: auto minmax(0, 1fr);
    padding-block-end: clamp(.65rem, 1.8svh, 2rem);
}
.duna-games[data-paged] .duna-games__body {
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    padding-block: clamp(.7rem, 2.2svh, 2.5rem);
}
.duna-games[data-paged] .duna-games__copy {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
}
.duna-games[data-paged] .duna-games__copy > :not(.duna-games__prose) { flex-shrink: 0; }
.duna-games[data-paged] .duna-games__prose {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #777a73 #151615;
}
.duna-games__prose[tabindex] { padding-inline-end: .7rem; }
.duna-games__prose:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.duna-games__gallery[data-carousel] {
    justify-self: end;
}
@media (width > 44rem) {
    .duna-games[data-paged] .duna-games__body { container-type: size; }
    .duna-games__gallery[data-carousel] {
        width: min(100%, calc((100cqh - 3.6rem) * 1.3 - var(--section-inset)));
    }
}
@media (max-width: 44rem) {
    .duna-games[data-paged] .duna-games__body {
        grid-template-rows: minmax(0, 1fr) auto;
        align-items: stretch;
        gap: clamp(.5rem, 1.15svh, 1rem);
    }
    .duna-games__gallery[data-carousel] { width: 100%; justify-self: center; }
    .duna-games__gallery[data-carousel] .duna-games__covers {
        width: min(100%, calc(var(--opening-height, 100svh) * .37));
        margin-inline: auto;
    }
}
