body {
    margin: 0;
    background: #090806;
    color: #d0c49b;
    font-family: Georgia, serif;
}

.container {
    max-width: 1450px;
    margin: 30px auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 28px;
}

.expedition-label {
    color: #776e54;
    font-size: 12px;
    letter-spacing: 3px;
}

h1 {
    margin: 10px 0 5px;
    font-size: 42px;
    letter-spacing: 7px;
}

.subtitle {
    color: #766e55;
    letter-spacing: 2px;
}


/* TWO COLUMNS */

.challenge-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(430px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.left-column,
.right-column {
    min-width: 0;
}


/* PANELS */

.map-scene,
.terminal-panel,
.analysis-panel {
    border: 1px solid #514a34;
    background: #11100c;
}

.map-scene,
.terminal-panel,
.analysis-panel {
    padding: 22px;
}

.terminal-panel {
    margin-top: 24px;
}

.panel-heading,
.scene-heading {
    margin-bottom: 20px;
    color: #a79464;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 3px;
}


/* MAP ROOM */

.door-frame {
    position: relative;
    height: 300px;
    overflow: hidden;
    border: 5px solid #3d3526;
    background: #070806;
}

.map-table {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(
            circle,
            #4f4325 0%,
            #17130d 45%,
            #050504 75%
        );
}

.sun {
    font-size: 85px;
    color: #d2ad58;
}

.map-name {
    margin-top: 12px;
    color: #b99951;
    font-family: monospace;
    font-size: 25px;
    letter-spacing: 8px;
}

.door {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(
            90deg,
            #403728,
            #403728 30px,
            #373024 30px,
            #373024 60px
        );
    color: #706248;
    font-size: 70px;
    transition:
        transform 1.1s ease-in-out;
}

.door-left {
    left: 0;
    border-right: 2px solid #201c15;
}

.door-right {
    right: 0;
    border-left: 2px solid #201c15;
}

.door-frame.open .door-left {
    transform: translateX(-101%);
}

.door-frame.open .door-right {
    transform: translateX(101%);
}

.access-status {
    margin-top: 18px;
    text-align: center;
    color: #8a765b;
    font-family: monospace;
}

.access-status strong {
    color: #bf675b;
}

.access-status.granted strong {
    color: #8fbd79;
}


/* INPUT */

.instructions {
    color: #78715b;
}

.legacy-notice {
    margin: 18px 0;
    padding: 13px;
    border-left: 3px solid #79663b;
    background: #0a0906;
    color: #897d5f;
    font-family: monospace;
    line-height: 1.5;
}

.terminal-panel label {
    display: block;
    margin-bottom: 7px;
    color: #897c5d;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 2px;
}

#payload {
    box-sizing: border-box;
    width: 100%;
    padding: 13px;
    border: 1px solid #514936;
    background: #070705;
    color: #d2c69b;
    font-family: monospace;
    font-size: 16px;
}

.payload-info {
    margin-top: 8px;
    color: #6d6855;
    font-family: monospace;
    font-size: 11px;
}

.run-button,
.strings-button,
.reset-button {
    display: block;
    margin: 20px auto;
    padding: 13px 22px;
    border: 1px solid #716240;
    background: #574728;
    color: white;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 2px;
}

.run-button:hover,
.strings-button:hover,
.reset-button:hover {
    background: #705b31;
}


/* TERMINALS */

.program-terminal,
.strings-terminal {
    border: 1px solid #34402f;
    background: #040604;
}

.terminal-bar {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 14px;
    border-bottom: 1px solid #34402f;
    color: #64715d;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 2px;
}

#programOutput {
    min-height: 220px;
    margin: 0;
    padding: 18px;
    color: #9dad8c;
    font-family: monospace;
    line-height: 1.5;
    white-space: pre-wrap;
}

#stringsOutput {
    height: 570px;
    margin: 0;
    padding: 18px;
    overflow: auto;
    color: #8eb17c;
    font-family: monospace;
    line-height: 1.5;
    white-space: pre-wrap;
}


/* ANALYSIS */

.artifact-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 15px;
    border: 1px solid #3c4036;
    background: #080a07;
    font-family: monospace;
}

.artifact-card span {
    display: block;
    margin-bottom: 5px;
    color: #69715f;
    font-size: 10px;
    letter-spacing: 2px;
}

.field-guide {
    margin-top: 20px;
    padding: 16px;
    border-left: 3px solid #68785e;
    background: #0a0d09;
    color: #838a79;
    line-height: 1.6;
}

.field-guide strong {
    color: #9dae8e;
}

.field-guide code {
    color: #98bb86;
}

.command {
    margin-top: 12px;
    padding: 10px;
    background: #040604;
    color: #91b580;
    font-family: monospace;
}


/* VICTORY */

.victory {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid #789968;
    background: #10150d;
    text-align: center;
}

.victory-heading {
    color: #91bc7e;
    font-size: 23px;
    font-weight: bold;
    letter-spacing: 3px;
}

.flag {
    margin-top: 20px;
    padding: 15px;
    border: 1px dashed #91bc7e;
    background: #050704;
    color: #9bc987;
    font-family: monospace;
}


/* FOOTER */

footer {
    margin-top: 30px;
    text-align: center;
    color: #4b493c;
    font-size: 11px;
    letter-spacing: 2px;
}


/* RESPONSIVE */

@media (max-width: 1050px) {

    .challenge-layout {
        grid-template-columns: 1fr;
    }

    #stringsOutput {
        height: 400px;
    }

}

@media (max-width: 650px) {

    h1 {
        font-size: 29px;
        letter-spacing: 3px;
    }

    .artifact-card {
        grid-template-columns: 1fr;
    }

    .door-frame {
        height: 230px;
    }

}
