#resizer {
    width: 6px;
    cursor: ew-resize;
    background: #e0e0e0;
    border-right: 1px solid #ccc;
    z-index: 10;
    transition: background 0.2s;
}
#resizer:hover {
    background: #bdbdbd;
}
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: #f5f5f5;
}
#container {
    display: flex;
    height: 100vh;
}
#sidebar {
    width: 340px;
    min-width: 180px;
    max-width: 600px;
    background: #fafafa;
    border-right: 1px solid #ddd;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
    transition: width 0.1s;
}
#main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}
.piece-row {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    margin: 8px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    min-width: 0;
}
.piece-row input[type="color"] {
    border: 0px solid #888;
    background: #fff;
    width: 44px;
    height: 44px;
    /* border-radius: 8px; */
    padding: 0;
    cursor: pointer;
    /* box-shadow: 0 1px 4px #0002; */
    /* margin-right: 8px; */
    /* transition: border-color 0.2s; */
}
.piece-row input[type="color"]:hover,
.piece-row input[type="color"]:focus {
    border-color: #1976d2;
}
.piece-row input[type="number"] {
    width: 40px;
}
.piece-row input[type="text"] {
    width: 90px;
}
.piece-row button {
    margin-left: 8px;
    font-size: 18px;
    background: none;
    border: none;
    color: #b71c1c;
    cursor: pointer;
}
#sidebar button {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 15px;
    border-radius: 4px;
    border: 1px solid #bbb;
    background: #f0f0f0;
    cursor: pointer;
}
#sidebar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#warn {
    color: #b71c1c;
    font-weight: bold;
    margin: 8px 0;
}
#canvas {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px #0001;
    max-width: 95vw;
    max-height: 95vh;
    display: block;
}
