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

:root {
    --ink: #1c0f00;
    --parchment: #f2e4c0;
    --parchment2: #e8d5a3;
    --brass: #b8860b;
    --brass-light: #d4a017;
    --brass-dark: #7a5c00;
    --wire: #3a2800;
    --tape-hole: #a07820;
    --red: #7a1515;
    --green: #2a5c1e;
    --shadow: rgba(28, 15, 0, 0.55);
}

body {
    background-color: #1a0e00;
    background-image: repeating-linear-gradient(
            0deg,
            transparent,
            transparent 38px,
            rgba(184, 134, 11, .06) 38px,
            rgba(184, 134, 11, .06) 39px
    ),
    repeating-linear-gradient(
            90deg,
            transparent,
            transparent 38px,
            rgba(184, 134, 11, .04) 38px,
            rgba(184, 134, 11, .04) 39px
    );
    color: var(--ink);
    font-family: 'Courier New', Courier, monospace;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.page-wrapper {
    max-width: 780px;
    margin: 0 auto;
}

.masthead {
    background: var(--ink);
    border: 3px solid var(--brass);
    border-bottom: none;
    padding: 1.6rem 2rem 1.2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 0 var(--brass-dark), 0 8px 24px var(--shadow);
}

.masthead::before,
.masthead::after {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: repeating-linear-gradient(
            to bottom,
            var(--brass) 0px,
            var(--brass) 4px,
            transparent 4px,
            transparent 8px
    );
}

.masthead::before {
    left: 8px;
}

.masthead::after {
    right: 8px;
}

.masthead-label {
    color: var(--brass);
    font-size: .7rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    margin-bottom: .5rem;
    opacity: .8;
}

.masthead h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--parchment);
    letter-spacing: .08em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .7);
    line-height: 1.15;
}

.masthead-sub {
    color: var(--brass-light);
    font-size: .75rem;
    letter-spacing: .2em;
    margin-top: .5rem;
    opacity: .85;
}

.tape-strip {
    background: var(--parchment2);
    border-left: 3px solid var(--brass);
    border-right: 3px solid var(--brass);
    padding: .55rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    overflow: hidden;
}

.tape-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tape-bit {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--tape-hole);
    background: transparent;
}

.tape-bit.on {
    background: var(--tape-hole);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4);
}

.main-panel {
    background: var(--parchment);
    border: 3px solid var(--brass);
    border-top: none;
    padding: 2rem 2.2rem 2.4rem;
    box-shadow: 0 8px 32px var(--shadow);
    position: relative;
}

.main-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: .5;
}

.divider {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1.8rem 0;
    color: var(--brass-dark);
    font-size: .72rem;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--brass), transparent);
}

.card {
    background: rgba(255, 255, 255, .28);
    border: 1.5px solid var(--brass-dark);
    border-radius: 2px;
    padding: 1.3rem 1.5rem;
    margin-bottom: 1.6rem;
    position: relative;
}

.card::before {
    content: attr(data-step);
    position: absolute;
    top: -1px;
    left: 1.2rem;
    background: var(--brass);
    color: var(--ink);
    font-size: .65rem;
    font-weight: bold;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 2px 10px;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

.card h3 {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    color: var(--wire);
    margin-bottom: 1rem;
    margin-top: .4rem;
    border-bottom: 1px dashed var(--brass-dark);
    padding-bottom: .45rem;
    letter-spacing: .04em;
}

.verify-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#status {
    font-weight: bold;
    font-size: .85rem;
    letter-spacing: .08em;
    padding: .25rem .75rem;
    border: 1px solid currentColor;
    border-radius: 2px;
}

#status.missing {
    color: var(--red);
}

#status.acquired {
    color: var(--green);
}

button,
input[type="submit"] {
    background: linear-gradient(180deg, #c8960c 0%, #8a6400 100%);
    color: var(--parchment);
    border: 1px solid var(--brass-dark);
    border-bottom: 3px solid #4a3400;
    font-family: 'Courier New', Courier, monospace;
    font-size: .82rem;
    font-weight: bold;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .55rem 1.3rem;
    cursor: pointer;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
    transition: filter .12s, transform .1s, box-shadow .1s;
}

button:hover,
input[type="submit"]:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}

button:active,
input[type="submit"]:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

textarea {
    width: 100%;
    background: #fdf6e4;
    border: 1.5px solid var(--brass-dark);
    border-radius: 2px;
    color: var(--ink);
    font-family: 'Courier New', Courier, monospace;
    font-size: .88rem;
    line-height: 1.6;
    padding: .7rem .9rem;
    resize: vertical;
    margin-bottom: .9rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .1);
    transition: border-color .15s, box-shadow .15s;
}

textarea::placeholder {
    color: #a08040;
    font-style: italic;
}

textarea:focus {
    outline: none;
    border-color: var(--brass-light);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .1), 0 0 0 3px rgba(184, 134, 11, .2);
}

.comments-section h3 {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    color: var(--wire);
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--brass-dark);
    padding-bottom: .45rem;
    letter-spacing: .04em;
}

.comments-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.comments-list li {
    background: rgba(255, 255, 255, .38);
    border-left: 3px solid var(--brass);
    padding: .65rem 1rem;
    font-size: .88rem;
    line-height: 1.6;
    color: var(--ink);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.comments-list li::before {
    content: '▶';
    color: var(--brass);
    margin-right: .5rem;
    font-size: .7rem;
    vertical-align: middle;
}

.comments-empty {
    color: var(--brass-dark);
    font-style: italic;
    font-size: .85rem;
    text-align: center;
    padding: 1rem;
    border: 1px dashed var(--brass-dark);
    opacity: .7;
}

.footer {
    text-align: center;
    color: var(--brass-dark);
    font-size: .65rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-top: 1.4rem;
    opacity: .7;
}

@media (max-width: 520px) {
    .masthead h1 {
        font-size: 1.5rem;
    }

    .main-panel {
        padding: 1.3rem 1.1rem 1.8rem;
    }

    .card {
        padding: 1rem 1rem;
    }
}
