/* =============================================
   助成金申請フォーム - Design System
   ============================================= */

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&family=Inter:wght@400;500;600&display=swap");

/* CSS Custom Properties */
:root {
    /* Colors */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;

    --accent-500: #06b6d4;
    --accent-600: #0891b2;

    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-600: #16a34a;

    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    --danger-50: #fef2f2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --white: #ffffff;
    --bg-main: #f0f4f8;
    --bg-card: #ffffff;
    --bg-section: #f8fafc;

    /* Typography */
    --font-primary:
        "Noto Sans JP", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.8125rem;
    --font-size-base: 0.9375rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md:
        0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg:
        0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl:
        0 20px 25px -5px rgba(0, 0, 0, 0.08),
        0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-input-focus: 0 0 0 3px rgba(59, 130, 246, 0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   Reset & Base
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-main);
    color: var(--gray-800);
    line-height: 1.7;
    min-height: 100vh;
}

.linkNone{
    pointer-events: none;
    display: inline;
}

/* =============================================
   Layout
   ============================================= */
.form-page {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}
body > div form {
    padding: 0;
}
@media (max-width: 768px) {
    .form-page {
        padding: var(--space-4) var(--space-3);
    }
}

/* =============================================
   Back Link
   ============================================= */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-500);
    text-decoration: none;
    margin-bottom: var(--space-6);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.back-link:hover {
    color: var(--gray-700);
    background: var(--gray-50);
}

.back-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.back-link:hover svg {
    transform: translateX(-2px);
}

/* =============================================
   Header
   ============================================= */
.form-header {
    text-align: center;
    margin-bottom: var(--space-10);
    position: relative;
}

.form-header::after {
    content: "";
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gray-500), var(--accent-500));
    border-radius: 2px;
}

.form-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    color: var(--gray-700);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-4);
    border-radius: 100px;
    margin-bottom: var(--space-4);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-badge.dx-badge-header {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    color: var(--gray-800);
}

.form-badge svg {
    width: 14px;
    height: 14px;
}

.form-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: var(--space-2);
}

.form-subtitle {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    font-weight: 400;
}

.card-features {
    list-style: none;
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.formInfomation .card-features li ul {
    display: list-item;
    list-style-type: none;
    margin-left: var(--space-6);
}
.formInfomation .card-features li ul li {
    padding: 0;
}

.card-features li,
.card-features dt,
.card-features dd {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    padding: var(--space-2) 0;
    line-height: 1.5;
}

.card-features li span,
.card-features dt > span,
.card-features dd > span {
    display: flex;
    gap: var(--space-2);
    flex-direction: row;
}

.formInfomation .card-features li,
.formInfomation .card-features dt,
.formInfomation .card-features dd {
    padding: var(--space-1) 0;
}

.card-features li svg.check-general {
    color: var(--gray-500);
}

.card-features li svg.check-dx {
    color: var(--gray-800);
}

.card-features li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 3px;
}

.card-features dt,
.card-features dd {
    padding-bottom: 0;
}

.card-badge.general-badge {
    background: var(--gray-50);
    color: var(--gray-700);
    margin-top: 0;
}

.card-badge.dx-badge {
    background: #f5f3ff;
    color: var(--gray-800);
    width: auto;
    float: left;
}

.card-badge {
    display: inline;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-4);
}

.selection-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-8) var(--space-6);
    text-align: center;
    border: 2px solid var(--gray-100);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-4);
    background: #f5f3ff;
    color: var(--gray-800);
}

.formInfomation {
    margin-bottom: var(--space-10);
}

.formInfomation.selection-card {
    cursor: auto;
}

/* =============================================
   Progress Indicator
   ============================================= */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-10);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
    transition: var(--transition-base);
    border: 2px solid var(--gray-200);
    color: var(--gray-400);
    background: var(--white);
}

.progress-dot.active {
    border-color: var(--gray-500);
    background: var(--gray-500);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.progress-dot.completed {
    border-color: var(--success-500);
    background: var(--success-500);
    color: var(--white);
}

.progress-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--gray-400);
    display: none;
}

.progress-step.active .progress-label {
    color: var(--gray-700);
}

.progress-step.completed .progress-label {
    color: var(--success-600);
}

.progress-line {
    width: 40px;
    height: 2px;
    background: var(--gray-200);
    border-radius: 1px;
    transition: var(--transition-base);
}

.progress-line.completed {
    background: var(--success-500);
}

@media (min-width: 768px) {
    .progress-label {
        display: block;
    }

    .progress-line {
        width: 60px;
    }
}

/* =============================================
   Section Card
   ============================================= */
.section-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-6);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow var(--transition-base);
}

.section-card.simple {
    background: none !important;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: var(--space-6);
    overflow: hidden;
    border: none;
    transition: none;
}

.section-card:hover {
    box-shadow: var(--shadow-lg);
}

.section-card.simple:hover {
    box-shadow: unset !important;
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--gray-100);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.section-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.section-icon.blue {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    color: var(--gray-700);
}

.section-icon.cyan {
    background: linear-gradient(135deg, #cffafe, #a5f3fc);
    color: var(--accent-600);
}

.section-icon.green {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: var(--success-600);
}

.section-icon.amber {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: var(--warning-600);
}

.section-icon.purple {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: var(--gray-800);
}

.section-icon.rose {
    background: linear-gradient(135deg, #ffe4e6, #fecdd3);
    color: #e11d48;
}

.section-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--gray-800);
}

.section-desc {
    font-size: var(--font-size-xs);
    color: var(--gray-400);
    margin-top: 2px;
}

.section-body {
    padding: var(--space-6);
}

/* =============================================
   Form Groups
   ============================================= */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    position: relative;
}

.form-group + .form-group {
    margin-top: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.form-label .required {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--white);
    background: var(--danger-500);
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.form-label .optional {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--gray-400);
    background: var(--gray-100);
    padding: 1px 6px;
    border-radius: 3px;
}

/* =============================================
   Input Styles
   ============================================= */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="file"] {
    margin: 0;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    color: var(--gray-800);
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--gray-300);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--gray-500);
    box-shadow: var(--shadow-input-focus);
    background: var(--white);
}

.form-input::placeholder {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

.input-hint {
    font-size: var(--font-size-xs);
    color: var(--gray-400);
    margin-top: var(--space-1);
}

.form-input:disabled {
    cursor: not-allowed;
    background: var(--gray-200);
}

.wpcf7-form label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 0 10px;
}

#profitRequirement {
    pointer-events: none;
}

input[name="profitRequirement[]"] {
    background-color: #ddd;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    vertical-align: middle;
}

input[name="profitRequirement[]"]:checked {
    -webkit-appearance: auto;
    -moz-appearance: auto;
    appearance: auto;
}

/* =============================================
   Inline Fields (年月日 + 金額)
   ============================================= */
.inline-group {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    flex-grow: 0;
    flex-wrap: nowrap;
}

.inline-group .form-input {
    width: auto;
    flex: 1;
    min-width: 60px;
    width: 100%;
}

.inline-group .form-select.year-input {
    max-width: 120px;
}

.inline-group .form-input.month-input,
.inline-group .form-input.day-input {
    max-width: 70px;
}

.inline-group .form-select.amount-input {
    max-width: 180px;
    text-align: right;
}
.inline-group .form-input,
.profit-total .form-input {
    text-align: right;
}
.inline-label {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    white-space: nowrap;
    font-weight: 400;
}

.profit-section select {
    width: auto !important;
    min-width: 0;
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .inline-group .form-select.year-input {
        max-width: 100%;
    }
}

/* =============================================
   Profit Calculation Section
   ============================================= */
.profit-section {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-top: var(--space-4);
    border: 1px solid var(--gray-100);
}

.profit-section-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.profit-section-title .period-badge {
    font-size: var(--font-size-xs);
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
}

.period-badge.current {
    background: var(--gray-100);
    color: var(--gray-700);
}

.period-badge.past {
    background: #fef3c7;
    color: #92400e;
}

.profit-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    flex-wrap: nowrap;
    align-items: baseline;
}

.profit-row:last-child {
    margin-bottom: 0;
}

.profit-row .inline-group:last-of-type {
    flex-grow: 1;
    width: auto;
}

.profit-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    padding-top: var(--space-3);
    border-top: 2px solid var(--gray-200);
    margin-top: var(--space-3);
}

.profit-total .inline-label {
    font-weight: 600;
    color: var(--gray-700);
}

.profit-total .form-input {
    font-weight: 600;
}

/* Calculation Result */
.calc-result {
    background: linear-gradient(135deg, var(--gray-50), #eff6ff);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-top: var(--space-5);
}

.calc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.calc-row:last-child {
    margin-bottom: 0;
}

.calc-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-600);
}

.calc-formula {
    font-size: var(--font-size-xs);
    color: var(--gray-400);
    font-weight: 400;
}

.calc-value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-700);
}

.calc-result-highlight {
    background: var(--gray-700);
    color: var(--white);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-3);
}

.calc-result-highlight .calc-label {
    color: rgba(255, 255, 255, 0.85);
}

.calc-result-highlight .calc-value {
    color: var(--white);
    font-size: var(--font-size-xl);
}

@media (max-width: 640px) {
    .calc-result-highlight {
        flex-direction: column;
        align-items: baseline;
        gap: var(--space-1) 0;
    }
}

/* =============================================
   Checkbox for requirement
   ============================================= */
.requirement-check {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--success-50);
    border: 1.5px solid #bbf7d0;
    border-radius: var(--radius-sm);
    margin-top: var(--space-4);
    cursor: pointer;
    transition: var(--transition-fast);
}

.requirement-check:hover {
    background: #dcfce7;
}

.requirement-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--success-500);
    cursor: pointer;
}

.requirement-check label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
}

/* =============================================
   File Upload
   ============================================= */

.file-upload-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.file-upload-item {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    background: var(--white);
    transition: var(--transition-base);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-3) 0;
}

.file-upload-item:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.file-upload-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-right: 10px;
}

.file-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: var(--font-size-xs);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.file-info {
    flex: 1;
}

.file-info h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.4;
}

.file-info p,
.noticeText,
.noticeText p,
.noticeText span {
    font-size: var(--font-size-xs);
    color: var(--gray-400) !important;
    line-height: 1.5;
    margin-top: var(--space-1);
}

.noticeText li {
    padding: 0;
    margin: 0;
}

.fileTags {
    display: flex;
    gap: 0 10px;
    margin-left: auto;
}

.file-format-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.file-format-badge.word {
    background: #dbeafe;
    color: #1d4ed8;
}

.file-format-badge.pdf {
    background: #fecdd3;
    color: #be123c;
}

.file-format-badge.excel {
    background: #dffecd;
    color: #5cc21f;
}

.file-format-badge.pptx {
    background: #fef5cd;
    color: #beb012;
}

.file-format-badge.img {
    background: #feeacd;
    color: #c26c1f;
}

.file-format-badge.any {
    background: var(--gray-100);
    color: var(--gray-600);
}

.file-drop-zone,
div[data-class="wpcf7cf_group"]:has(.file-drop-zone) {
    position: relative;
    flex-basis: 100%;
}

.file-drop-zone .codedropz-upload-handler {
    position: relative !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-4);
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 0;
}

.file-drop-zone .codedropz-upload-handler:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.file-drop-zone
    .codedropz-upload-wrapper:has(.dnd-upload-status)
    .codedropz-upload-handler {
    margin-bottom: 10px;
}

.file-drop-zone .dnd-upload-status {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-top: var(--space-2);
}

.file-drop-zone .dnd-upload-status .dnd-upload-details {
    width: 100% !important;
}

.dnd-upload-status .dnd-upload-details .name {
    display: block !important;
}

.dnd-upload-status .dnd-upload-details .name span {
    white-space: normal !important;
    word-break: break-all;
    display: inline !important;
}

.file-drop-zone .cd-upload-btn {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
}

.file-drop-zone .codedropz-upload-wrapper {
    width: 100%;
}

.file-drop-zone.dragover {
    border-color: var(--gray-500);
    background: var(--gray-50);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.file-drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-drop-zone:hover .file-drop-icon {
    color: var(--gray-400);
}

.codedropz-upload-inner {
    color: var(--gray-300);
    transition: color var(--transition-fast);
}

.codedropz-upload-inner::before {
    content: "";
    display: block;
    width: 36px;
    height: 36px;
    background-position: 0 0;
    background-color: currentColor;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"/></svg>');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"/></svg>');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    background-repeat: no-repeat;
    margin: 0 auto;
}

.codedropz-upload-inner span {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    text-align: center;
}

.codedropz-upload-inner span:first-of-type {
    color: var(--gray-700);
    font-weight: 600;
}

.file-drop-hint {
    font-size: var(--font-size-xs);
    color: var(--gray-400);
}

.file-drop-zone .codedropz-btn-wrap {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

/* Uploaded file preview */

.uploaded-file-icon {
    width: 20px;
    height: 20px;
    color: var(--gray-500);
    flex-shrink: 0;
}

.uploaded-file-name {
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uploaded-file-remove {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.uploaded-file-remove:hover {
    color: var(--danger-500);
}

.file-drop-zone .dnd-upload-status .dnd-upload-details .dnd-progress-bar {
    border-radius: 10px !important;
    height: 18px !important;
}

.file-drop-zone .dnd-upload-status .dnd-upload-details .dnd-progress-bar span {
    font-size: 11px !important;
    line-height: 18px !important;
    padding: 0 10px;
}

.file-drop-zone .dnd-upload-status .dnd-upload-details .remove-file {
    right: 15px;
}

/* =============================================
   Action Buttons
   ============================================= */
.form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-10);
    padding-top: var(--space-8);
    border-top: 1px solid var(--gray-200);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-8);
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    min-height: 48px;
    letter-spacing: 0.01em;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gray-500), var(--gray-700));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gray-700), var(--gray-700));
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    color: var(--gray-800);
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-card {
    animation: fadeInUp 0.5s ease-out both;
}

.section-card:nth-child(1) {
    animation-delay: 0ms;
}

.section-card:nth-child(2) {
    animation-delay: 80ms;
}

.section-card:nth-child(3) {
    animation-delay: 160ms;
}

.section-card:nth-child(4) {
    animation-delay: 240ms;
}

.section-card:nth-child(5) {
    animation-delay: 320ms;
}

.section-card:nth-child(6) {
    animation-delay: 400ms;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 640px) {
    .form-title {
        font-size: var(--font-size-xl);
    }

    .section-body {
        padding: var(--space-4);
    }

    .section-header {
        padding: var(--space-4);
    }

    .profit-row,
    .inline-group {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0 !important;
        display: flex;
        flex-direction: row;
        align-items: end;
        flex-wrap: nowrap;
    }

    .profit-row .inline-group {
        width: 100% !important;
    }

    .profit-row {
        flex-direction: column;
    }

    .inline-group .inline-label {
        margin-left: auto;
        flex-grow: 0;
    }

    .inline-group .wpcf7-form-control-wrap {
        flex-grow: 1;
    }

    .inline-group .form-input.year-input,
    .inline-group .form-input.month-input,
    .inline-group .form-input.day-input,
    .inline-group .form-input.amount-input {
        max-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .calc-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-drop-zone .dnd-upload-status .dnd-upload-details .name {
        padding: 0 !important;
    }

    .file-drop-zone .dnd-upload-status {
        justify-content: center;
    }

    .file-drop-zone .dnd-upload-status {
        flex-wrap: wrap;
    }

    .file-drop-zone .dnd-upload-status .dnd-upload-details .name {
        display: flex;
        flex-wrap: wrap;
        margin-bottom: var(--space-1);
    }

    .dnd-upload-status .dnd-upload-details .name span {
        display: block;
        width: 100%;
        padding-right: 0 !important;
        word-break: break-all;
    }

    .dnd-upload-status .dnd-upload-details .name em {
        margin-left: 10px;
    }
}

/* =============================================
   Notice / Alert
   ============================================= */
.notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-6);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.notice-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notice.info {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.notice.warning {
    background: var(--warning-50);
    border: 1px solid #fde68a;
    color: #92400e;
}

/* =============================================
   Footer
   ============================================= */
.form-footer {
    text-align: center;
    padding: var(--space-8) 0 var(--space-4);
    font-size: var(--font-size-xs);
    color: var(--gray-400);
}

.form-footer a {
    color: var(--gray-500);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* =============================================
   Conditional sub-sections
   ============================================= */
.sub-options {
    margin-top: var(--space-2);
    padding-left: var(--space-4);
    border-left: 2px solid var(--gray-200);
}

.sub-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.sub-option-row label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

/* Other text field for "その他" */
.other-text-field {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.other-text-field .form-input {
    width: 160px;
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-sm);
}

/* =============================================
   Form Divider (section internal divider)
   ============================================= */
.form-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.form-divider::before,
.form-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.form-divider-text {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Required badge inside file-info h4 */
.file-info h4 .required {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--white);
    background: var(--danger-500);
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.03em;
    vertical-align: middle;
    margin-left: 4px;
}

.file-info h4 .optional {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--gray-400);
    background: var(--gray-100);
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.03em;
    vertical-align: middle;
    margin-left: 4px;
}

/* =============================================
   Scrollbar
   ============================================= */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.otherArea {
    margin-top: var(--space-2);
}

.month-year-only .ui-datepicker-calendar {
    display: none;
}

.month-year-only .ui-datepicker-current {
    display: none;
}

.wpcf7-form-control-wrap .wpcf7-not-valid-tip {
    display: none;
    margin-top: 10px;
}

.wpcf7-form-control-wrap.is-show .wpcf7-not-valid-tip {
    display: block;
}

.inline-group .wpcf7-form-control-wrap {
    flex: 1;
    min-width: 60px;
    width: 100%;
}


span[data-name="file6SelectRadio"]{
    display: block;
    margin-top: var(--space-2);
    margin-bottom: var(--space-4);
}

.actText{
    color: var(--danger-600);
}