/* Shared tokens, the font faces, and the HUD's own layout.
 *
 * Palette colours (--p-*) are not here: lib/palettes.js is the one source and
 * injects them as a <style> at start, keyed by data-palette on the root. */

@font-face { font-family: 'Noto Emoji'; src: url('fonts/NotoEmoji-wght.ttf') format('truetype'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Noto Color Emoji'; src: url('fonts/NotoColorEmoji.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Twemoji Mozilla'; src: url('fonts/TwemojiMozilla.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'OpenMoji Color'; src: url('fonts/OpenMoji-Color.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'OpenMoji Black'; src: url('fonts/OpenMoji-Black.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/JetBrainsMono-wght.ttf') format('truetype'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Fira Code'; src: url('fonts/FiraCode-VF.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cascadia Mono'; src: url('fonts/CascadiaMono.ttf') format('truetype'); font-weight: 200 700; font-display: swap; }
@font-face { font-family: 'Departure Mono'; src: url('fonts/DepartureMono-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Press Start 2P'; src: url('fonts/PressStart2P-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Symbols Nerd Font Mono'; src: url('fonts/SymbolsNerdFontMono-Regular.ttf') format('truetype'); font-display: swap; }

:root {
    --rail-w: 300px;
    --font-ui: 'JetBrains Mono', ui-monospace, monospace;
    --radius: 6px;
}

html, body { height: 100%; margin: 0; }

body {
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    background: var(--p-bg);
    color: var(--p-ink);
    font: 13px/1.4 var(--font-ui);
}

hud-rail {
    display: block;
    height: 100vh;
    overflow: auto;
    border-right: 1px solid var(--p-muted);
    box-sizing: border-box;
}

#app {
    position: relative;
    height: 100vh;
    min-width: 0;
}

#app iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--p-bg);
}

@media (max-width: 800px) {
    body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100vh; }
    hud-rail { height: auto; max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--p-muted); }
    #app { height: auto; min-height: 0; }
}
