html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

/* Fills the whole screen. A home-screen app in landscape leaves room only for the notch. */
#app {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

body.notch-left #app {
    left: env(safe-area-inset-left);
}

body.notch-right #app {
    right: env(safe-area-inset-right);
}

/* Colors the strip beside the notch. */
body.notch-left,
body.notch-right {
    background: #111827;
}

/* The game only works in landscape. Android locks to it from the manifest; iOS cannot, so ask. */
#rotate {
    display: none;
}

@media (orientation: portrait) {
    body.home-screen-app #rotate {
        position: fixed;
        inset: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: #111827;
        color: #f9fafb;
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 1.4rem;
        font-weight: 700;
    }
}
/* Landing page for windows too narrow to play. It scrolls, unlike the app's page. */
#landing {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    padding: 48px 20px;
    box-sizing: border-box;
    background: linear-gradient(145deg, #111827 0%, #1f2937 100%);
    color: #e5e7eb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
}

#landing[hidden] {
    display: none;
}

.landing-content {
    max-width: 560px;
    margin: 0 auto;
}

#landing h1 {
    margin: 0;
    color: #f9fafb;
    font-size: 2.6rem;
}

.landing-tagline {
    margin-top: 0;
    color: #fbbf24;
    font-size: 1.3rem;
    font-weight: 700;
}

.landing-desktop {
    margin-top: 32px;
    color: #f9fafb;
    font-weight: 700;
}

#copy-link {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    background: #fbbf24;
    color: #111827;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
