html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.87);
    background-color: #0f0f0f;
}

body.fs-active {
    overflow: hidden;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
}

#app.pseudo-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9998;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background-color: #1a1020;
}

#game-container {
    width: 100%;
    height: 100%;
}

#present-root {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ttl-fullscreen-btn {
    position: fixed;
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    z-index: 110;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border: 2px solid #8866aa;
    border-radius: 10px;
    background: rgba(26, 16, 38, 0.9);
    color: #f8f0f4;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    pointer-events: auto;
    transition: background 120ms ease-out, border-color 120ms ease-out, transform 120ms ease-out;
}

.ttl-fullscreen-btn.is-active {
    border-color: #f5a8c8;
    color: #f5a8c8;
}

@media (hover: hover) and (pointer: fine) {
    .ttl-fullscreen-btn:hover {
        background: rgba(42, 24, 56, 0.95);
        border-color: #aa88cc;
    }
}

.ttl-fullscreen-btn:active {
    transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
    .ttl-fullscreen-btn:active {
        transform: none;
    }
}
