:root {
    --primary-color: #01894d;
    --primary-hover: #00703e;
    --brand-green: #01894d;
    --brand-orange: #f39800;
    --bg-color: #f8fafb;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-sub: #666666;
    --border-color: #e5e7eb;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --font-family: 'Noto Sans JP', 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 40px;
    line-height: 1.6;
}

/* Header Design (Brand Style) */
.main-header {
    background-color: var(--brand-green);
    border-bottom: 2px solid var(--brand-orange);
    padding: 15px 0;
    color: #ffffff;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.main-header-inner {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    width: 24px;
    height: 24px;
    stroke: white;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.main-header-inner nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-home,
.btn-print {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-home:hover,
.btn-print:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Result Card UI */
.card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card h2 {
    font-size: 1.1rem;
    color: var(--brand-green);
    margin-bottom: 15px;
    border-left: 4px solid var(--brand-orange);
    padding-left: 10px;
    display: flex;
    align-items: center;
}

.card h3 {
    font-size: 1.1rem;
    color: var(--brand-green);
    margin-bottom: 15px;
    border-left: 4px solid var(--brand-orange);
    padding-left: 10px;
}

.chart-container {
    position: relative;
    height: 400px;
    /* Taller for better visibility */
    width: 100%;
}

/* Loading & Error */
.section-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background-color: var(--brand-green);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    margin-right: 10px;
}

#loading {
    text-align: center;
    padding: 40px;
    color: var(--text-sub);
    font-weight: 600;
}

#error-message {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-sub);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .main-header-inner {
        padding: 12px;
    }

    .brand-logo {
        font-size: 1rem;
    }

    .btn-home,
    .btn-print {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* Usage Guide Styles (Collapsible) */
.info-section {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.info-header {
    padding: 15px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: #f8fafb;
    border-bottom: 1px solid transparent;
    /* Prepare for border */
    transition: all 0.2s;
}

.info-header:hover {
    background-color: #f1f3f5;
}

.info-header h2 {
    font-size: 1.1rem;
    color: var(--brand-green);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: none;
    /* Reset standard card h2 border */
    padding-left: 0;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
    fill: none;
    stroke: #666;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.info-content {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: block;
}

/* Collapsed State */
.info-section.collapsed .info-content {
    display: none;
}

.info-section.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.info-section.collapsed .info-header {
    border-bottom: none;
}

/* Steps Grid */
.usage-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 0;
    margin: 0 0 20px 0;
}

.usage-step {
    background-color: #f8fafb;
    padding: 15px;
    border-radius: 6px;
    position: relative;
    padding-left: 50px;
    /* Space for number */
    border: 1px solid #e5e7eb;
}

.usage-step::before {
    content: attr(data-step);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background-color: var(--brand-green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.usage-step strong {
    display: block;
    color: var(--brand-green);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.usage-step p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.5;
}

.source-info {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.85em;
    color: #555;
    line-height: 1.6;
}

.source-info ul {
    list-style: none;
    padding-left: 0;
    margin: 5px 0 10px 0;
}

.source-info li {
    margin-bottom: 4px;
}

.source-info a {
    color: var(--brand-green);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.source-info a::before {
    content: "🔗";
    margin-right: 5px;
    font-size: 0.8em;
}

.source-info a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}