:root {
            --cell-size: 10vw;
        }
        @media (min-width: 500px) {
            :root { --cell-size: 45px; }
        }

        body {
            margin: 0;
            padding: 0;
            background-color: #444;
            font-family: 'Inter', sans-serif;
            touch-action: none;
            overflow: hidden;
            display: flex;
            justify-content: center;
        }

        /* 1. Light Grey Game Space */
        #game-space {
            position: relative;
            width: calc(10 * var(--cell-size));
            height: calc(16 * var(--cell-size));
            background-color: #d1d5db; /* Light Grey */
            background-image: 
                linear-gradient(to right, #9ca3af 1px, transparent 1px),
                linear-gradient(to bottom, #9ca3af 1px, transparent 1px);
            background-size: var(--cell-size) var(--cell-size);
            border: 2px solid #666;
        }

        /* 2. Thicker Divider Line between Row 2 and 3 relative to board */
        #divider-line {
            position: absolute;
            left: calc(3 * var(--cell-size));
            top: calc(6 * var(--cell-size)); /* 3 board offset + 3 month rows */
            width: calc(4 * var(--cell-size));
            height: 4px;
            background-color: #111;
            z-index: 5;
            pointer-events: none;
        }

        .board-cell {
            position: absolute;
            width: var(--cell-size);
            height: var(--cell-size);
            background: white;
            border: 1px solid #999;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: calc(var(--cell-size) * 0.4);
            font-weight: bold;
            color: black;
            z-index: 1;
        }

        /* 4. Selected date: White text, Black background */
        .board-cell.selected {
            background: black !important;
            color: white !important;
        }

        .piece-wrapper {
            position: absolute;
            touch-action: none;
            z-index: 10;
        }

        .piece-grid {
            display: grid;
            pointer-events: none;
        }

        .piece-cell {
            width: var(--cell-size);
            height: var(--cell-size);
            border-radius: 4px;
        }

        /* 3. Controls visibility logic */
        .controls {
            position: absolute;
            top: -40px;
            left: 0;
            display: flex;
            gap: 4px;
            z-index: 20;
            background: rgba(0,0,0,0.7);
            padding: 4px;
            border-radius: 6px;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .controls.visible {
            opacity: 1;
            pointer-events: auto;
        }

        .btn {
            background: #fff;
            color: #000;
            font-size: 11px;
            padding: 4px 10px;
            border-radius: 4px;
            font-weight: 800;
            text-transform: uppercase;
        }