body {
    font-family: sans-serif;
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
    line-height: 1.6;
    /* ▼▼▼ 削除 ▼▼▼
    height: 100%;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    */
}

/* ▼▼▼ 削除 ▼▼▼
.header-container { ... }
*/

h1,
h3 {
    border-bottom: 2px solid #ccc;
    padding-bottom: 4px;
}

.main-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 25px;
    /* ▼▼▼ 削除 ▼▼▼
    flex-grow: 1;
    min-height: 0;
    padding: 20px;
    */
}

.controls-container {
    flex: 0 1 500px;
    /* ▼▼▼ 削除 ▼▼▼
    display: flex;
    flex-direction: column;
    height: 100%;
    */
}

.canvas-container {
    flex: 1 1 auto;
    margin-top: 10px;
    /* ▼▼▼ 削除 ▼▼▼
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    overflow: auto;
    */
}

.control-group {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    /* ▼▼▼ 削除 ▼▼▼
    flex-shrink: 0;
    */
}

/* ▼▼▼ 削除 ▼▼▼
.control-group.script-group { ... }
*/


.control-group>div {
    margin-bottom: 10px;
}

.control-group p {
    font-size: 0.9em;
    color: #333;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    /* ▼▼▼ 削除 ▼▼▼
    flex-shrink: 0;
    */
}

.control-group code {
    background-color: #eee;
    padding: 2px 5px;
    border-radius: 3px;
}

input[type="file"] {
    width: 95%;
}

textarea#userScript {
    width: 95%;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    background-color: #2b2b2b;
    color: #f0f0f0;

    /* ▼▼▼ 削除 ▼▼▼
    flex-grow: 1;
    height: auto;
    resize: none;
    */
}

input[type="number"],
input[type="color"] {
    padding: 4px 8px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    vertical-align: middle;
}

input[type="color"] {
    width: 60px;
    height: 35px;
    padding: 2px;
}

label {
    margin-right: 5px;
    font-weight: bold;
}

.grid-controls label {
    font-weight: normal;
    cursor: pointer;
}

.grid-controls input[type="checkbox"] {
    cursor: pointer;
    margin-right: 4px;
}


small {
    color: #555;
    display: block;
    margin-left: 5px;
}

button {
    cursor: pointer;
    border: none;
    width: 100%;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
    /* ▼▼▼ 削除 ▼▼▼
    flex-shrink: 0;
    */
}

#toggleAnimationButton {
    background-color: #007bff;
    color: white;
}

#toggleAnimationButton:hover {
    background-color: #0056b3;
}

#toggleAnimationButton.animating {
    background-color: #dc3545;
    color: white;
}

#toggleAnimationButton.animating:hover {
    background-color: #c82333;
}


canvas {
    border: 1px solid black;
    background-color: #fff;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    /* ▼▼▼ 削除 ▼▼▼
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    */
}

.grid-controls {
    margin-top: 10px;
}