@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/fonts/inter-400-700-latin.woff2") format("woff2");
}

:root {
    --bg: #12100e;
    --bg-raised: #211d19;
    --border: #2a2520;
    --border-strong: #3a332c;
    --text: #f2ede4;
    --text-soft: #b3aa9c;
    --text-faint: #8c8376;
    --accent: #ff6a3d;
    --accent-text: #ff8a63;
    --on-accent: #14110e;
    --glass: rgb(18 16 14 / .72);
    --shadow: 0 2px 6px rgb(0 0 0 / .4), 0 28px 72px -16px rgb(255 106 61 / .22);
    --radius: 12px;
    --radius-sm: 8px;
    --gap: 16px;
    --ease: cubic-bezier(.2, .7, .3, 1);
    color-scheme: dark;
}

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

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

#canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: var(--bg); }
#canvas:focus { outline: none; }

a { color: inherit; text-decoration: none; }

.glass {
    background: var(--glass);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid var(--border);
}

.bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 3;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; }
.crumb { color: var(--text-faint); }
.crumb::before { content: "/"; margin-right: 14px; color: var(--border-strong); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.link { color: var(--text-soft); font-weight: 500; }
.link:hover { color: var(--text); }

.button {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    box-shadow: 0 0 0 1px rgb(255 106 61 / .2), 0 6px 20px -6px rgb(255 106 61 / .55);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.button:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgb(255 106 61 / .3), 0 10px 26px -6px rgb(255 106 61 / .7); }

.card {
    position: fixed;
    z-index: 2;
    border-radius: var(--radius);
    padding: 14px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.eyebrow {
    margin: 0 0 8px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-text);
}

.stations { top: 76px; left: 20px; width: 232px; }
.stations ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.stations button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.stations button:hover { background: rgb(255 255 255 / .05); color: var(--text); }
.stations button[aria-current="true"] { background: rgb(255 106 61 / .12); color: var(--text); }
.stations .key {
    flex: none;
    width: 22px; height: 22px;
    display: grid; place-items: center;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    font-size: .75rem;
    color: var(--text-faint);
}
.stations button[aria-current="true"] .key { border-color: var(--accent); color: var(--accent-text); }

.hints {
    position: fixed;
    z-index: 2;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: .85rem;
    white-space: nowrap;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}

kbd {
    display: inline-block;
    min-width: 22px;
    margin-right: 3px;
    padding: 1px 6px;
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 6px;
    font-family: inherit;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    text-align: center;
}

body.chrome-hidden .bar { opacity: 0; transform: translateY(-8px); pointer-events: none; }
body.chrome-hidden .card, body.chrome-hidden .hints { opacity: 0; pointer-events: none; }

.loading {
    position: fixed;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(1200px 600px at 50% 110%, rgb(255 106 61 / .14), transparent 60%), var(--bg);
    transition: opacity .5s var(--ease);
}
.loading.done { opacity: 0; pointer-events: none; }
.loading-inner { width: min(420px, 100%); text-align: center; }
.loading h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15; letter-spacing: -.03em; }
.tagline { margin: 0 auto 26px; max-width: 36ch; color: var(--text-soft); }
.progress { height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-fill { width: 0; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s linear; }
.note { margin: 14px 0 0; font-size: .85rem; color: var(--text-faint); }
.note.error { color: var(--accent-text); }

@media (max-width: 720px) {
    .stations { top: auto; bottom: 20px; left: 12px; right: 12px; width: auto; }
    .stations ol { grid-template-columns: repeat(3, 1fr); }
    .stations .name { display: none; }
    .hints { display: none; }
    .crumb { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
