:root {
    --bg-1: #040612;
    --bg-2: #0c1030;
    --bg-3: #140d2a;
    --panel: rgba(9, 14, 31, 0.84);
    --panel-strong: rgba(6, 10, 22, 0.94);
    --border: rgba(150, 198, 255, 0.14);
    --text: #edf6ff;
    --muted: #a7b8d8;
    --accent-cyan: #8beeff;
    --accent-violet: #8b6cff;
    --accent-violet-strong: #6d43ff;
    --accent-blue: #5dc9ff;
    --mint: #8de0b7;
    --mobile-panel: rgba(8, 12, 20, 0.72);
    --mobile-chip-border: rgba(255, 255, 255, 0.1);
    --font-display: "Space Grotesk", "Segoe UI", sans-serif;
    --font-body: "Manrope", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overscroll-behavior: none;
}

body {
    color: var(--text);
    font-family: var(--font-body);
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
    background:
        radial-gradient(circle at 16% 14%, rgba(139, 108, 255, 0.2), transparent 24%),
        radial-gradient(circle at 84% 16%, rgba(139, 238, 255, 0.16), transparent 18%),
        radial-gradient(circle at 54% 72%, rgba(129, 75, 255, 0.14), transparent 26%),
        linear-gradient(180deg, var(--bg-1), var(--bg-2) 48%, var(--bg-3));
}

.game-shell {
    width: min(1420px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 30px;
}

.topbar,
.desktop-summary,
.game-layout,
.overlay-actions,
.topnav,
.mobile-row,
.mobile-topline,
.mobile-health-pill,
.mobile-run-pill,
.mobile-command-cluster,
.touch-controls,
.touch-cluster,
.resource-grid,
.control-list,
.mobile-pack-pill,
.mobile-pack-item {
    display: flex;
}

.topbar {
    justify-content: space-between;
    align-items: end;
    gap: 18px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(139, 238, 255, 0.2);
    box-shadow:
        0 0 0 1px rgba(139, 108, 255, 0.08),
        0 16px 36px rgba(2, 8, 26, 0.36),
        0 0 36px rgba(139, 108, 255, 0.14);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eyebrow,
.rail-label,
.summary-pill span,
.resource-card span,
.mobile-health-pill span,
.mobile-pack-item span {
    margin: 0;
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    font-family: var(--font-display);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
}

h2 {
    font-size: 1.48rem;
    line-height: 1.08;
}

.topnav {
    gap: 12px;
}

.topnav a,
.button {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.is-hidden {
    display: none !important;
}

.topnav a {
    color: var(--muted);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.topnav a[aria-current="page"] {
    color: #04101a;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    box-shadow: 0 14px 34px rgba(107, 124, 255, 0.32);
}

.desktop-summary,
.playfield-shell,
.side-rail,
.rail-card,
.summary-pill,
.mobile-health-pill,
.mobile-run-pill,
.mobile-pack-pill,
.mobile-icon-button,
.message-strip,
.touch-button,
.touch-stick-ring,
.touch-stick-knob,
.overlay-card,
.resource-card {
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%),
        var(--panel);
    backdrop-filter: blur(18px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 42px rgba(4, 10, 28, 0.22);
}

.desktop-summary {
    gap: 10px;
    margin-top: 16px;
    padding: 10px;
    border-radius: 24px;
}

.summary-pill {
    border-radius: 16px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
}

.summary-pill strong {
    font-size: 0.95rem;
}

.summary-pill:last-child {
    flex: 1 1 auto;
}

.game-layout {
    gap: 18px;
    margin-top: 18px;
    align-items: stretch;
}

.playfield-shell {
    position: relative;
    flex: 1 1 auto;
    min-height: 720px;
    padding: 16px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#gameCanvas {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: linear-gradient(180deg, #0f1736, #15102b);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.34);
    touch-action: none;
}

.message-strip {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 28px;
    z-index: 6;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    color: rgba(247, 240, 232, 0.86);
    font-size: 0.92rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 34%),
        rgba(12, 16, 28, 0.78);
}

.guide-chip {
    position: absolute;
    left: 32px;
    top: 24px;
    z-index: 8;
    max-width: min(340px, calc(100% - 420px));
    padding: 10px 12px 12px;
    border-radius: 18px;
    display: grid;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%),
        rgba(11, 16, 26, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.guide-chip-label {
    color: var(--accent-cyan);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guide-chip strong {
    font-size: 0.92rem;
    line-height: 1.15;
}

.guide-chip-copy {
    color: rgba(247, 240, 232, 0.72);
    font-size: 0.76rem;
    line-height: 1.35;
}

.boss-banner {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    width: min(320px, calc(100% - 120px));
    padding: 10px 12px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%),
        rgba(18, 12, 20, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

.boss-banner-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.boss-banner-head span {
    color: var(--accent-cyan);
}

.boss-bar {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.boss-bar-fill {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan));
    transform-origin: left center;
}

.side-rail {
    width: 320px;
    display: grid;
    gap: 14px;
    align-content: start;
}

.rail-card {
    border-radius: 22px;
    padding: 16px;
    display: grid;
    gap: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rail-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.resource-card {
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 6px;
}

.resource-card strong {
    font-size: 1rem;
}

.control-list {
    display: grid;
    gap: 10px;
}

.control-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.control-list span {
    color: var(--muted);
}

.mobile-hud,
.touch-controls {
    display: none;
}

.mobile-hud {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: 10px;
    right: 10px;
    z-index: 7;
    display: none;
    grid-template-columns: 1fr;
    gap: 5px;
    pointer-events: none;
}

.mobile-topline {
    align-items: center;
    gap: 6px;
}

.mobile-command-cluster {
    gap: 6px;
}

.mobile-command-cluster {
    flex: 0 0 auto;
    pointer-events: auto;
}

.mobile-row {
    gap: 5px;
    align-items: center;
    width: 100%;
}

.mobile-health-pill,
.mobile-run-pill,
.mobile-pack-pill,
.mobile-icon-button {
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 36%),
        var(--mobile-panel);
    border-color: var(--mobile-chip-border);
}

.mobile-health-pill,
.mobile-run-pill,
.mobile-pack-pill,
.mobile-run-pill {
    min-width: 0;
    padding: 6px 10px;
    align-items: center;
    gap: 7px;
}

.mobile-health-pill {
    flex: 0 0 auto;
}

.mobile-health-pill strong,
.mobile-run-pill strong,
.mobile-pack-item strong {
    font-size: 0.7rem;
    line-height: 1;
}

.mobile-run-pill {
    overflow: hidden;
}

.mobile-run-pill strong:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-pack-pill {
    flex: 1 1 auto;
    width: 100%;
    justify-content: space-between;
    padding-inline: 10px;
    gap: 4px;
}

.mobile-icon-button {
    min-width: 56px;
    min-height: 36px;
    padding: 0 10px;
    color: var(--text);
    font: inherit;
    font-weight: 800;
    font-size: 0.52rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: auto;
}

.mobile-kit-button {
    min-width: 64px;
    color: #04101a;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(107, 124, 255, 0.26);
}

.mobile-row-secondary {
    justify-content: stretch;
}

.mobile-pack-item {
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 4px;
    min-width: 0;
}

.mobile-pack-item span {
    font-size: 0.6rem;
    opacity: 0.9;
}

.mobile-pack-item strong {
    font-size: 0.76rem;
}

.mobile-separator {
    color: rgba(247, 240, 232, 0.42);
    font-size: 0.78rem;
}

.touch-controls {
    position: absolute;
    inset: auto 28px calc(env(safe-area-inset-bottom, 0px) + 24px) 28px;
    z-index: 7;
    justify-content: space-between;
    align-items: end;
    pointer-events: none;
    touch-action: none;
}

.touch-cluster {
    min-height: 150px;
    gap: 10px;
    align-items: end;
    pointer-events: auto;
}

.touch-cluster.touch-left {
    min-width: 162px;
    justify-content: flex-start;
}

.touch-cluster.touch-right {
    min-width: 188px;
    justify-content: flex-end;
}

.touch-action-stack {
    display: grid;
    gap: 10px;
    padding-bottom: 8px;
}

.touch-button {
    position: relative;
    min-width: 72px;
    min-height: 72px;
    padding: 0;
    border-radius: 999px;
    border: 0;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    font-size: 0.94rem;
    letter-spacing: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: blur(20px);
}

.touch-button::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid var(--border);
    border-radius: inherit;
    box-shadow: 0 14px 22px rgba(0, 0, 0, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 38%),
        rgba(10, 14, 24, 0.42);
    backdrop-filter: blur(20px);
}

.touch-button-secondary::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 38%),
        rgba(18, 24, 36, 0.52);
}

.touch-button-strong,
.button-primary {
    color: #04101a;
}

.touch-button-strong::before,
.button-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
}

.touch-button-compact {
    min-width: 68px;
}

.touch-button-jump {
    min-width: 94px;
    min-height: 94px;
    border-radius: 999px;
    font-size: 1.28rem;
}

.touch-stick {
    width: 156px;
    height: 156px;
    display: grid;
    place-items: center;
    touch-action: none;
}

.touch-stick-ring {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 45%, rgba(139, 238, 255, 0.12), transparent 56%),
        rgba(8, 12, 20, 0.22);
    border-color: rgba(139, 108, 255, 0.18);
    box-shadow:
        0 14px 24px rgba(0, 0, 0, 0.18),
        0 0 28px rgba(139, 108, 255, 0.1);
}

.touch-stick-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.12), transparent 36%),
        rgba(139, 238, 255, 0.2);
    border-color: rgba(139, 238, 255, 0.18);
    box-shadow:
        0 8px 14px rgba(0, 0, 0, 0.22),
        0 0 18px rgba(139, 238, 255, 0.12);
}

.touch-button-mini {
    min-width: 60px;
    min-height: 60px;
    font-size: 0.9rem;
}

.install-button {
    transition: opacity 140ms ease, transform 140ms ease;
}

.install-button:not(.is-hidden) {
    display: inline-flex;
}

.game-page.pwa-installed .install-button {
    display: none;
}

.game-page.overlay-active .mobile-hud,
.game-page.overlay-active .guide-chip,
.game-page.overlay-active .message-strip,
.game-page.overlay-active .boss-banner,
.game-page.overlay-active .touch-controls {
    opacity: 0;
    pointer-events: none;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(5, 6, 12, 0.72);
}

.overlay.is-hidden {
    display: none;
}

.overlay-card {
    width: min(560px, 100%);
    border-radius: 28px;
    padding: 26px;
    display: grid;
    gap: 14px;
}

.overlay-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.overlay-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.overlay-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.05);
}

.overlay-actions {
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    text-decoration: none;
}

.button-primary,
.button-secondary {
    min-height: 48px;
    padding: 0 18px;
}

.button-secondary {
    color: var(--text);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
}

.recipe-list {
    display: grid;
    gap: 10px;
}

.recipe-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.recipe-card h3,
.recipe-card p {
    margin: 0;
}

.recipe-card p {
    color: var(--muted);
    line-height: 1.5;
}

.recipe-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.recipe-copy {
    display: grid;
    gap: 6px;
}

.recipe-costs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.recipe-cost {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.recipe-card-ready {
    border-color: rgba(141, 224, 183, 0.22);
}

.recipe-card-locked {
    border-color: rgba(255, 255, 255, 0.06);
}

.recipe-card button {
    min-height: 42px;
    min-width: 96px;
    border: 0;
    border-radius: 999px;
    color: #170d0b;
    font: inherit;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--ember));
}

.recipe-card button:disabled {
    opacity: 0.45;
}

.rotate-overlay {
    z-index: 30;
}

@media (max-width: 1120px) {
    .game-layout {
        flex-direction: column;
    }

    .side-rail {
        width: auto;
    }
}

@media (pointer: coarse), (max-width: 920px) {
    body.game-page {
        overflow: hidden;
        overscroll-behavior: none;
        touch-action: none;
    }

    .game-shell {
        width: 100%;
        min-height: 100dvh;
        padding: 0;
    }

    .topbar,
    .desktop-summary,
    .side-rail {
        display: none;
    }

    .game-layout {
        margin-top: 0;
        display: block;
    }

    .playfield-shell {
        min-height: 100dvh;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        touch-action: none;
    }

    .mobile-hud {
        display: grid;
    }

    .message-strip {
        left: 50%;
        right: auto;
        top: calc(env(safe-area-inset-top, 0px) + 72px);
        bottom: auto;
        width: min(34vw, 220px);
        min-height: 30px;
        padding: 6px 9px;
        font-size: 0.58rem;
        border-radius: 999px;
        text-align: center;
        transform: translateX(-50%);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%),
            rgba(7, 10, 18, 0.78);
    }

    .guide-chip {
        left: 10px;
        top: calc(env(safe-area-inset-top, 0px) + 54px);
        max-width: min(180px, calc(100% - 260px));
        padding: 7px 9px 8px;
        gap: 2px;
        border-radius: 14px;
    }

    .guide-chip-label {
        font-size: 0.5rem;
    }

    .guide-chip strong {
        font-size: 0.68rem;
    }

    .guide-chip-copy {
        font-size: 0.58rem;
        line-height: 1.22;
    }

    .boss-banner {
        top: calc(env(safe-area-inset-top, 0px) + 54px);
        width: min(240px, calc(100% - 132px));
        padding: 8px 10px 10px;
    }

    .boss-banner-head {
        margin-bottom: 6px;
        font-size: 0.62rem;
    }

    .boss-bar {
        height: 8px;
    }

    .touch-controls {
        display: flex;
        inset: auto 30px calc(env(safe-area-inset-bottom, 0px) + 26px) 30px;
    }

    .touch-cluster {
        min-height: 158px;
    }

    .touch-cluster.touch-left {
        min-width: 168px;
    }

    .touch-cluster.touch-right {
        min-width: 196px;
        gap: 12px;
    }

    .touch-stick {
        width: 164px;
        height: 164px;
    }

    .touch-stick-ring {
        width: 112px;
        height: 112px;
    }

    .touch-button {
        min-width: 76px;
        min-height: 76px;
        font-size: 0.92rem;
    }

    .touch-button::before {
        inset: 10px;
    }

    #gameCanvas {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        aspect-ratio: auto;
        touch-action: none;
    }

    .overlay {
        align-items: end;
        padding: 0;
        overflow: hidden;
        background: rgba(5, 6, 12, 0.54);
    }

    .overlay-card {
        width: 100%;
        max-width: none;
        max-height: min(48dvh, 360px);
        overflow: auto;
        border-radius: 24px 24px 0 0;
        padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
        gap: 8px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
            rgba(7, 10, 18, 0.96);
    }

    #craftOverlay {
        position: fixed;
        inset: 0;
        justify-items: end;
        align-items: stretch;
        overflow: hidden;
        padding: 0;
    }

    #craftOverlay .overlay-card {
        position: fixed;
        top: 0;
        right: 0;
        width: min(44vw, 340px);
        height: 100dvh;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 24px 0 0 24px;
        padding: 10px 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
        box-shadow: -18px 0 40px rgba(0, 0, 0, 0.38);
    }

    .overlay-card .eyebrow {
        font-size: 0.62rem;
    }

    .overlay-card h2 {
        font-size: 1.18rem;
    }

    .overlay-card p {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .overlay-titlebar {
        position: sticky;
        top: -12px;
        z-index: 2;
        margin: -10px -10px 0;
        padding: 10px 10px 6px;
        background: linear-gradient(180deg, rgba(7, 10, 18, 0.98), rgba(7, 10, 18, 0.92));
    }

    .overlay-close {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .recipe-list {
        gap: 5px;
        display: grid;
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .recipe-card {
        padding: 8px 9px;
        gap: 4px;
        border-radius: 12px;
    }

    .recipe-head {
        gap: 8px;
        align-items: center;
    }

    .recipe-card h3 {
        font-size: 0.84rem;
    }

    .recipe-card p {
        font-size: 0.68rem;
        line-height: 1.2;
    }

    .recipe-cost {
        min-height: 22px;
        padding: 0 7px;
        font-size: 0.56rem;
        letter-spacing: 0.05em;
    }

    .recipe-card button,
    .button-primary,
    .button-secondary {
        min-height: 38px;
    }

    #craftOverlay .button-primary {
        min-width: 100%;
    }

    #craftOverlay .recipe-card button {
        min-width: 70px;
        min-height: 34px;
        padding: 0 10px;
        align-self: center;
        font-size: 0.72rem;
    }

    #craftOverlay .recipe-copy {
        gap: 4px;
    }

    #craftOverlay .recipe-copy p {
        display: none;
    }

    #craftOverlay .overlay-card h2 {
        font-size: 1rem;
    }

    #craftOverlay .overlay-card .eyebrow {
        font-size: 0.56rem;
    }

    #craftOverlay .overlay-close {
        width: 28px;
        height: 28px;
        font-size: 0.72rem;
    }

    #craftIntro {
        display: none;
    }

    #craftOverlay .overlay-actions {
        position: sticky;
        bottom: -12px;
        margin: 0 -12px calc(env(safe-area-inset-bottom, 0px) * -1);
        padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
        background: linear-gradient(180deg, rgba(7, 10, 18, 0), rgba(7, 10, 18, 0.96) 34%);
    }
}

@media (pointer: coarse) and (orientation: portrait) {
    .rotate-overlay {
        display: grid;
    }

    .message-strip,
    .touch-controls,
    .mobile-hud {
        display: none;
    }
}
