* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --panel: rgba(6, 7, 8, .5);
    --panel-hover: rgba(16, 15, 14, .76);
    --border: rgba(176, 163, 139, .3);
    --text: rgba(222, 214, 195, .92);
    --muted: rgba(202, 195, 180, .55);
    --green: rgba(72, 116, 78, .72);
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: #000;
    color: var(--text);
    font-family: "Kalkin", "Old English Text MT", "Cinzel Decorative", Georgia, serif;
}

body {
    overflow: hidden;
}

body.open {
    overflow-y: auto;
}

body.open #introHint,
body.closing #introHint {
    opacity: 0;
    transform: translate(-50%, 16px);
    pointer-events: none;
}

#background {
    position: fixed;
    inset: 0;
    background-color: #000;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
}

#overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 50% 46%, rgba(190,176,148,.04), transparent 26%),
        rgba(0,0,0,.28);
    z-index: 2;
    transition: background .55s ease;
}

body.open #overlay,
body.closing #overlay {
    background:
        radial-gradient(circle at 50% 46%, rgba(190,176,148,.08), transparent 32%),
        rgba(0,0,0,.46);
}

#autoScene {
    position: fixed;
    inset: 0;
    z-index: 30;
    min-height: 100vh;
    cursor: crosshair;
}

body.open #autoScene,
body.closing #autoScene {
    position: relative;
    inset: auto;
    cursor: default;
}

#cards {
    position: relative;
    z-index: 50;
    width: min(1380px, calc(100% - 56px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 24vh 0 12vh;
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 28px;
    align-items: stretch;
    pointer-events: none;
}

body.open #cards,
body.closing #cards {
    display: grid;
}

.auto-card {
    position: relative;
    width: 100%;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    padding: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(18,18,17,.56), var(--panel));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        inset 0 0 28px rgba(190,176,148,.025);
    color: var(--text);
    text-align: left;
    opacity: 0;
    pointer-events: auto;
    overflow: hidden;
    cursor: pointer;
    transform: translateY(18px) scale(.98);
    transition:
        opacity .42s ease,
        transform .42s ease,
        background .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.auto-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(190,176,148,.065), transparent);
    opacity: 0;
    transform: translateX(-48%);
    transition: opacity .25s ease, transform .55s ease;
}

.auto-card::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(193,176,143,.9), transparent);
    transform: translateX(-105%);
    transition: transform .48s ease;
}

.auto-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.auto-card:hover,
.auto-card:focus-visible {
    background: var(--panel-hover);
    border-color: rgba(202,184,150,.55);
    box-shadow:
        0 0 28px rgba(190,176,148,.13),
        inset 0 0 30px rgba(190,176,148,.05);
    outline: none;
}

.auto-card:hover::before,
.auto-card:focus-visible::before {
    opacity: 1;
    transform: translateX(45%);
}

.auto-card:hover::after,
.auto-card:focus-visible::after {
    transform: translateX(105%);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 230px;
    border: 1px solid rgba(190,176,148,.25);
    background:
        linear-gradient(135deg, rgba(190,176,148,.08), rgba(0,0,0,.2)),
        rgba(0,0,0,.28);
    overflow: hidden;
    flex: 0 0 auto;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(.82) contrast(1.04) brightness(.86);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    gap: 8px;
    color: rgba(202,195,180,.55);
    text-align: center;
    background:
        linear-gradient(135deg, rgba(190,176,148,.075), transparent 45%),
        radial-gradient(circle at 50% 46%, rgba(190,176,148,.08), transparent 36%),
        rgba(0,0,0,.34);
}

.image-placeholder span,
.card-kicker,
.card-desc,
.card-footer {
    font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI Condensed", Arial, sans-serif;
}

.image-placeholder span {
    font-size: 10px;
    letter-spacing: 2.4px;
}

.image-placeholder strong {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 2px;
}

.card-kicker {
    margin-top: 18px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.card-title {
    margin-top: 8px;
    font-size: clamp(22px, 1.45vw, 30px);
    font-weight: 500;
    line-height: 1.05;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1.1px;
    text-shadow: 0 0 13px rgba(190,176,148,.22);
    overflow-wrap: anywhere;
}

.card-desc {
    margin-top: 14px;
    color: rgba(202,195,180,.66);
    font-size: 12px;
    line-height: 1.48;
    letter-spacing: .55px;
    overflow-wrap: anywhere;
}

.card-footer {
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    color: rgba(214,203,178,.78);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.inner-layer {
    position: fixed;
    left: 50%;
    top: 52%;
    z-index: 200;
    width: min(760px, calc(100vw - 36px));
    min-height: 320px;
    padding: 28px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(18,18,17,.84), rgba(6,7,8,.8));
    color: var(--text);
    opacity: 0;
    pointer-events: auto;
    transform: translate(-50%, -50%) translateY(18px) scale(.97);
    transition: opacity .36s ease, transform .36s ease;
}

.inner-layer.show {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
}

.layer-back {
    border: 1px solid rgba(190,176,148,.28);
    background: rgba(0,0,0,.28);
    color: var(--text);
    padding: 9px 13px;
    cursor: pointer;
}

.layer-copy {
    margin-top: 38px;
}

.layer-copy h2 {
    margin-top: 10px;
    font-size: 34px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.layer-copy p {
    max-width: 560px;
    margin-top: 15px;
    color: rgba(202,195,180,.68);
    font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI Condensed", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.55;
    letter-spacing: .7px;
}

.layer-note {
    color: rgba(202,195,180,.48) !important;
}

#introHint {
    position: fixed;
    left: 50%;
    bottom: 34px;
    z-index: 100;
    transform: translateX(-50%);
    color: rgba(202,195,180,.58);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(190,176,148,.18);
    transition: opacity .35s ease, transform .35s ease;
}

#hud-left,
#hud-right {
    position: fixed;
    z-index: 100;
    font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI Condensed", Arial, sans-serif;
    font-size: 12px;
    line-height: 22px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

#hud-left {
    left: 30px;
    bottom: 28px;
    color: rgba(202,195,180,.58);
    pointer-events: none;
}

#hud-right {
    right: 26px;
    bottom: 28px;
    display: grid;
    gap: 6px;
    text-align: right;
}

.statusValue {
    color: var(--green);
    text-shadow: 0 0 8px rgba(72, 116, 78, .16);
}

.backLink {
    color: rgba(202,195,180,.58);
    text-decoration: none;
}

.backLink:hover {
    color: rgba(214,203,178,.92);
}

@media (max-width: 820px) {
    #hud-left,
    #hud-right {
        display: none;
    }

    #introHint {
        width: calc(100% - 40px);
        text-align: center;
        bottom: 24px;
        font-size: 11px;
    }

    #cards {
        width: min(520px, calc(100% - 28px));
        padding: 18vh 0 10vh;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .auto-card {
        min-height: 172px;
        display: grid;
        grid-template-columns: 112px 1fr;
        grid-template-rows: auto auto 1fr auto;
        column-gap: 14px;
        padding: 12px;
    }

    .card-image {
        grid-row: 1 / -1;
        aspect-ratio: auto;
        height: 100%;
        min-height: 148px;
        max-height: none;
    }

    .card-kicker {
        margin-top: 0;
        font-size: 9px;
        letter-spacing: .9px;
    }

    .card-title {
        font-size: 18px;
        letter-spacing: .8px;
    }

    .card-desc {
        margin-top: 8px;
        font-size: 10px;
        line-height: 1.35;
    }

    .card-footer {
        padding-top: 10px;
        font-size: 9px;
    }
}

@media (max-width: 460px) {
    #cards {
        padding-top: 14vh;
    }

    .auto-card {
        grid-template-columns: 86px 1fr;
    }

    .card-image {
        min-height: 132px;
    }

    .card-desc {
        display: none;
    }
}