/* Parallax Maze Puzzle — docked description panel + screenshot gallery.
   Same shell as the Ghostnote and Pacmanic pages (arcade tokens, collapsible
   left panel). There is no web build to embed, so the stage is a scrolling
   column of screenshots instead of an iframe. Like those pages this one loads
   no shared stylesheet, so the tokens are restated here under the same names
   as site.css. */

:root {
    --surface: #14141f;
    --surface-2: #1d1d2c;
    --text: #f2f2f7;
    --text-muted: #9a9ab4;
    --border: #2b2b40;
    --accent: #ffd400;
    --accent-alt: #29d8ff;
    --scroll-thumb: #2b2b40;
    --scroll-thumb-hover: #3a3a55;
    --font-display: 'Press Start 2P', 'Courier New', monospace;
}

/* Press Start 2P — SIL Open Font License 1.1 */
@font-face {
    font-family: 'Press Start 2P';
    src: url('/content/fonts/press-start/press-start-2p-latin.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000;
}

body {
    display: flex;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Overlay-style scrollbar: transparent track, inset thumb. */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border: 4px solid transparent;
    background-clip: content-box;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
    background-clip: content-box;
}
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }

/* ---------- Description panel (docked left) ---------- */

#instructions {
    position: relative;
    flex: 0 0 390px;
    overflow-y: auto;
    background: var(--surface);
    border: 2px solid var(--border);
    padding: 1.4rem 1.6rem;
    color: var(--text);
    font: 12.5px/1.75 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
    transition: flex-basis .22s ease, padding .22s ease;
}

#btnToggle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
}

#btnToggle:hover { border-color: var(--accent-alt); color: var(--accent-alt); }

#btnToggle svg { display: block; }
#btnToggle .ico-open { display: none; }
body.instructions-collapsed #btnToggle .ico-close { display: none; }
body.instructions-collapsed #btnToggle .ico-open { display: block; }

/* Collapsed: the panel chrome disappears, leaving only the toggle button. */
body.instructions-collapsed #instructions {
    flex-basis: 32px;
    align-self: flex-start;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

body.instructions-collapsed #insText { display: none; }

body.instructions-collapsed #btnToggle {
    position: static;
    font-size: 15px;
}

#instructions h1 {
    font-family: var(--font-display);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-size: .95rem;
    line-height: 1.4;
    color: var(--accent);
    margin: .2rem 2.6rem .3rem 0;
}

#instructions p { margin: 0 0 .8rem; }

#instructions .lede { font-weight: 700; color: #fff; margin-bottom: 1.1rem; }

#instructions a { color: var(--accent-alt); text-decoration: none; }
#instructions a:hover { text-decoration: underline; }

#instructions .wip {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    padding: .2rem .5rem;
    display: inline-block;
    margin-bottom: 1.1rem;
}

/* Tile legend: the screenshots are only readable once you know what the
   surfaces mean, so the key sits with the description rather than in a caption. */
#instructions .legend {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

#instructions .legend li {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-bottom: .3rem;
}

#instructions .legend b {
    flex: 0 0 5.6rem;
    color: var(--accent-alt);
    font-weight: 400;
}

/* ---------- Screenshot stage ---------- */

#shots {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#shots figure {
    margin: 0;
    border: 2px solid var(--border);
    background: #000;
}

#shots img {
    display: block;
    width: 100%;
    height: auto;
}

#shots figcaption {
    padding: .7rem 1rem;
    border-top: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font: 12px/1.6 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ---------- Small screens: stack, description first ---------- */

@media (max-width: 860px) {
    body {
        flex-direction: column;
        overflow: auto;
        height: auto;
        min-height: 100%;
    }

    #instructions { flex: none; overflow-y: visible; }
    body.instructions-collapsed #instructions { flex-basis: auto; }

    #shots { overflow-y: visible; }
}
