/* ========================================
   リセット・基本設定
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', 'メイリオ', Meiryo, sans-serif;
    background: #fdeee6;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* ========================================
   コンテナ
   ======================================== */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* ========================================
   ヘッダー
   ======================================== */
.header {
    background: #771820;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.logo-container h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* ========================================
   プログレスバー
   ======================================== */
.progress-container {
    padding: 30px 20px 20px;
    background: #f8f9fa;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: #771820;
    transition: width 0.3s ease;
    width: 25%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.step {
    flex: 1;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #771820;
    color: white;
    transform: scale(1.1);
}

.step-label {
    font-size: 13px;
    color: #6c757d;
}

.step.active .step-label {
    color: #333;
    font-weight: bold;
}

/* ========================================
   フォーム
   ======================================== */
form {
    padding: 30px 20px;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #771820;
}

.form-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #771820;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid #771820;
}

.subsection-title {
    font-size: 16px;
    font-weight: bold;
    color: #764ba2;
    margin: 20px 0 15px;
    padding-left: 10px;
    border-left: 3px solid #764ba2;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 15px;
}

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

input[type="text"],
input[type="date"],
input[type="month"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

/* 日付入力の見切れ対策 */
input[type="date"],
input[type="month"] {
    min-height: 48px;
    line-height: 1.5;
    padding: 10px 12px;
}

/* iOS Safari用の日付ピッカー最適化 */
@supports (-webkit-touch-callout: none) {
    input[type="date"],
    input[type="month"] {
        padding: 12px 10px;
        font-size: 16px;
        min-height: 50px;
    }
}

input:focus,
select:focus {
    outline: none;
    border-color: #771820;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input.error,
select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* ========================================
   合計表示
   ======================================== */
.total-display {
    background: #fdeee6;
    color: #353535;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    margin-top: 30px;
}

.total-display span {
    font-size: 32px;
    font-weight: bold;
    margin: 0 5px;
}

/* ========================================
   働き方変化の詳細エリア
   ======================================== */
.work-change-detail {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #771820;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ボタン
   ======================================== */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.btn-primary {
    background: #771820;
    color: white;
    box-shadow: 0 4px 15px #683f3f66;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px #683f3f66;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-submit {
    font-size: 20px;
    padding: 18px 50px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px #683f3f66;
    }
    50% {
        box-shadow: 0 4px 25px #683f3f66;
    }
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 10px;
    }

    .header {
        padding: 20px 15px;
    }

    .logo-container h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 14px;
    }

    .progress-steps {
        gap: 5px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .step-label {
        font-size: 11px;
    }

    form {
        padding: 20px 15px;
    }

    .step-title {
        font-size: 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        min-width: auto;
    }

    .total-display {
        font-size: 16px;
    }

    .total-display span {
        font-size: 24px;
    }
}