@charset "UTF-8";

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Arial', sans-serif;
}

.container {
    padding: 40px;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: clamp(24px, 5vw, 32px);
}

.description {
    color: #666;
    margin-bottom: 30px;
    font-size: clamp(12px, 3vw, 14px);
    line-height: 1.6;
}

.canvas-wrapper {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
}

canvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.control-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

label {
    font-weight: bold;
    color: #555;
    min-width: 140px;
    text-align: left;
    font-size: clamp(12px, 3vw, 14px);
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.value-display {
    min-width: 50px;
    text-align: right;
    color: #667eea;
    font-weight: bold;
    font-size: clamp(12px, 3vw, 14px);
}

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: clamp(14px, 3.5vw, 16px);
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
    width: 100%;
    max-width: 200px;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}

/* タブレット以下 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px 15px;
    }

    .description br {
        display: none;
    }

    .canvas-wrapper {
        padding: 15px;
    }

    label {
        min-width: 110px;
        font-size: 12px;
    }

    .control-group {
        gap: 8px;
    }

    .value-display {
        min-width: 40px;
    }

    button {
        max-width: 100%;
    }
}

/* モバイル */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 15px 10px;
    }

    h1 {
        margin-bottom: 8px;
    }

    .description {
        margin-bottom: 20px;
    }

    .canvas-wrapper {
        padding: 10px;
        margin-bottom: 15px;
    }

    .controls {
        gap: 12px;
    }

    label {
        min-width: 90px;
        font-size: 11px;
    }

    input[type="range"]::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }

    input[type="range"]::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }

    button {
        padding: 10px 20px;
    }
}