﻿/* 基本スタイル */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    border-bottom: #007bff 3px solid;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin: 0.2rem 0 0;
    font-size: 1.2rem;
}

main {
    width: 80%;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

section:last-child {
    border-bottom: none;
}

h2 {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-top: 0;
}

h3 {
    color: #333;
    margin-top: 0;
}

ol, ul {
    padding-left: 20px;
}

/* ボタン */
.button, button[type="submit"] {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.button:hover, button[type="submit"]:hover {
    background-color: #0056b3;
}

.button-alt, button[type="reset"] {
    background-color: #6c757d;
}
.button-alt:hover, button[type="reset"]:hover {
    background-color: #545b62;
}


.action-button {
    text-align: center;
    margin: 30px 0;
}

/* フォームスタイル */
form div {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
    width: calc(100% - 22px); /* paddingとborderを考慮 */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* これでpaddingとborderがwidthに含まれる */
    font-size: 1rem;
}

input[type="radio"], input[type="checkbox"] {
    margin-right: 5px;
    vertical-align: middle;
}
label.radio-label {
    font-weight: normal;
    display: inline;
    margin-right: 15px;
}


textarea {
    resize: vertical; /* 縦方向のみリサイズ可 */
}

fieldset {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

legend {
    padding: 0 10px;
    font-weight: bold;
    color: #007bff;
}

.required {
    color: red;
    font-size: 0.9em;
    margin-left: 5px;
}

.form-actions {
    margin-top: 30px;
    text-align: right;
}

.form-actions button {
    margin-left: 10px;
}


/* フッター */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: #fff;
    margin-top: 30px;
}

footer p {
    margin: 5px 0;
}

footer nav a {
    color: #00aaff;
    text-decoration: none;
    margin: 0 10px;
}

footer nav a:hover {
    text-decoration: underline;
}

/* レスポンシブ対応（簡易的） */
@media (max-width: 768px) {
    main {
        width: 95%;
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="datetime-local"],
    textarea,
    select {
        width: 100%; /* スマホでは幅いっぱい */
    }
}