
/* ****************** 맞춤형 컨텐츠  ****************** */

    :root {
        --gap: 20px;
    }

    body {
        font-family: sans-serif;
        margin: 0;
        min-height: 100vh;
        position: relative;
    }

    .title-container {
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        padding: 20px 10px;
    }

    h2 { font-size: 2em; margin-bottom: 5px;}
    h4 { font-size: 1.2em; margin-top: 0;}

    #main-container {
        width: min(780px, 96vw);
        margin: 0 auto;
        display: flex;
        flex-direction: row;     /* 가로 배치 */
        align-items: flex-start;
        justify-content: center;
        gap: var(--gap);
        flex-wrap: nowrap;       /* 줄바꿈 금지 */
    }

    #controls-and-buttons {
        flex: 0 0 320px;         /* 고정 너비 */
        max-width: 250px;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 10px rgba(0,0,0,.04);
    }

    #controls {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        margin-bottom: 20px;
    }

    canvas {
        border: 1px solid #aaa;
        width: 100%;
        height: auto;
        max-width: 500px;
        aspect-ratio: 1 / 1;
        background: #fff;
    }

    .canvas-container {
        flex: 1 1 auto;
        max-width: 600px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .color-select {
        display: flex;
        flex-direction: column;
        align-items: center;
        border: 1px solid #ddd;
        padding: 10px;
        border-radius: 8px;
    }

    .ratio-group {
        margin-top: 5px;
        display: flex;
        flex-direction: column;
        gap: 3px;
        font-size: 14px;
    }

    #generateButton {
        margin-top: 10px;
        padding: 10px 20px;
        font-size: 16px;
        cursor: pointer;
    }

    #generateButton:disabled { background: #ccc; cursor: not-allowed; }
    .error-message { color: red; margin-top: 10px; }
    #selected-info { margin-top: 10px; font-weight: bold; }

