        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none; /* avoid accidental dragging, keeps kids focused */
        }

        body {
            min-height: 100vh;
            background: linear-gradient(145deg, #1e2b6e 0%, #2a3f8a 100%);
            font-family: 'Poppins', 'Comic Neue', 'Segoe UI', 'Comic Neue', 'Chalkboard SE', cursive, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            position: relative;
        }

        /* main game container */
        .game-container {
            max-width: 950px;
            width: 100%;
            background: rgba(255, 248, 225, 0.95);
            border-radius: 80px 60px 80px 60px;
            box-shadow: 0 25px 40px rgba(0, 0, 0, 0.3), inset 0 1px 3px rgba(255,255,200,0.8);
            overflow: hidden;
            backdrop-filter: blur(2px);
            transition: all 0.2s ease;
        }

        /* header area with marks & labels */
        .stats-panel {
            background: #f9b81b;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            border-bottom: 6px solid #f28705;
            background-image: radial-gradient(circle at 10% 30%, rgba(255,215,0,0.2) 2%, transparent 2.5%);
            background-size: 20px 20px;
        }

        .score-box, .label-box {
            background: #2c1e0f;
            padding: 8px 18px;
            border-radius: 50px;
            color: #ffec9f;
            font-weight: bold;
            box-shadow: inset 0 -2px 0 #5a3e1f, 0 6px 12px rgba(0,0,0,0.2);
        }

        .score-box span, .label-box span {
            font-size: 1.7rem;
            font-weight: 800;
            color: #ffd966;
            margin-left: 10px;
            background: #221a0c;
            padding: 0 12px;
            border-radius: 40px;
            letter-spacing: 1px;
        }

        .badge-area {
            background: #ffdd99;
            border-radius: 50px;
            padding: 6px 20px;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .badge-icon {
            font-size: 2rem;
            filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.2));
        }

        .label-status {
            font-size: 1.2rem;
            background: gold;
            padding: 4px 14px;
            border-radius: 30px;
            color: #3b2a1f;
        }

        /* name row */
        .name-row {
            background: #ffefcf;
            padding: 12px 25px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            border-bottom: 2px solid #ffcc88;
        }
        .name-greeting {
            font-size: 1.2rem;
            font-weight: bold;
            background: #f5e2b2;
            padding: 6px 18px;
            border-radius: 40px;
            color: #b45f1b;
        }
        .name-control {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }
        .name-input {
            padding: 8px 15px;
            font-size: 1rem;
            border-radius: 60px;
            border: 2px solid #ffaa44;
            font-family: inherit;
            outline: none;
        }
        .save-name-btn, .reset-btn {
            background: #ff914d;
            border: none;
            padding: 6px 18px;
            border-radius: 40px;
            color: white;
            font-weight: bold;
            cursor: pointer;
            font-family: inherit;
            transition: 0.1s;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .reset-btn {
            background: #c74e1e;
        }
        .save-name-btn:active, .reset-btn:active {
            transform: scale(0.96);
        }

        /* question card */
        .quiz-card {
            padding: 35px 30px 25px;
        }

        .mistake-sentence {
            background: #fff3e0;
            border-radius: 55px;
            padding: 25px 20px;
            font-size: 1.9rem;
            font-weight: 600;
            text-align: center;
            color: #3e2a1f;
            border: 3px dashed #ffaa33;
            box-shadow: 0 12px 20px rgba(0,0,0,0.1);
            word-break: break-word;
            font-family: 'Courier New', 'Comic Neue', monospace;
        }

        .input-area {
            margin: 35px 0 25px;
            display: flex;
            flex-wrap: wrap;
            gap: 18px;
            justify-content: center;
        }

        .answer-input {
            flex: 3;
            min-width: 200px;
            padding: 16px 20px;
            font-size: 1.3rem;
            border: 4px solid #ffb347;
            border-radius: 60px;
            background: white;
            font-family: inherit;
            outline: none;
            transition: 0.2s;
            color: #2c3e2f;
            font-weight: 500;
        }

        .answer-input:focus {
            border-color: #f28500;
            box-shadow: 0 0 0 3px rgba(242,133,0,0.3);
            transform: scale(1.01);
        }

        .submit-btn {
            flex: 1;
            background: #ff914d;
            border: none;
            padding: 0 25px;
            font-size: 1.4rem;
            font-weight: bold;
            border-radius: 60px;
            color: white;
            cursor: pointer;
            transition: 0.1s linear;
            box-shadow: 0 5px 0 #b45f2b;
            font-family: inherit;
        }

        .submit-btn:active {
            transform: translateY(2px);
            box-shadow: 0 2px 0 #b45f2b;
        }

        .feedback {
            text-align: center;
            font-size: 1.3rem;
            font-weight: bold;
            padding: 12px;
            border-radius: 40px;
            background: #f2e8cf;
            margin-top: 10px;
            transition: 0.2s;
        }

        .feedback.correct {
            background: #b6e6b6;
            color: #1f631f;
        }

        .feedback.wrong {
            background: #ffcccc;
            color: #aa2e2e;
        }

        /* puzzle modal overlay */
        .puzzle-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.75);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(8px);
        }

        .puzzle-card {
            background: #fff9ef;
            max-width: 500px;
            width: 90%;
            border-radius: 70px;
            padding: 30px 25px;
            text-align: center;
            box-shadow: 0 30px 30px rgba(0,0,0,0.3);
            border: 5px solid #ffc107;
        }

        .puzzle-card h2 {
            color: #e67e22;
            font-size: 2rem;
            margin-bottom: 20px;
        }

        .puzzle-question {
            background: #ffefcf;
            padding: 20px;
            border-radius: 40px;
            font-size: 1.4rem;
            font-weight: bold;
            margin: 15px 0;
        }

        .puzzle-input {
            width: 100%;
            padding: 14px;
            font-size: 1.2rem;
            border-radius: 50px;
            border: 2px solid #ffb347;
            margin: 15px 0;
        }

        .puzzle-btn {
            background: #ff914d;
            padding: 12px 28px;
            border: none;
            border-radius: 50px;
            font-weight: bold;
            font-size: 1.2rem;
            color: white;
            cursor: pointer;
        }

        .progress-hint {
            margin-top: 15px;
            font-size: 0.9rem;
            color: #8a6e3c;
        }

        button {
            cursor: pointer;
        }

        footer {
            background: #ffddbb;
            padding: 12px;
            text-align: center;
            font-weight: bold;
            color: #b45f2b;
            font-size: 0.9rem;
        }

        @keyframes bounce {
            0% { transform: scale(1);}
            80% { transform: scale(1.02);}
        }
        .celebrate {
            animation: bounce 0.3s ease;
        }
        @media (max-width: 550px) {
            .mistake-sentence { font-size: 1.3rem; }
            .stats-panel { flex-direction: column; align-items: stretch; }
        }
        .shake {
            animation: shakeAnim 0.2s ease-in-out 0s 2;
        }
        @keyframes shakeAnim {
            0% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
            100% { transform: translateX(0); }
        }