/* ========================================
   エントリーフォーム専用スタイル
   ======================================== */

/* エントリーフォーム共通 */
.entry-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   ステップインジケーター
   ======================================== */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.step-indicator-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 1rem;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-number.active {
    background: #4a90e2;
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.step-number.completed {
    background: #4caf50;
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.step-label {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    min-width: 0;
    font-weight: 500;
}

/* ========================================
   ステップコンテンツ（フォーム用のみ）
   ======================================== */
.entry-form-container .step-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.entry-form-container .step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   フォームセクション
   ======================================== */
.form-section {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 46, 92, 0.1);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.form-section h3 {
    color: #002e5c;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 3px solid #4a90e2;
    padding-bottom: 0.5rem;
    position: relative;
}

.form-section h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
}

/* フォーム行・グループ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #002e5c;
    font-weight: 600;
    font-size: 0.95rem;
}

.required {
    color: #ff6b6b;
    font-weight: bold;
}

/* ========================================
   入力フィールド
   ======================================== */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafbfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    background: white;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* プレースホルダー */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* ========================================
   ファイルアップロード
   ======================================== */
.file-upload-area {
    border: 2px dashed #4a90e2;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    cursor: pointer;
    position: relative;
}

.file-upload-area.dragover {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #4caf50;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.file-upload-icon {
    font-size: 3.5rem;
    color: #4a90e2;
    margin-bottom: 1rem;
    display: block;
}

.file-upload-text {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.file-upload-text strong {
    color: #002e5c;
    font-size: 1.1rem;
}

.file-upload-button {
    background: linear-gradient(135deg, #4a90e2, #002e5c);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.file-upload-button:hover {
    background: linear-gradient(135deg, #002e5c, #1565c0);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* ========================================
   アップロード済みファイル
   ======================================== */
.uploaded-files {
    margin-top: 1.5rem;
}

.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 1.2rem;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.uploaded-file:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #002e5c;
    word-break: break-word;
}

.file-size {
    color: #666;
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.remove-file {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #e53e3e;
    transform: scale(1.05);
}

/* ========================================
   プログレスバー
   ======================================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #002e5c);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========================================
   チェックボックス
   ======================================== */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    transform: scale(1.2);
    accent-color: #4a90e2;
}

.checkbox-group label {
    margin: 0;
    line-height: 1.6;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-group label a {
    color: #4a90e2;
    text-decoration: underline;
    font-weight: 600;
}

.checkbox-group label a:hover {
    color: #002e5c;
}

/* ========================================
   ナビゲーションボタン
   ======================================== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.btn-nav {
    padding: 1.2rem 2.5rem;
    border: 2px solid #4a90e2;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-nav:hover::before {
    left: 100%;
}

.btn-nav.btn-primary {
    background: linear-gradient(135deg, #4a90e2, #002e5c);
    color: white;
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-nav.btn-primary:hover {
    background: linear-gradient(135deg, #002e5c, #1565c0);
    border-color: #002e5c;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.btn-nav.btn-secondary {
    background: white;
    color: #4a90e2;
    border-color: #4a90e2;
}

.btn-nav.btn-secondary:hover {
    background: #4a90e2;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ========================================
   エラー表示
   ======================================== */
.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none; /* デフォルトで非表示 */
    font-weight: 500;
    align-items: center;
    gap: 0.3rem;
    animation: slideDown 0.3s ease-out;
}

.error-message::before {
    content: '⚠️';
    font-size: 0.9rem;
}

.form-group.error .error-message {
    display: flex; /* エラー時のみ表示 */
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ff6b6b;
    background: #fef2f2;
    animation: shake 0.5s ease-in-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* アラート用のスタイル */
.validation-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem 2.5rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #ff6b6b;
    z-index: 10000;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: alertSlideIn 0.3s ease-out;
}

.validation-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.validation-alert h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.validation-alert h3::before {
    content: '⚠️';
    font-size: 1.5rem;
}

.validation-alert p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.validation-alert ul {
    text-align: left;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.validation-alert li {
    color: #ff6b6b;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.alert-button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.alert-button:hover {
    background: #e53e3e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.4);
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes alertSlideOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ========================================
   完了ページスタイル
   ======================================== */
.success-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.success-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 3.5rem;
    animation: successPulse 2s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(76, 175, 80, 0.4);
    }
}

.success-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 46, 92, 0.1);
    margin-bottom: 2rem;
    border: 2px solid #e8f5e8;
}

.success-title {
    font-size: 2.8rem;
    color: #002e5c;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #002e5c, #4a90e2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-subtitle {
    font-size: 1.3rem;
    color: #4caf50;
    margin-bottom: 2rem;
    font-weight: 600;
}

.success-message {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 2.5rem;
}

/* 完了ページ詳細表示 */
.entry-details {
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 6px solid #4caf50;
    margin-bottom: 2rem;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.entry-details h3 {
    color: #002e5c;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.detail-section {
    background: white;
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.detail-section h4 {
    color: #002e5c;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #002e5c;
    font-size: 0.85rem;
}

.detail-value {
    color: #666;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.85rem;
}

/* ファイル一覧 */
.files-list {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    padding: 0.8rem;
    border-radius: 10px;
    margin-top: 0.3rem;
    border: 1px solid #e3f2fd;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    color: #4a90e2;
    font-size: 0.8rem;
    font-weight: 500;
    flex-wrap: wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.file-item:last-child {
    margin-bottom: 0;
}

/* 今後の流れ */
.next-steps {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid #4a90e2;
    margin-bottom: 2rem;
}

.next-steps h3 {
    color: #002e5c;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.steps-list {
    text-align: left;
    max-width: none;
    margin: 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.1);
    transition: transform 0.3s ease;
}

.step-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.15);
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4a90e2, #002e5c);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-weight: 600;
    color: #002e5c;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    line-height: 1.3;
}

.step-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
}

/* 連絡先情報 */
.contact-info {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 1.2rem;
    border-radius: 15px;
    border: 2px solid #ff9800;
    margin-bottom: 2rem;
}

.contact-info h3 {
    color: #002e5c;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
}

.contact-info p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-action {
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    text-align: center;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-action:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2, #002e5c);
    color: white;
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #002e5c, #1565c0);
    border-color: #002e5c;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: white;
    color: #4a90e2;
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.1);
}

.btn-secondary:hover {
    background: #4a90e2;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

/* 紙吹雪エフェクト */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #4caf50;
    animation: confetti-fall 3s linear infinite;
    z-index: 1000;
    border-radius: 2px;
}

.confetti:nth-child(1) { left: 10%; animation-delay: 0s; background: #4caf50; }
.confetti:nth-child(2) { left: 20%; animation-delay: 0.5s; background: #4a90e2; }
.confetti:nth-child(3) { left: 30%; animation-delay: 1s; background: #ff9800; }
.confetti:nth-child(4) { left: 40%; animation-delay: 1.5s; background: #e91e63; }
.confetti:nth-child(5) { left: 50%; animation-delay: 2s; background: #9c27b0; }
.confetti:nth-child(6) { left: 60%; animation-delay: 0.3s; background: #2196f3; }
.confetti:nth-child(7) { left: 70%; animation-delay: 0.8s; background: #ff5722; }
.confetti:nth-child(8) { left: 80%; animation-delay: 1.3s; background: #607d8b; }
.confetti:nth-child(9) { left: 90%; animation-delay: 1.8s; background: #795548; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

/* ========================================
   スマホ最適化（768px以下）
   ======================================== */
@media (max-width: 768px) {
    /* 基本レイアウト */
    .entry-form-container,
    .success-container {
        padding: 1rem;
    }

    /* ステップインジケーター */
    .step-indicator {
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .step-indicator::before {
        display: none;
    }

    .step-indicator-item {
        padding: 0 0.5rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.8rem;
        min-width: 60px;
    }

    /* フォームセクション */
    .form-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .form-section h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    /* フォーム行 */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    /* 入力フィールド */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.9rem 1rem;
        font-size: 16px; /* iOSでズームを防ぐ */
    }

    /* ファイルアップロード */
    .file-upload-area {
        padding: 2rem 1rem;
    }

    .file-upload-icon {
        font-size: 3rem;
    }

    .file-upload-text {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .file-upload-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* アップロード済みファイル */
    .uploaded-file {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .file-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .remove-file {
        align-self: flex-end;
        padding: 0.3rem 0.8rem;
    }

    /* チェックボックス */
    .checkbox-group {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }

    .checkbox-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    /* ナビゲーション */
    .form-navigation {
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .btn-nav {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 1rem 2rem;
        font-size: 0.95rem;
    }

    /* 完了ページ */
    .success-card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .success-title {
        font-size: 2rem;
    }

    .success-subtitle {
        font-size: 1rem;
    }

    .success-message {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    /* 詳細表示 */
    .entry-details {
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .entry-details h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .detail-section {
        padding: 0.8rem;
        border-radius: 10px;
    }

    .detail-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
        padding-bottom: 0.2rem;
    }

    .detail-item {
        padding: 0.4rem 0;
        gap: 0.1rem;
    }

    .detail-label {
        font-size: 0.8rem;
        margin-bottom: 0.05rem;
    }

    .detail-value {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    /* ファイル一覧 */
    .files-list {
        padding: 0.6rem;
        margin-top: 0.2rem;
        border-radius: 8px;
    }

    .file-item {
        font-size: 0.75rem;
        gap: 0.2rem;
        margin-bottom: 0.3rem;
        align-items: flex-start;
        flex-direction: column;
        word-break: break-all;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    .file-item:last-child {
        margin-bottom: 0;
    }

    /* 今後の流れ */
    .next-steps {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .next-steps h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .steps-list {
        max-width: none;
    }

    .step-item {
        padding: 0.8rem;
        gap: 0.6rem;
        margin-bottom: 0.6rem;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .step-title {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    .step-description {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    /* 連絡先情報 */
    .contact-info {
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .contact-info h3 {
        font-size: 0.9rem;
    }

    .contact-info p {
        font-size: 0.8rem;
    }

    /* アクションボタン */
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }

    .btn-action {
        width: 100%;
        max-width: 240px;
        text-align: center;
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
        min-width: auto;
    }
}

/* ========================================
   極小スマホ最適化（480px以下）
   ======================================== */
@media (max-width: 480px) {
    /* 基本レイアウト */
    .entry-form-container,
    .success-container {
        padding: 0.5rem;
    }

    /* ステップインジケーター */
    .step-indicator {
        gap: 0.5rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    /* フォームセクション */
    .form-section {
        padding: 1rem;
        border-radius: 15px;
    }

    .form-section h3 {
        font-size: 1.2rem;
    }

    /* 入力フィールド */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.8rem;
        border-radius: 8px;
    }

    /* ファイルアップロード */
    .file-upload-area {
        padding: 1.5rem 0.8rem;
        border-radius: 10px;
    }

    .file-upload-icon {
        font-size: 2.5rem;
    }

    .file-upload-text {
        font-size: 0.8rem;
    }

    .file-upload-text strong {
        font-size: 0.9rem;
    }

    /* 完了ページ */
    .success-card {
        padding: 1rem;
        border-radius: 15px;
    }

    .success-title {
        font-size: 1.8rem;
    }

    .success-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    /* 詳細表示 */
    .entry-details {
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .entry-details h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .detail-grid {
        gap: 0.8rem;
    }

    .detail-section {
        padding: 0.8rem;
        border-radius: 8px;
    }

    .detail-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
        padding-bottom: 0.2rem;
    }

    .detail-item {
        padding: 0.5rem 0;
        gap: 0.1rem;
    }

    .detail-label {
        font-size: 0.8rem;
        margin-bottom: 0.05rem;
    }

    .detail-value {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    /* 今後の流れ */
    .next-steps {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .next-steps h3 {
        font-size: 1rem;
    }

    .step-item {
        padding: 0.8rem;
        gap: 0.6rem;
        margin-bottom: 0.6rem;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .step-title {
        font-size: 0.85rem;
    }

    .step-description {
        font-size: 0.75rem;
    }

    /* 連絡先情報 */
    .contact-info {
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .contact-info h3 {
        font-size: 0.95rem;
    }

    .contact-info p {
        font-size: 0.8rem;
    }

    /* ナビゲーション・アクションボタン */
    .btn-nav,
    .btn-action {
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
        border-radius: 20px;
    }

    .action-buttons {
        gap: 0.6rem;
    }

    .btn-action {
        max-width: 240px;
    }
}

/* ========================================
   ダークモード対応（オプション）
   ======================================== */
@media (prefers-color-scheme: dark) {
    .form-section {
        background: #1a1a1a;
        border-color: #333;
    }

    .form-section h3 {
        color: #e3f2fd;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        background: #333;
        border-color: #4a90e2;
    }

    .form-group label {
        color: #e3f2fd;
    }

    .file-upload-area {
        background: #2a2a2a;
        border-color: #4a90e2;
    }

    .uploaded-file {
        background: #2a2a2a;
        border-color: #444;
    }

    .file-name {
        color: #e3f2fd;
    }

    .file-size {
        background: #444;
        color: #ccc;
    }
}

/* ========================================
   印刷スタイル
   ======================================== */
@media print {
    .confetti,
    .form-navigation,
    .action-buttons,
    .step-indicator {
        display: none !important;
    }

    .success-card,
    .entry-details,
    .next-steps,
    .contact-info {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }

    .success-icon {
        animation: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* ========================================
   スムーズスクロール設定
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* iOS Safari でのスムーズスクロール改善 */
body {
    -webkit-overflow-scrolling: touch;
}

/* フォーカス時のアウトライン改善 */
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(74, 144, 226, 0.5);
    outline-offset: 2px;
}

/* スクロール位置調整用のマージン */
.step-indicator {
    scroll-margin-top: 100px;
}

.form-section {
    scroll-margin-top: 120px;
}

@media (prefers-contrast: high) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 3px;
    }

    .btn-nav,
    .btn-action {
        border-width: 3px;
    }

    .step-number {
        border: 3px solid #000;
    }
}

/* ========================================
   減少モーション設定対応
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .confetti {
        display: none;
    }

    .success-icon {
        animation: none;
    }
}

/* ========================================
   減少モーション設定対応
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .confetti {
        display: none;
    }

    .success-icon {
        animation: none;
    }
}

/* ========================================
   iPhone/モバイル端末向け修正（ここから追加）
   ======================================== */

/* form-sectionの背景色を強制的に白に固定 */
.form-section {
    background: white !important;
    width: 100%;
    box-sizing: border-box;
}

/* 成功ページのタイトルグラデーション修正 */
.success-title {
    color: #002e5c !important; /* フォールバック色を強制 */
    /* グラデーションテキストを一旦削除 */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

/* ダークモード設定を無効化 */
@media (prefers-color-scheme: dark) {
    .form-section {
        background: white !important;
        border-color: #e2e8f0 !important;
        color: #333 !important;
    }

        /* 連絡先情報セクションの修正（追加） */
    .contact-info {
        background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%) !important;
        color: #333 !important;
        border-color: #ff9800 !important;
    }

    .contact-info h3 {
        color: #002e5c !important;
    }

    .contact-info p {
        color: #666 !important;
    }

    .form-section h3 {
        color: #002e5c !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #fafbfc !important;
        border-color: #e2e8f0 !important;
        color: #333 !important;
    }

    .form-group label {
        color: #002e5c !important;
    }

    .success-title {
        color: #002e5c !important;
    }

    .success-card {
        background: white !important;
        color: #333 !important;
    }

        .file-upload-area {
        background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%) !important;
        border-color: #4a90e2 !important;
        color: #333 !important;
    }

    .file-upload-text {
        color: #666 !important;
    }

    .file-upload-text strong {
        color: #002e5c !important;
    }

    .file-upload-icon {
        color: #4a90e2 !important;
    }

    .uploaded-file {
        background: white !important;
        border-color: #e2e8f0 !important;
        color: #333 !important;
    }

    .file-name {
        color: #002e5c !important;
    }

    .file-size {
        background: #f1f5f9 !important;
        color: #666 !important;
    }
}

/* iPhone固有の修正 */
@supports (-webkit-touch-callout: none) {
    .form-section {
        background: white !important;
        color: #333 !important;
    }

        /* 連絡先情報セクションの修正（追加） */
    .contact-info {
        background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%) !important;
        color: #333 !important;
    }

    .contact-info h3 {
        color: #002e5c !important;
    }

    .contact-info p {
        color: #666 !important;
    }
    
    .success-title {
        color: #002e5c !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
    }
}

/* iOS Safari特有の問題対応（修正版） */
.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
    -webkit-appearance: none;
    appearance: none;
    background: white !important;
    color: #333 !important;
    border-radius: 12px;
}

/* チェックボックスは除外して、独自スタイル */
.form-group input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 20px;
    height: 20px;
    margin: 0;
    transform: scale(1.2);
    accent-color: #4a90e2;
}

/* select要素の矢印を復活 */
.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 3rem;
}

/* 完了ページ専用の連絡先情報 */
.entry-contact-info {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%) !important;
    padding: 1.2rem;
    border-radius: 15px;
    border: 2px solid #ff9800;
    margin-bottom: 2rem;
    color: #333 !important;
}

.entry-contact-info h3 {
    color: #002e5c !important;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
}

.entry-contact-info p {
    color: #666 !important;
    line-height: 1.5;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}