/* Shared shell styles for Web-Games.
   Colour variables (--color-bg, --color-fg, --color-muted) are defined by each
   page's own <style>; these rules only reference them. Theme toggling lives in
   /shared/shell.js. */

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

/* ── Topbar ── */
#topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.4rem 0.8rem;
    background: var(--color-bg);
    font-size: 0.85rem;
}
#topbar a { color: var(--color-muted); text-decoration: none; }
#topbar a:hover { color: var(--color-fg); }
#btn-theme {
    background: none; border: 1px solid var(--color-muted);
    color: var(--color-fg); border-radius: 4px;
    padding: 0.15rem 0.5rem; cursor: pointer; font-size: 0.85rem;
}
#btn-theme:hover { border-color: var(--color-fg); }

/* ── Range sliders ── */
input[type="range"] {
    -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
    background: var(--color-muted); border-radius: 3px; outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
    background: var(--color-fg); border-radius: 50%; cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px; background: var(--color-fg); border: none;
    border-radius: 50%; cursor: pointer;
}
input[type="range"]:focus-visible {
    outline: 2px solid var(--color-fg); outline-offset: 3px;
}

/* ── Storage warning toast ── */
#storage-warning {
    position: fixed; left: 50%; bottom: 1rem; z-index: 200;
    transform: translateX(-50%) translateY(150%);
    background: var(--color-fg); color: var(--color-bg);
    padding: 0.6rem 1rem; border-radius: 6px;
    font-size: 0.8rem; line-height: 1.3;
    max-width: min(90vw, 380px); text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: transform 0.25s ease;
    pointer-events: none;
}
#storage-warning.show { transform: translateX(-50%) translateY(0); }
