/* WEB申込みフォーム専用スタイル */

/* フォームページ全体 */
.form-page {
    background: linear-gradient(to bottom, #f5ebe0 0%, #f8f4f0 50%, #fff 100%);
    min-height: 100vh;
    padding: 2rem 0 3rem;
}

.form-page-no-header {
    padding-top: 3rem;
}

/* コンパクトモード - 1ページに収まるように */
.form-page-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
    min-height: 100vh;
}

.form-page-compact .form-container {
    margin-bottom: 2.5rem;
}

.form-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* ページタイトル */
.form-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    color: #1a202c;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-title-icon {
    width: 1.5em;
    height: 1.5em;
    object-fit: contain;
    flex-shrink: 0;
}

/* 説明文 */
.form-description {
    font-size: 1rem;
    line-height: 1.8;
    text-align: center;
    color: #4a5568;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

/* フォーム情報ボックス */
.form-info-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #eff6ff;
    border-left: 4px solid #93c5fd;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    animation: infoBoxSlideIn 0.5s ease-out;
}

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

.form-info-icon {
    flex-shrink: 0;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}

.form-info-icon svg {
    width: 24px;
    height: 24px;
}

.form-info-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1e3a8a;
    margin: 0;
    font-weight: 500;
}

.form-info-text strong {
    font-weight: 700;
    color: #1e40af;
}

/* コンパクトモード用の調整 */
.form-page-compact .form-page-title {
    font-size: 1.375rem;
    margin: -1.5rem -1rem 1.5rem;
    padding: 2.1rem 1rem 1.4rem;
    background-color: var(--dark);
    color: #FFFFFF;
    letter-spacing: -0.01em;
    text-align: center;
}

.form-notice {
    background: #FFF8E1;
    border-left: 4px solid #F59E0B;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
}

.form-notice p {
    font-size: 0.8rem;
    color: #78350F;
    margin: 0;
    line-height: 1.6;
}

.form-notice p + p {
    margin-top: 0.375rem;
}

.form-page-compact .form-description {
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.form-page-compact .form-info-box {
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
}

.form-page-compact .form-info-text {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* フォームアイコン */
.form-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.form-icon svg {
    width: 56px;
    height: 56px;
    color: #3b82f6;
    animation: formIconBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* コンパクトモード用 */
.form-page-compact .form-icon {
    margin-bottom: 0.75rem;
}

.form-page-compact .form-icon svg {
    width: 50px;
    height: 50px;
}

/* ヘッダーイラスト */
.form-header-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.form-header-illustration img {
    width: 180px;
    height: auto;
}

/* コンパクトモード用 */
.form-page-compact .form-header-illustration {
    margin-bottom: 0.75rem;
}

.form-page-compact .form-header-illustration img {
    width: 160px;
}

@keyframes formIconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.sp-only {
    display: none;
}

/* フォーム全体 */
.apply-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* コンパクトフォーム */
.apply-form-compact {
    padding: 1.75rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* フォームグループ */
.form-group {
    margin-bottom: 2rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* コンパクトモード用 */
.apply-form-compact .form-group {
    margin-bottom: 1.25rem;
}

/* ラベル */
.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.form-label-required {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.form-label-optional {
    display: inline-block;
    background: #6b7280;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* 入力フィールドラッパー */
.form-input-wrapper {
    position: relative;
}

/* テキスト入力 */
.form-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1a202c;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #cbd5e0;
}

/* セレクトボックス */
.form-select {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1a202c;
    transition: all 0.3s ease;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 入力フィールドのアイコン */
.form-input-icon,
.form-select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* ヒントテキスト */
.form-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* エラーメッセージ */
.form-error {
    font-size: 0.85rem;
    color: #ef4444;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-weight: 600;
    display: none;
}

.form-error.show {
    display: block;
    animation: errorShake 0.5s ease-out;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-input.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* 送信ボタンラッパー */
.form-submit-wrapper {
    margin-top: 2.5rem;
}

.form-submit-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #000;
    text-align: left;
    line-height: 1.6;
}

/* コンパクトモード用 */
.apply-form-compact .form-submit-wrapper {
    margin-top: 1.75rem;
}

/* 送信ボタン */
.form-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    background: #D0002F;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    min-height: 64px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.38);
}

/* コンパクトボタン */
.apply-form-compact .form-submit-btn {
    padding: 1.1rem 1.75rem;
    font-size: 1.1rem;
    min-height: 58px;
}

.form-submit-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.form-submit-btn svg {
    flex-shrink: 0;
}

/* 確認画面 */
.confirm-content {
    background: white;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.confirm-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
}

.confirm-list {
    margin: 0;
    padding: 0;
}

.confirm-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.confirm-item:first-child {
    padding-top: 0;
}

.confirm-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.confirm-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.01em;
}

.confirm-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

/* 確認画面ボタン */
.confirm-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.75rem;
}

.confirm-submit-form {
    width: 100%;
}

.confirm-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: #4b5563;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.confirm-form {
    width: 100%;
}

.form-submit-btn-primary {
    background: #3b82f6;
}

.form-submit-btn-secondary {
    background: #6b7280;
}

/* 完了画面 */
.complete-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.complete-icon svg {
    color: #10b981;
    animation: checkmark 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 警告アイコン */
.warning-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.warning-icon svg {
    width: 80px;
    height: 80px;
    color: #f59e0b;
    animation: warningPulse 0.6s ease-out;
}

/* 大きな警告アイコン */
.warning-icon-large {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.warning-icon-bg {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    background: #fef3c7;
    border-radius: 50%;
}

.warning-icon-bg svg {
    width: 80px;
    height: 80px;
    color: #f59e0b;
}

/* 完了ページヘッダー */
.complete-header {
    text-align: center;
    margin-bottom: 1rem;
}

@keyframes warningPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 完了ページコンパクトモード */
.complete-page {
    padding: 1rem 0 !important;
}

.complete-page .form-container {
    padding: 0 0.75rem;
}

.complete-page .warning-icon {
    margin-bottom: 1rem;
}

.complete-page .warning-icon svg {
    width: 70px;
    height: 70px;
}

.complete-title {
    font-size: 1.2rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.3;
    color: red;
    text-decoration: none;
}

.complete-content-box {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* 重要情報ボックス */
.complete-important-box {
    background: #eff6ff;
    border-left: 4px solid #93c5fd;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0;
}

.complete-important-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.6rem;
}

.complete-important-header svg {
    flex-shrink: 0;
    color: #3b82f6;
}

.complete-important-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1e3a8a;
    margin: 0 0 0.75rem 0;
}

.complete-important-text strong {
    color: #1e40af;
    font-weight: 700;
}

/* ステップ説明 */
.complete-steps {
    margin: 1rem 0;
}

.complete-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.complete-step-item:last-child {
    margin-bottom: 0;
}

.complete-step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.complete-step-content {
    flex: 1;
}

.complete-step-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1e3a8a;
    margin: 0;
}

.complete-step-text strong {
    color: #1e40af;
    font-weight: 700;
}

/* お急ぎの方向けメモ */
.complete-urgent-note {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #64748b;
    text-align: left;
    margin: 0.75rem 0 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

/* 注意事項 */
.complete-notice {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
}

.complete-notice p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #92400e;
    margin: 0;
}

/* TOPに戻るボタン */
.complete-back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: #3b82f6;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
}

/* 電話番号表示 */
.complete-phone-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.complete-phone-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.complete-phone-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.complete-phone-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: 0.02em;
}

/* タイミング情報ボックス */
.complete-content-box .complete-timing-box {
    background: rgba(59, 130, 246, 0.08);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* タイミング情報テキスト */
.complete-timing-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #1e40af;
    margin: 0;
    text-align: center;
}

/* 完了ページ用の電話ボタンコンパクトスタイル */
.complete-page .modal-button-primary {
    min-height: 75px;
    padding: 0.85rem 1rem;
    margin-bottom: 0;
}

.complete-page .modal-button-label {
    font-size: 0.7rem;
}

.complete-page .modal-button-phone {
    font-size: 1.4rem;
}

.complete-page .modal-button-time {
    font-size: 0.7rem;
}

/* 独立したタイミング情報ボックス */
.complete-timing-box {
    background: #fefce8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #fde68a;
}

.complete-timing-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.complete-timing-item:last-child {
    margin-bottom: 0;
}

.complete-timing-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 本人確認ボックス内のタイミングアイコン */
.complete-important-box .complete-timing-icon {
    width: 44px;
    height: 44px;
    background: #dbeafe;
}

.complete-timing-icon svg {
    width: 24px;
    height: 24px;
    color: #f59e0b;
}

/* 本人確認ボックス内のタイミングアイコンSVG */
.complete-important-box .complete-timing-icon svg {
    width: 26px;
    height: 26px;
    color: #3b82f6;
}

.complete-timing-content {
    flex: 1;
}

.complete-timing-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.complete-timing-value {
    font-size: 1.05rem;
    color: #854d0e;
    line-height: 1.6;
}

.complete-timing-value strong {
    font-weight: 700;
    color: #78350f;
}

/* 本人確認ボックス内のタイミング情報テキスト */
.complete-important-box .complete-timing-label {
    color: #1e40af;
}

.complete-important-box .complete-timing-value {
    color: #1e3a8a;
}

.complete-important-box .complete-timing-value strong {
    color: #1e40af;
}

.complete-info-box {
    background: #fefce8;
    border-left: 4px solid #eab308;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.complete-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #854d0e;
    margin-bottom: 1rem;
}

.complete-info-header svg {
    flex-shrink: 0;
    color: #ca8a04;
}

.complete-info-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #854d0e;
    font-size: 0.95rem;
    line-height: 1.7;
}

.complete-info-list li {
    margin-bottom: 0.5rem;
}

.complete-info-list li:last-child {
    margin-bottom: 0;
}

.complete-buttons {
    display: flex;
    justify-content: center;
}

/* 電話ボタン */
.phone-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.5rem 2rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    background: #dc2626;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    margin-bottom: 2rem;
}

/* コンパクト電話ボタン */
.phone-btn-compact {
    padding: 1.2rem 1.75rem;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.phone-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.phone-btn-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phone-btn-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.phone-btn-arrow {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* 説明テキスト */
.complete-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #1a202c;
    margin-bottom: 2rem;
    text-align: left;
}

.complete-description strong {
    color: #dc2626;
    font-weight: 700;
}

.complete-description .highlight {
    color: #dc2626;
    font-weight: 700;
}

/* コンパクトモード用 */
.complete-content-box .complete-description {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.complete-description-secondary {
    margin-bottom: 1.25rem !important;
}

/* セカンダリボタン */
.secondary-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    background: #dc2626;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    margin-bottom: 2rem;
}

/* コンパクトセカンダリボタン */
.secondary-action-btn-compact {
    padding: 1rem 1.75rem;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.secondary-action-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.secondary-action-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.secondary-action-btn-main {
    font-size: 1.15rem;
    line-height: 1.4;
}

.secondary-action-btn-sub {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

.secondary-action-btn-arrow {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

/* フッター情報 */
.complete-footer-info {
    text-align: center;
    font-size: 0.95rem;
    color: #4a5568;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* コンパクトモード用 */
.complete-content-box .complete-footer-info {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .form-page {
        padding: 1.5rem 0 2rem;
    }

    /* SP時のフォームページ調整 */
    .form-page-compact {
        padding: 1rem 0 0;
        align-items: flex-start;
    }

    /* フォームにパディングボトムを追加（固定ボタン分 + safe area対応） */
    .apply-form-compact {
        padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
    }

    .form-page-title {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }

    .form-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .form-info-box {
        gap: 0.75rem;
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
    }

    .form-info-icon svg {
        width: 22px;
        height: 22px;
    }

    .form-info-text {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .sp-only {
        display: inline;
    }

    .apply-form {
        padding: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-input,
    .form-select {
        padding: 0.875rem 2.75rem 0.875rem 0.875rem;
        font-size: 0.95rem;
    }

    .form-submit-wrapper {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .form-submit-btn {
        padding: 1.1rem 1.5rem;
        font-size: 1.1rem;
        min-height: 58px;
    }

    .form-icon {
        margin-bottom: 0.625rem;
    }

    .form-icon svg {
        width: 44px;
        height: 44px;
    }

    .form-header-illustration {
        margin-bottom: 0.625rem;
    }

    .form-header-illustration img {
        width: 140px;
    }

    .form-page-title {
        margin-bottom: 1rem;
    }

    .confirm-box {
        padding: 1.5rem;
    }

    .confirm-item {
        padding: 1rem 0;
    }

    .confirm-label {
        font-size: 0.85rem;
    }

    .confirm-value {
        font-size: 1rem;
    }

    .complete-info-box {
        padding: 1.25rem;
    }

    .complete-info-header {
        font-size: 0.95rem;
    }

    .complete-info-list {
        font-size: 0.9rem;
        padding-left: 1.125rem;
    }

    .phone-btn {
        padding: 1.25rem 1.5rem;
        font-size: 1.4rem;
    }

    .phone-btn-icon {
        width: 28px;
        height: 28px;
    }

    .phone-btn-arrow {
        width: 28px;
        height: 28px;
    }

    .secondary-action-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .secondary-action-btn-main {
        font-size: 1rem;
    }

    .secondary-action-btn-sub {
        font-size: 0.8rem;
    }

    .secondary-action-btn-arrow {
        width: 24px;
        height: 24px;
    }

    .complete-description {
        font-size: 0.95rem;
    }

    .warning-icon svg {
        width: 70px;
        height: 70px;
    }

    .warning-icon-bg {
        width: 120px;
        height: 120px;
    }

    .warning-icon-bg svg {
        width: 70px;
        height: 70px;
    }

    .complete-important-box {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .complete-important-header {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .complete-important-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .complete-timing-box {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .complete-timing-icon {
        width: 44px;
        height: 44px;
    }

    .complete-timing-icon svg {
        width: 22px;
        height: 22px;
    }

    .complete-timing-label {
        font-size: 0.8rem;
    }

    .complete-timing-value {
        font-size: 1rem;
    }

    .complete-phone-display {
        gap: 0.875rem;
        padding: 1rem 1.25rem;
        margin-top: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .complete-phone-icon {
        width: 44px;
        height: 44px;
    }

    .complete-phone-icon svg {
        width: 22px;
        height: 22px;
    }

    .complete-phone-number {
        font-size: 1.5rem;
    }

    .complete-important-box .complete-timing-box {
        padding: 1rem;
        margin-top: 1.25rem;
    }

    .complete-important-box .complete-timing-icon {
        width: 40px;
        height: 40px;
    }

    .complete-important-box .complete-timing-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .form-page {
        padding: 1rem 0 1.5rem;
    }

    /* SP時のフォームページ調整 */
    .form-page-compact {
        padding: 0.75rem 0 0;
    }

    .form-page-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .form-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .form-info-box {
        gap: 0.625rem;
        padding: 0.875rem 1rem;
        margin-bottom: 1.25rem;
    }

    .form-info-icon svg {
        width: 20px;
        height: 20px;
    }

    .form-info-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .apply-form {
        padding: 1.25rem;
    }

    .form-input,
    .form-select {
        padding: 0.75rem 2.5rem 0.75rem 0.75rem;
        font-size: 0.9rem;
    }

    .form-submit-wrapper {
        margin-top: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .form-submit-btn {
        padding: 0.95rem 1.25rem;
        font-size: 1.05rem;
        min-height: 54px;
    }

    .form-icon {
        margin-bottom: 0.5rem;
    }

    .form-icon svg {
        width: 40px;
        height: 40px;
    }

    .form-header-illustration {
        margin-bottom: 0.5rem;
    }

    .form-header-illustration img {
        width: 120px;
    }

    .form-page-title {
        margin-bottom: 0.875rem;
    }

    .confirm-box {
        padding: 1.25rem;
    }

    .complete-info-box {
        padding: 1rem;
    }

    .complete-icon svg {
        width: 64px;
        height: 64px;
    }

    .phone-btn {
        padding: 1rem 1.25rem;
        font-size: 1.2rem;
    }

    .phone-btn-icon {
        width: 24px;
        height: 24px;
    }

    .phone-btn-arrow {
        width: 24px;
        height: 24px;
    }

    .phone-btn-content {
        gap: 0.75rem;
    }

    .secondary-action-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .secondary-action-btn-main {
        font-size: 0.95rem;
    }

    .secondary-action-btn-sub {
        font-size: 0.75rem;
    }

    .secondary-action-btn-arrow {
        width: 20px;
        height: 20px;
    }

    .complete-description {
        font-size: 0.9rem;
    }

    .warning-icon svg {
        width: 60px;
        height: 60px;
    }

    .warning-icon-bg {
        width: 100px;
        height: 100px;
    }

    .warning-icon-bg svg {
        width: 60px;
        height: 60px;
    }

    .complete-important-box {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }

    .complete-important-header {
        font-size: 0.95rem;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .complete-important-text {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .complete-timing-box {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }

    .complete-timing-item {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .complete-timing-icon {
        width: 40px;
        height: 40px;
    }

    .complete-timing-icon svg {
        width: 20px;
        height: 20px;
    }

    .complete-timing-label {
        font-size: 0.75rem;
    }

    .complete-timing-value {
        font-size: 0.95rem;
    }

    .complete-phone-display {
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .complete-phone-icon {
        width: 40px;
        height: 40px;
    }

    .complete-phone-icon svg {
        width: 20px;
        height: 20px;
    }

    .complete-phone-number {
        font-size: 1.3rem;
    }

    .complete-important-box .complete-timing-box {
        padding: 0.875rem;
        margin-top: 1rem;
    }

    .complete-important-box .complete-timing-item {
        gap: 0.625rem;
        margin-bottom: 0.875rem;
    }

    .complete-important-box .complete-timing-icon {
        width: 36px;
        height: 36px;
    }

    .complete-important-box .complete-timing-icon svg {
        width: 18px;
        height: 18px;
    }

    .complete-footer-info {
        font-size: 0.85rem;
    }
}

/* カレンダーピッカー */
.form-input-date {
    cursor: pointer;
    background: #f8fafc;
}

.datepicker-container {
    position: relative;
    margin-top: 0.75rem;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    animation: datepickerFadeIn 0.3s ease-out;
}

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

.datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.datepicker-current-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #1a202c;
}

.datepicker-year {
    font-size: 1.1rem;
    color: #4a5568;
}

.datepicker-month {
    font-size: 1.25rem;
    color: #3b82f6;
}

.datepicker-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}

.datepicker-nav-btn:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

.datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.datepicker-weekday {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    padding: 0.5rem 0;
}

.datepicker-weekday.sunday {
    color: #ef4444;
}

.datepicker-weekday.saturday {
    color: #3b82f6;
}

.datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.datepicker-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.datepicker-day.prev-month,
.datepicker-day.next-month {
    color: #cbd5e0;
    cursor: default;
}

.datepicker-day.current-month {
    color: #2d3748;
    background: #f8fafc;
}

.datepicker-day.current-month:hover:not(.past):not(.selected) {
    background: #dbeafe;
    color: #1e40af;
    transform: scale(1.05);
}

.datepicker-day.sunday:not(.prev-month):not(.next-month) {
    color: #ef4444;
}

.datepicker-day.saturday:not(.prev-month):not(.next-month) {
    color: #3b82f6;
}

.datepicker-day.today {
    background: #fef3c7;
    color: #92400e;
    font-weight: 800;
    outline: 2px solid #fbbf24;
}

.datepicker-day.selected {
    background: #3b82f6;
    color: white;
    font-weight: 800;
    transform: scale(1.05);
}

.datepicker-day.past {
    color: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.5;
}

.datepicker-day.past:hover {
    background: #f8fafc;
    transform: none;
}

@media (max-width: 768px) {
    .datepicker-container {
        padding: 1.25rem;
    }

    .datepicker-current-date {
        gap: 0.375rem;
    }

    .datepicker-year {
        font-size: 1rem;
    }

    .datepicker-month {
        font-size: 1.15rem;
    }

    .datepicker-nav-btn {
        width: 36px;
        height: 36px;
    }

    .datepicker-weekday {
        font-size: 0.75rem;
        padding: 0.375rem 0;
    }

    .datepicker-day {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .datepicker-container {
        padding: 1rem;
    }

    .datepicker-current-date {
        gap: 0.3rem;
    }

    .datepicker-year {
        font-size: 0.95rem;
    }

    .datepicker-month {
        font-size: 1.1rem;
    }

    .datepicker-nav-btn {
        width: 32px;
        height: 32px;
    }

    .datepicker-weekday {
        font-size: 0.7rem;
        padding: 0.3rem 0;
    }

    .datepicker-day {
        font-size: 0.85rem;
        border-radius: 8px;
    }
}

/* PC表示: フォームを画面中央浮かせではなく上から自然に流す */
@media (min-width: 768px) {
    .form-page-compact {
        align-items: flex-start;
        padding: 0 0 1.5rem;
    }

    .complete-page {
        padding-top: 0 !important;
    }

    .apply-form-compact {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }

    .form-page-compact .form-page-title {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: 0;
        margin-top: 0;
    }
}

/* ===== ローディングオーバーレイ ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
}

.loading-modal {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: loadingModalIn 0.3s ease-out;
}

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

.loading-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin: 1.5rem 0 0.5rem;
}

.loading-subtext {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

/* ローディングスピナー（大） */
.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* ローディングスピナー（小：ボタン内） */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 送信中ボタンのスタイル */
.form-submit-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

.form-submit-btn:disabled:hover {
    transform: none;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .loading-modal {
        margin: 0 1.5rem;
        padding: 2rem;
    }

    .loading-spinner-large {
        width: 50px;
        height: 50px;
    }

    .loading-text {
        font-size: 1.1rem;
    }

    .loading-subtext {
        font-size: 0.9rem;
    }
}
