        :root {
            --ruby: #D32F2F;
            --sapphire: #1976D2;
            --emerald: #388E3C;
            --gold: #FBC02D;
            --sprite-crop-scale: 1.1;
            /* Adjust this to crop margins */
        }

        /* Lobby Screen */
        #lobby {
            display: none;
            flex-direction: column;
            /* Ensure vertical layout */
            align-items: center;
            justify-content: center;
            /* Center content vertically too if needed, though inline style only had align-items: center */
            background-color: #FFE5B4;
            /* Tiny Pixel Hearts Pattern */
            background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 9h1v1h-1z M12 9h1v1h-1z M9 10h5v2h-5z M10 12h3v1h-3z M11 13h1v1h-1z' fill='%23D32F2F' fill-opacity='0.15'/%3E%3C/svg%3E");
            background-size: 24px 24px;
            height: 100vh;
            margin: -1rem;
            padding: 1rem;
        }

        /* Waiting Screen Re-design */
        #waiting-screen {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background-color: #FFE5B4;
            /* Match reference bg */
            /* Tiny Pixel Hearts Pattern */
            background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 9h1v1h-1z M12 9h1v1h-1z M9 10h5v2h-5z M10 12h3v1h-3z M11 13h1v1h-1z' fill='%23D32F2F' fill-opacity='0.15'/%3E%3C/svg%3E");
            background-size: 24px 24px;
            height: 100vh;
            margin: -1rem;
            /* Undo body padding for full screen effect */
            padding: 1rem;
        }



        .sprites-container {
            position: relative;
            width: 300px;
            /* 2 characters * 150px? Adjust as needed */
            height: 180px;
            /* Based on aspect ratio */
            border: 4px solid #000;
            display: flex;
            justify-content: space-around;
            /* Distribute bride/groom */
            align-items: flex-end;
            /* Align bottom */
            overflow: hidden;
            box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
            padding-bottom: 0px;
            margin-bottom: 2rem;
        }

        .sprite-box {
            width: 140px;
            /* Approx half of container */
            height: 100%;
            position: relative;
        }

        .pixel-sprite {
            /* These will receive background-image dynamically */
            width: 400px;
            /* Original sprite sheet width? No, this logic needs to match admin dashboard logic */
            /* Admin dashboard logic: 
               full sprite width = W
               frame width = W/4
               We only have one sprite sheet URL for "full". 
               Wait, admin.js generates a FULL sprite (4x4) where each row is a state.
               So we need to know the frame dimensions. 
               Usually 400x480 total? 
               Let's assume standard dimensions or use background-size: cover/contain trickery if possible?
               Actually admin dashboard hardcodes 400x480 in .pixel-result, and state-idle is top 0.
               We'll try to replicate that behavior. 
               BUT admin code sets width: 400px; height: 480px; inside a 100x120 container?
               Wait, let's look at admin CSS again.
               .result-box (100x120) with overflow hidden.
               .pixel-result (400x480) absolute top 0 left 0.
               Animation: translateX(-400px) steps(4) infinite? NO.
               Animation: from translateX(0) to translateX(-400px).
               So the frame width is 100px? (400/4).
            */
            width: 400px;
            height: 480px;
            position: absolute;
            top: -120px;
            /* Row 2: Thinking */
            left: 0;
            image-rendering: pixelated;
            animation: sprite-walk 2s steps(4) infinite;
        }

        .pixel-sprite.incorrect {
            top: -240px;
            /* Row 3: Incorrect */
        }

        .pixel-sprite.correct {
            top: -360px;
            /* Row 4: Correct */
        }

        .sprite-viewport {
            width: 100px;
            height: 120px;
            position: relative;
            overflow: hidden;
            transform: scale(1.4);
            /* Scale up to fill the box a bit more? */
            transform-origin: bottom center;
        }

        .sprite-inner-crop {
            width: 100%;
            height: 100%;
            transform: scale(var(--sprite-crop-scale));
            transform-origin: center center;
        }

        /* Result Section */
        .result-section {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 2rem;
            width: 100%;
            max-width: 300px;
            /* Match container width roughly */
        }

        .result-icon {
            width: 120px;
            height: 120px;
            margin-bottom: 1rem;
        }

        .status-text {
            font-size: 2rem;
            margin-bottom: 1rem;
            text-align: center;
            color: black;
            font-family: 'Cubic-11', cursive;
        }

        #result-text {
            font-size: 2.2rem;
            margin-top: 0.2rem;
            margin-bottom: 0.8rem;
        }

        .score-box {
            border: 4px dotted #000;
            padding: 0.5rem 2rem;
            font-size: 2.5rem;
            background: transparent;
            width: 100%;
            text-align: center;
            box-sizing: border-box;
            font-family: 'Cubic-11', cursive;
        }

        /* Generic Helper */
        .hidden {
            display: none !important;
        }

        @keyframes sprite-walk {
            from {
                transform: translateX(0);
            }

            to {
                transform: translateX(-400px);
            }
        }

        .loading-text {
            font-family: 'Cubic-11', cursive;
            font-size: 1.9rem;
            color: black;
            text-align: center;
        }

        /* Loading Dots Animation */
        .loading-dots span {
            display: inline-block;
            animation: bounce 1.4s infinite ease-in-out both;
        }

        .loading-dots span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .loading-dots span:nth-child(2) {
            animation-delay: -0.16s;
        }

        @keyframes bounce {

            0%,
            80%,
            100% {
                transform: translateY(0);
            }

            40% {
                transform: translateY(-6px);
            }
        }

        /* Game Screen */
        .game-container {
            display: none;
            height: 90vh;
            flex-direction: column;
            justify-content: center;
        }



        .buttons-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 1fr 1fr;
            gap: 15px;
            flex: 1;
        }

        .game-btn {
            border: 4px solid #000;
            border-radius: 10px;
            font-size: 3rem;
            /* Icons or shapes */
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
            cursor: pointer;
        }

        .game-btn:active {
            transform: scale(0.95);
        }

        .btn-0 {
            background-color: var(--ruby, #D32F2F);
        }

        .btn-1 {
            background-color: var(--sapphire, #1976D2);
        }

        .btn-2 {
            background-color: var(--emerald, #388E3C);
        }

        .btn-3 {
            background-color: var(--gold, #FBC02D);
        }

        /* Couple Mode Styles */
        .buttons-grid.couple-mode {
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 1fr;
            height: 100%;
        }

        /* Only apply to buttons inside couple-mode grid */
        .buttons-grid.couple-mode .game-btn {
            writing-mode: vertical-rl;
            text-orientation: upright;
            font-family: 'Cubic-11', cursive;
            /* Ensure consistent font */
            letter-spacing: 0.2rem;
        }

        .buttons-grid.couple-mode .btn-0 {
            /* Left (Groom) - Red but keep existing color class if possible, or override */
            /* Assuming btn-0 is groom based on typical order */
            border-radius: 20px;
        }

        .buttons-grid.couple-mode .btn-1 {
            /* Right (Bride) - Blue */
            border-radius: 20px;
        }

        /* Result Overlay */
        .result-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: white;
            z-index: 100;
        }

        .result-text {
            font-size: 5rem;
            font-family: 'Cubic-11', cursive;
        }

        /* Final Ranking Screen */
        #ranking-screen {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background-color: #FFE5B4;
            background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 9h1v1h-1z M12 9h1v1h-1z M9 10h5v2h-5z M10 12h3v1h-3z M11 13h1v1h-1z' fill='%23D32F2F' fill-opacity='0.15'/%3E%3C/svg%3E");
            background-size: 24px 24px;
            height: 100vh;
            margin: -1rem;
            padding: 1rem;
        }

        .ranking-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 2;
            text-align: center;
        }

        .ranking-ring {
            width: 150px;
            height: auto;
            margin-bottom: 1.5rem;
        }

        .ranking-congrats {
            font-family: 'SatsukiGendaiMincho', serif;
            font-size: 2rem;
            color: #4a4a4a;
            margin-bottom: 0.5rem;
            letter-spacing: 0.3rem;
        }

        .ranking-place {
            font-family: 'SatsukiGendaiMincho', serif;
            font-size: 3.5rem;
            color: #4a4a4a;
            margin-bottom: 2rem;
            letter-spacing: 0.2rem;
        }

        .ranking-sprites {
            margin-top: 1rem;
        }
