/* Geist (Google Fonts, linked from index.html) everywhere: page, headings, forms, panel, dialog, toasts, map controls. */
:root {
    --ds-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html, body,
h1, h2, h3, h4, h5, h6,
input, button, select, textarea,
dialog, summary,
.vanilla-toast,
.maplibregl-ctrl,
.maplibregl-ctrl-attrib {
    font-family: var(--ds-font);
}

body {
    /* user-select: none; */
    -webkit-user-select: none;
}

.touch-device-only {
    display: none;
}

/* Full-viewport game: no page scroll; the steering wheel (bottom centre, half off-screen) is clipped here. */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

#screen {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100vh;
}

/* lil-gui quick controls, overlaid on the map: above the canvas, below the title screen (z-index 2). */
#ds-gui {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
}

/* lil-gui 0.21 prefixes its classes (lil-root); target the root panel by nesting instead. */
#ds-gui > .lil-gui {
    --font-family: var(--ds-font);
    --background-color: rgba(0, 0, 0, 0.75);
    --title-background-color: rgba(0, 0, 0, 0.85);
    --widget-color: rgba(255, 255, 255, 0.12);
    --hover-color: rgba(255, 255, 255, 0.2);
    --focus-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

.virtual-key {
    position: absolute;
    border: 1px solid #fff;
    border-radius: 10px;
    cursor: pointer;
}

/* Start screen. The page itself never scrolls (see #screen), so this overlay scrolls
   on its own when the About section is expanded; the inner block is centred while it
   fits and starts from the top once it is taller than the viewport. */
#title {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    overflow-y: auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
    background-color: var(--ui-color-panel, #111827);
}

#title a {
    color: var(--whiskey-accent, #96e072);
}

#title .title-inner {
    margin: auto;
    max-width: 44rem;
    width: 100%;
}

#about {
    margin: 1.5rem 0 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    text-align: left;
}

#about summary {
    padding: 0.7rem 1rem;
    font-weight: 500;
    cursor: pointer;
}

#about .about-body {
    padding: 0 1rem 0.8rem;
    font-size: 15px;
    line-height: 1.65;
}

#about .about-body h1 {
    font-size: 1.35rem;
    margin: 0.6rem 0;
}

#about .about-body h2 {
    font-size: 1.1rem;
    margin: 1.1rem 0 0.3rem;
}

#about .about-body p {
    margin: 0.45rem 0;
}

#about .about-body a {
    color: var(--whiskey-accent, #96e072);
}

#title #start-button {
    font-size: 20px;
    width: 100%;
    text-align: center;
    vertical-align: middle;
    background-color: var(--whiskey-accent, #96e072);
    border-radius: 3px;
    color: #000000;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
}

#title #hard-road-button {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 16px;
    text-align: center;
    background-color: var(--whiskey-accent, #96e072);
    border-radius: 3px;
    color: #000000;
    padding: 8px 16px;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
}

/* Minimap, overlaid on the map: same margins and stacking as the quick controls (#ds-gui). */
#osm-side-panel {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 240px;
    height: 240px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

#osmmap {
    width: 100%;
    height: 100%;
}
