        :root {
            --bg: #0b0f17;
            --panel: #121a28;
            --panel2: #0f1623;
            --text: #e7eefc;
            --muted: #97a6c3;
            --accent: #7aa2ff;
            --good: #3ddc97;
            --bad: #ff6b6b;
            --border: rgba(255, 255, 255, .10);
            --shadow: 0 12px 30px rgba(0, 0, 0, .35);
            --radius: 18px;
            --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
        }

        * {
            box-sizing: border-box;
        }

        html,
        body {
            height: 100%;
        }

        body {
            margin: 0;
            font-family: var(--font);
            background: radial-gradient(1000px 700px at 20% 10%, rgba(122, 162, 255, .18), transparent 60%),
                radial-gradient(800px 600px at 80% 40%, rgba(61, 220, 151, .10), transparent 60%),
                var(--bg);
            color: var(--text);
            overflow: hidden;
        }

        .app {
            height: 100%;
            display: flex;
        }

        aside {
            width: 20vw;
            min-width: 220px;
            max-width: 360px;
            background: linear-gradient(180deg, rgba(18, 26, 40, .92), rgba(15, 22, 35, .92));
            border-right: 1px solid var(--border);
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .brand {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 10px;
            padding: 10px 10px 6px;
            border-radius: 14px;
            background: rgba(255, 255, 255, .04);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
        }

        .brand h1 {
            font-size: 14px;
            margin: 0;
            letter-spacing: .2px;
        }

        .brand small {
            color: var(--muted);
            font-size: 12px;
        }

        .list {
            display: flex;
            flex-direction: column;
            width: 100%;
            gap: 8px;
            padding: 10px;
            border-radius: var(--radius);
            background: rgba(255, 255, 255, .03);
            border: 1px solid var(--border);
        }

        #menu {
            background-color: #7aa2ff;
        }

        .shape-btn {
            width: 100%;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, .04);
            color: var(--text);
            padding: 10px 12px;
            border-radius: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            transition: transform .08s ease, background .12s ease, border-color .12s ease;
            user-select: none;
        }

        .shape-btn:hover {
            transform: translateY(-1px);
            background: rgba(255, 255, 255, .06);
        }

        .shape-btn[aria-pressed="true"] {
            border-color: rgba(122, 162, 255, .55);
            background: rgba(122, 162, 255, .12);
        }

        .shape-btn span {
            color: var(--muted);
            font-size: 12px;
        }

        .controls {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 10px;
            border-radius: var(--radius);
            background: rgba(255, 255, 255, .03);
            border: 5px solid var(--border);
        }

        .row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            color: whitesmoke;
            font-size: 16px;
            background-color: #7aa2ff;

        }

        .row strong {
            color: var(--text);
            font-weight: 600;
        }

        .pill {
            font-variant-numeric: tabular-nums;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: rgba(0, 0, 0, .15);
            color: var(--text);
            font-size: 12px;
        }

        main {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 18px;
            position: relative;
        }

        .stage {
            width: min(1100px, 100%);
            height: min(760px, 100%);
            border-radius: 22px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, .03);
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
        }

        #progress {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
            margin: 10px 0;
        }

        .progress-badge {
            font-size: 14px;
            padding: 4px 10px;
            border-radius: 999px;
            background: #e6f4ea;
            color: #1e7f43;
            font-weight: 500;
        }

        canvas {
            width: 100%;
            height: 100%;
            display: block;
            touch-action: none;
            /* belangrijk voor pointer events op touch */
        }

        .overlay {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            padding: 18px;
        }

        .message {
            max-width: 700px;
            text-align: center;
            padding: 14px 16px;
            border-radius: 16px;
            border: 1px solid var(--border);
            background: rgba(11, 15, 23, .72);
            backdrop-filter: blur(10px);
            box-shadow: var(--shadow);
        }

        .message h2 {
            margin: 0 0 6px 0;
            font-size: 18px;
            letter-spacing: .2px;
        }

        .message p {
            margin: 0;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.45;
        }

        .result {
            position: absolute;
            left: 16px;
            bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            pointer-events: none;
        }

        .badge {
            padding: 8px 10px;
            border-radius: 14px;
            border: 1px solid var(--border);
            background: rgba(11, 15, 23, .72);
            backdrop-filter: blur(10px);
            box-shadow: var(--shadow);
            font-size: 12px;
            color: var(--text);
            font-variant-numeric: tabular-nums;
        }

        .badge.good {
            border-color: rgba(61, 220, 151, .55);
        }

        .badge.bad {
            border-color: rgba(255, 107, 107, .55);
        }

        .hint {
            position: absolute;
            right: 16px;
            bottom: 16px;
            color: rgba(231, 238, 252, .70);
            font-size: 12px;
            pointer-events: none;
            background: rgba(11, 15, 23, .52);
            border: 1px solid var(--border);
            padding: 8px 10px;
            border-radius: 14px;
            backdrop-filter: blur(10px);
        }

        .menu-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .meter {
            height: 6px;
            background: #ddd;
            border-radius: 999px;
            overflow: hidden;
        }

        .meter-bar {
            height: 100%;
            background: #6bbf8e;
            /* groen */
            transition: width 0.3s ease;
        }

        .menu-item small {
            font-size: 12px;
            color: #555;
        }

        #progress {
            display: flex;
            gap: 8px;
            justify-content: center;
            padding: 6px;
        }

        .progress-item {
            position: relative;
            width: 48px;
            height: 48px;
        }

        .progress-item canvas {
            width: 100%;
            height: 100%;
            border-radius: 8px;
            background: #f4f7f5;
        }

        .progress-item .check {
            position: absolute;
            right: -4px;
            bottom: -4px;
            background: #4caf50;
            color: white;
            font-size: 14px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }


        @media screen and (max-width: 768px) {

            .app {
                display: flex;
                flex-direction: column-reverse;
                justify-content: flex-start;
            }
        }