: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', 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;
}

.info-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #fcfcfc;
}

.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: 20px;
    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-top: 15px;
}

.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;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.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;
}

.drop-zone.drag-over {
    border-color: var(--brand-green);
    background: var(--accent-color);
    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;
}

.file-list {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    font-weight: normal;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--brand-green);
}

.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: opacity 0.2s;
}

.calculate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results */
.hidden {
    display: none;
}

.result-actions {
    margin-bottom: 20px;
    text-align: right;
}

.download-all-btn {
    background: var(--brand-orange);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.result-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.result-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.result-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
}

.result-item .item-name {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.download-btn {
    display: block;
    background: #f0f0f0;
    color: var(--text-main);
    text-decoration: none;
    padding: 4px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

@media (max-width: 600px) {
    .usage-steps {
        grid-template-columns: 1fr;
    }
}