/* ═══════════════════════════════════════════
   Yawn PathGuesser — Design System
   ═══════════════════════════════════════════ */

:root {
    /* ── New design system (from mockups) ── */
    --navy: #00356b;
    --navy-dark: #001f42;
    --navy-mid: #1e3a5f;
    --blue: #2d7dd2;
    --blue-light: #e8f0fb;
    --gold: #bd9b2d;
    --gold-light: #f5edcc;
    --green: #1a6b3c;
    --red: #c90016;
    --cream: #faf8f4;
    --text: #1a2634;
    --text-mid: #4a5a6a;
    --text-light: #8a9ab0;
    --border: #dde4ed;
    --rule: #c8d4e4;
    --navbar-height: 58px;

    /* ── Legacy variables (used by game components) ── */
    --color-primary: #2d7dd2;
    --color-primary-dark: #1a5fa3;
    --color-primary-light: #6ea8fe;
    --color-primary-bg: #e8f0fb;
    --color-correct: #198754;
    --color-correct-dark: #146c43;
    --color-correct-light: #75b798;
    --color-accent: #ffc107;
    --color-accent-dark: #e0a800;
    --color-text: #1a2634;
    --color-text-muted: #4a5a6a;
    --color-node-parent: #555;
    --color-node-leaf: #999;
    --color-border: #dde4ed;
    --color-line: #c8d4e4;
    --color-surface: #f8fafc;
    --color-white: #fff;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ── Typography defaults ── */
body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    line-height: 1.6;
}

/* ── Navbar ── */
.pg-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    padding: 0 48px;
    display: flex;
    align-items: center;
    height: var(--navbar-height);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo svg {
    width: 34px;
    height: 34px;
}

.nav-wordmark {
    font-family: 'EB Garamond', serif;
    font-size: 20px;
    font-weight: 500;
    color: white;
    letter-spacing: 0.2px;
}

.nav-wordmark span {
    color: #a8c4e8;
    font-style: italic;
}

.nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 5px;
    transition: all 0.15s;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.nav-cta {
    margin-left: 8px;
    background: var(--gold);
    color: var(--navy-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.15s;
    letter-spacing: 0.2px;
}

.nav-cta:hover {
    background: #d4ae38;
    color: var(--navy-dark);
}

/* ── Map (game) ── */
#map {
    height: calc(100vh - var(--navbar-height));
}

/* ── Map sidebar (game) ── */
#map-sidebar {
    position: fixed;
    top: calc(var(--navbar-height) + 14px);
    right: 20px;
    width: 280px;
    height: auto;
    max-height: 56px;
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.55);
    color: #fff;
    box-shadow: var(--shadow-md);
    border-radius: 20px;
    border: 2px solid var(--gold);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: width 0.3s ease, height 0.3s ease, max-height 0.3s ease,
        top 0.3s ease, right 0.3s ease, border-radius 0.3s ease,
        box-shadow 0.3s ease;
    backdrop-filter: blur(6px);
}

#map-sidebar.expanded {
    animation: none;
    background-color: rgba(255, 255, 255, 0.95);
    color: inherit;
    top: var(--navbar-height);
    right: 0;
    width: 100vw;
    height: calc(100vh - var(--navbar-height));
    max-height: calc(100vh - var(--navbar-height));
    padding: 16px;
    border-radius: 0;
    cursor: default;
    overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 780px) {
    .pg-navbar {
        padding: 0 24px;
    }

    .nav-links {
        display: none;
    }
}