* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.contact-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 500;
    font-size: 14px;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.error-summary {
    background: #fff5f5;
    border: 2px solid #feb2b2;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.error-summary p {
    color: #c53030;
    font-weight: 600;
    margin-bottom: 10px;
}

.error-summary ul {
    list-style-position: inside;
    color: #e53e3e;
}

.error-summary li {
    margin: 5px 0;
    padding-left: 5px;
}

.success-message {
    background: #f0fff4;
    border: 2px solid #9ae6b4;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
}

.success-message p {
    color: #2f855a;
    font-size: 16px;
    margin: 10px 0;
}

.success-message p:first-child {
    font-weight: 600;
    font-size: 18px;
}

/* reCAPTCHA v3バッジの位置調整 */
.grecaptcha-badge {
    visibility: visible;
    opacity: 1;
}

/* レスポンシブデザイン */
@media (max-width: 640px) {
    .form-wrapper {
        padding: 25px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        padding: 10px 12px;
        font-size: 16px; /* iOS zoom防止 */
    }

    .submit-btn {
        padding: 12px;
        font-size: 15px;
    }
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }

    .form-wrapper {
        background: #2d3748;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    h1 {
        color: #e2e8f0;
    }

    label {
        color: #e2e8f0;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        background: #1a202c;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="tel"]:focus,
    textarea:focus {
        background: #1a202c;
        border-color: #667eea;
    }
}

/* プリント用スタイル */
@media print {
    body {
        background: white;
    }

    .form-wrapper {
        box-shadow: none;
    }

    .submit-btn,
    .g-recaptcha {
        display: none;
    }
}
