: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', 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: 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-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;
}

/* Text Areas */
.text-area {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
}

.text-area:focus {
    border-color: var(--brand-green);
    background: #fff;
}

.text-area[readonly] {
    background: #f1f5f9;
    cursor: default;
}

.char-count {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-top: 8px;
    text-align: right;
}

/* Settings */
.settings-grid {
    background: #fbfbfb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

/* Custom Checkbox & Radio */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-green);
    cursor: pointer;
}

.checkbox-label span,
.radio-label span {
    color: var(--text-main);
    font-weight: 500;
}

/* Buttons */
.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;
}

.calculate-btn:hover {
    background: var(--brand-orange);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 152, 0, 0.2);
}

.calculate-btn:active {
    transform: translateY(0);
}

.result-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.result-actions .char-count {
    margin-top: 0;
}

.secondary-btn {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: var(--brand-green);
    color: var(--brand-green);
    background: var(--accent-color);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

.disclaimer {
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    padding-top: 10px;
    font-size: 0.8rem;
    color: var(--text-sub);
}

@media (max-width: 600px) {
    .usage-steps {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .logo-area .brand-logo {
        font-size: 1rem;
    }
}