body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: #333;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px; /* 最大幅を調整 */
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.2em;
}

h2 {
    color: #34495e;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.6em;
}

h3 {
    color: #555;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    border: 1px solid #e0e0e0;
}

.input-section {
    text-align: center;
}

.input-option {
    margin-bottom: 30px;
    padding: 15px;
    border: 1px dashed #cccccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.input-option:last-of-type {
    margin-bottom: 20px;
}

.input-option h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #4a4a4a;
    font-size: 1.2em;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1em;
    color: #4a4a4a;
}

input[type="file"] {
    display: block;
    width: calc(100% - 20px);
    padding: 10px;
    margin: 0 auto 10px auto; /* マージン調整 */
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    background-color: #fdfdfd;
}

textarea {
    display: block;
    width: calc(100% - 20px);
    padding: 10px;
    margin: 0 auto 10px auto;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    resize: vertical; /* 垂直方向のみリサイズ可能 */
    font-family: 'Courier New', Courier, monospace;
}

p.note {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
    margin-bottom: 0;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: auto;
    min-width: 180px;
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.results-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-summary p,
.quartiles-section p {
    margin: 8px 0;
    font-size: 1.05em;
    line-height: 1.6;
}

.stats-summary strong,
.quartiles-section strong {
    color: #333;
    min-width: 150px;
    display: inline-block;
}

.deviation-values {
    margin-top: 25px;
}

.scrollable-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background-color: #f9f9f9;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.8;
    text-align: left; /* 左寄せ */
}

/* レスポンシブデザインの調整 */
@media (max-width: 767px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 20px;
        gap: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    button {
        width: 100%;
        padding: 10px 15px;
        font-size: 1em;
    }

    input[type="file"],
    textarea {
        width: 100%;
    }
}