body {
        font-family: sans-serif;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: #1e1e1e;
        color: #eee;
        min-height: 100vh;
    }
    h2 { margin: 20px; }
    #toolbar {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 10px;
        justify-content: center;
    }
    #palette {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
    }
    .tile {
        width: 40px; height: 40px;
        border: 2px solid #555;
        cursor: pointer;
        background-size: cover;
        background-position: center;
        border-radius: 6px;
    }
    .tile.active { border-color: #fff; }
    #grid {
        display: grid;
        grid-template-columns: repeat(20, 32px);
        grid-template-rows: repeat(20, 32px);
        gap: 1px;
        user-select: none;
    }
    .cell {
        width: 32px; height: 32px;
        border: 1px solid #333;
        background-color: #222;
        background-size: cover;
        background-position: center;
        border-radius: 2px;
    }
    button, select, input[type="file"] {
        background: #333; color: #eee; border: 1px solid #555;
        padding: 6px 10px; border-radius: 4px; cursor: pointer;
    }
    button:hover, select:hover { background: #444; }
    form { margin-top: 15px; }