/* Morrey Keep BBS — green phosphor terminal theme */

:root {
    --phosphor: #33ff66;
    --phosphor-dim: #1d8f44;
    --phosphor-dark: #0e4a24;
    --phosphor-bright: #b8ffd0;
    --amber: #ffb000;
    --screen: #030904;
    --panel: #051205;
}

* {
    box-sizing: border-box;
}

html {
    background: #000;
}

body {
    margin: 0;
    background: var(--screen);
    color: var(--phosphor);
    font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
    font-size: 15px;
    line-height: 1.45;
    text-shadow: 0 0 6px rgba(51, 255, 102, 0.35);
}

/* faint CRT scanlines over everything */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 2px,
        rgba(0, 0, 0, 0.18) 3px
    );
}

.crt {
    max-width: min(88ch, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 1rem 1.25rem 2rem;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--phosphor-bright);
    text-decoration: none;
}

a:hover,
a:focus {
    background: var(--phosphor);
    color: #000;
    outline: none;
    text-shadow: none;
}

/* ---- masthead ------------------------------------------------------- */

.banner {
    margin: 0 0 0.5rem;
    color: var(--amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.45);
    font-size: 13px;
    line-height: 1.15;
    overflow-x: auto;
}

.menu-bar {
    display: flex;
    gap: 2ch;
    padding: 0.25rem 0.5rem;
    border-top: 1px solid var(--phosphor-dark);
    border-bottom: 1px solid var(--phosphor-dark);
    margin-bottom: 1.25rem;
}

/* ---- panels --------------------------------------------------------- */

.panel {
    border: 1px solid var(--phosphor-dim);
    background: var(--panel);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.panel-title {
    margin: 0 0 0.65rem;
    font-size: inherit;
    font-weight: bold;
    color: var(--amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.45);
    text-transform: lowercase;
}

.motd {
    margin: 0 0 0.35rem;
    min-height: 1.45em;
}

.byline {
    margin: 0;
    color: var(--phosphor-dim);
    text-align: right;
}

.crier-link {
    margin: 0.5rem 0 0;
}

.scrawl-canvas {
    display: inline-block;
    max-width: 100%;
    height: auto;
    background: #000;
    border: 1px solid var(--phosphor-dim);
}

.scrawl-direct {
    margin: 0.5rem 0 0;
}

.door-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.door-list li {
    margin-bottom: 0.5rem;
}

.door-desc {
    display: block;
    padding-left: 4ch;
    color: var(--phosphor-dim);
}

/* the overgrown door is barely visible until a lantern (cursor) passes over it */
.secret-door a {
    color: #0a2010;
    text-shadow: none;
}

.forest-art {
    margin: 0 0 0.75rem;
    color: var(--phosphor-dim);
    overflow-x: auto;
}

/* ---- scoreboards ----------------------------------------------------- */

.score-columns {
    display: flex;
    gap: 3ch;
    flex-wrap: wrap;
}

.score-columns > div {
    flex: 1 1 30ch;
}

.score-heading {
    margin: 0 0 0.35rem;
    font-size: inherit;
    font-weight: normal;
    color: var(--phosphor-bright);
}

.score-board {
    margin: 0;
    color: var(--phosphor);
    overflow-x: auto;
}

/* ---- games ----------------------------------------------------------- */

.game-blurb {
    margin: 0 0 0.65rem;
}

.game-help {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--phosphor-dim);
}

.game-help li::before {
    content: "· ";
}

.game-panel {
    text-align: center;
}

.game-screen {
    display: inline-block;
    text-align: left;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.12;
    letter-spacing: 0;
    color: var(--phosphor);
    cursor: default;
    overflow-x: auto;
    max-width: 100%;
}

.game-screen:focus {
    outline: 1px dashed var(--phosphor-dim);
}

.game-status {
    margin: 0.5rem 0 0;
    color: var(--amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.45);
    min-height: 1.45em;
}

/* ---- footer ----------------------------------------------------------- */

.status-line {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1ch;
    border-top: 1px solid var(--phosphor-dark);
    padding-top: 0.4rem;
    color: var(--phosphor-dim);
    font-size: 13px;
}

@media (max-width: 700px) {
    .banner {
        font-size: 9px;
    }

    .game-screen {
        font-size: 11px;
    }
}
