:root {
    --brand-green: #01894d;
    --brand-orange: #f39800;
    --bg-color: #f8fafb;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-sub: #666666;
    --border-color: #e5e7eb;
    --accent-color: #f0fdf4;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Header */
.main-header {
    background-color: var(--brand-green);
    border-bottom: 2px solid var(--brand-orange);
    padding: 12px 0;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    width: 28px;
    height: 28px;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-home {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-home:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Info Section (Accordion) */
.info-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
    text-align: left;
}

.info-header {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #fcfcfc;
    border: none;
    outline: none;
}

.info-header h2 {
    font-size: 1.1rem;
    color: var(--brand-green);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.info-section.collapsed .toggle-icon {
    transform: rotate(-180deg);
}

.info-content {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: block;
}

.info-section.collapsed .info-content {
    display: none;
}

.usage-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 15px 0;
}

.usage-step {
    padding-left: 35px;
    position: relative;
    font-size: 0.9rem;
}

.usage-step::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--brand-green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-top: 10px;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    text-align: left;
}

.form-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-number {
    background: var(--brand-orange);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    color: var(--text-sub);
    transition: all 0.2s;
    background: #fafafa;
    position: relative;
}

.drop-zone.drag-over {
    border-color: var(--brand-green);
    background: var(--accent-color);
    color: var(--brand-green);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--brand-green);
}

.file-label {
    display: inline-block;
    margin-top: 10px;
    background: var(--brand-green);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.file-label:hover {
    background: var(--brand-orange);
}

/* File List */
.file-list {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    gap: 12px;
}

.file-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: var(--brand-green);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.file-info {
    flex-grow: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-sub);
}

.file-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f5f9;
}

.status-done {
    color: #059669;
    background: #ecfdf5;
}

.status-error {
    color: #dc2626;
    background: #fef2f2;
}

.remove-file {
    background: none;
    border: none;
    color: var(--text-sub);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.remove-file:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Settings Grid */
.settings-grid {
    margin-bottom: 24px;
    background: #fbfbfb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-green);
}

/* Actions */
.action-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calculate-btn {
    width: 100%;
    background: var(--brand-green);
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.calculate-btn:hover {
    background: var(--brand-orange);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 152, 0, 0.2);
}

.secondary-btn {
    background: transparent;
    color: var(--text-sub);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.secondary-btn:hover {
    color: #dc2626;
    border-color: #dc2626;
    background: #fef2f2;
}

/* Processing Overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-color);
    border-top-color: var(--brand-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--brand-green);
    transition: width 0.3s;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .container {
        padding: 0 15px;
    }
}