/* Clean, minimal CSS (no magic). */
:root {
    --bg: #0b0f17;
    --panel: rgba(255, 255, 255, 0.06);
    --text: rgba(255, 255, 255, 0.9);
    --muted: rgba(255, 255, 255, 0.65);
    --border: rgba(255, 255, 255, 0.12);
}

html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* App layout: header + game canvas + footer */
body.app {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.siteHeader,
.siteFooter {
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0.28);
    border-color: var(--border);
}

.siteHeader {
    border-bottom: 1px solid var(--border);
}

.siteFooter {
    border-top: 1px solid var(--border);
}

.siteHeader__inner,
.siteFooter__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Center footer content on app */
body.app .siteFooter__inner {
    justify-content: center;
    gap: 22px;
}

body.app .siteFooter__left {
    text-align: center;
}

body.app .siteFooter__links {
    justify-content: center;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.siteNav,
.siteFooter__links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.siteNav__link,
.siteFooter__links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}

.siteNav__link:hover,
.siteFooter__links a:hover {
    color: var(--text);
}

.siteMain {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}



/* Canvas must fill ONLY the main area, not the whole viewport */
.siteMain canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Static pages (terms/privacy/disclaimer/contact) */
body.page {
    overflow: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pageMain {
    max-width: 920px;
    margin: 0 auto;
    padding: 22px 14px 44px;
    flex: 1 1 auto;
    width: 100%;
}

.pageCard {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 18px;
}

.pageCard h1 {
    margin: 0 0 10px;
    font-size: 26px;
}

.pageCard h2 {
    margin: 18px 0 8px;
    font-size: 18px;
}

.pageCard p,
.pageCard li {
    color: var(--muted);
    line-height: 1.55;
}

/* Center footer content on legal pages */
body.page .siteFooter__inner {
    justify-content: center;
    gap: 22px;
}

body.page .siteFooter__left {
    text-align: center;
}

body.page .siteFooter__links {
    justify-content: center;
}

.pageCard a {
    color: var(--text);
}

.mutedSmall {
    color: var(--muted);
    font-size: 12px;
}

/* Hide site header for canvas-first gameplay */
.siteHeader {
    display: none;
}

/* Mobile-only block (touch devices only) */
#mobileBlock {
    display: none;
    position: fixed;
    inset: 0;
    background: #0b0f14;
    color: #e8eef6;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mobileBlock__card {
    max-width: 420px;
    padding: 24px;
}

.mobileBlock__card h1 {
    margin: 0 0 12px;
    font-size: 28px;
    letter-spacing: 0.04em;
}

.mobileBlock__card p {
    margin: 8px 0;
    opacity: 0.9;
    line-height: 1.4;
}

/* ONLY touch devices */
@media (pointer: coarse) and (hover: none) {
    #mobileBlock {
        display: flex;
    }

    body {
        overflow: hidden;
    }
}