body {
            background-color: #111827;
            color: white;
            touch-action: none;
            overflow: hidden;
            user-select: none;
            -webkit-user-select: none;
            /* モバイルブラウザのアドレスバー考慮 */
            height: 100dvh; 
            width: 100vw;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #app-container {
            transform-origin: center center;
            /* サイズ計算用に初期化 */
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        canvas {
            display: block;
            background-color: #1f2937;
            border-radius: 4px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
        }
        .main-canvas {
            border: 2px solid #374151;
        }
        .side-panel {
            background-color: #1f2937;
            border-radius: 8px;
            padding: 10px;
            border: 2px solid #374151;
        }
        .control-btn {
            background: rgba(55, 65, 81, 0.8);
            border: 1px solid #4b5563;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: #d1d5db;
        }
        .control-btn:active,
        .control-btn.btn-active {
            background: rgba(75, 85, 99, 0.9);
            transform: scale(0.95);
        }
        .toast-text {
            text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
        }

        /* --- 2P Mode Layout --- */
        .pane-content {
            transform-origin: center center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        .pane-game-row {
            display: flex;
            flex-direction: row;
            align-items: flex-start;
            justify-content: center;
            gap: 6px;
            position: relative;
        }
        .pane-side-col {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .pane-side-box {
            background-color: #1f2937;
            border-radius: 8px;
            padding: 6px;
            border: 2px solid #374151;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 72px;
        }
        .pane-controls-row {
            display: flex;
            justify-content: center;
            gap: 8px;
            width: 100%;
            max-width: 380px;
            margin-top: 6px;
            position: relative;
            z-index: 20;
        }
        .pane-ctrl-col {
            display: flex;
            flex-direction: column;
            gap: 4px;
            width: 160px;
        }
        .pane-ctrl-btn-top {
            height: 48px;
            width: 100%;
            font-size: 13px;
            border-radius: 12px;
        }
        .pane-ctrl-btn-mid {
            height: 52px;
            flex: 1;
            font-size: 20px;
            border-radius: 12px;
        }
        .pane-ctrl-btn-bot {
            height: 48px;
            width: 100%;
            font-size: 18px;
            border-radius: 12px;
        }