:root {
    --brand-green: #01894d;
    --brand-orange: #f29e1e;
    --text-main: #333333;
    --text-sub: #666666;
    --bg-color: #fcefe7;
    /* Light beige/orange tint found on site or similar */
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: #f8fafb;
    /* Updated background */
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    padding: 0;
    /* Removed padding */
}

/* Container for main content */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.main-header {
    background-color: var(--brand-green);
    border-bottom: 2px solid var(--brand-orange);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    margin-bottom: 0;
    /* Margin handled by container gap or padding */
    padding: 15px 0;
    color: #ffffff;
}

.main-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ... (LogoArea, TitleIcon, BrandLogo, BtnPrint, BtnHome styles remain same) ... */

/* Info Section (Collapsible) */
.info-section {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0;
    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;
    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: none;
    /* Reset potential global border */
}

.toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
    fill: #666;
}

.info-content {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: block;
}

.info-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 16px;
}

/* Collapsed state */
.info-section.collapsed .info-content {
    display: none;
}

.info-section.collapsed .toggle-icon {
    transform: rotate(-180deg);
}

/* Usage Steps */
.usage-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.usage-step {
    background-color: #f8fafb;
    padding: 15px;
    border-radius: 6px;
    position: relative;
    padding-left: 45px;
}

.usage-step::before {
    content: attr(data-step);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: var(--brand-green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Nav wrapper */

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-icon {
    width: 24px;
    height: 24px;
    color: #ffffff;
    margin-right: 0;
}

.brand-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.btn-print {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s;
    margin-right: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-print:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
}

.btn-home {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-home:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
}

/* Nav wrapper */
nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Layout */
.simulator-layout {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Card Style */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.card h2 {
    font-size: 1.25rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-number {
    background-color: var(--brand-green);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
}

/* Input Group */
.input-group {
    margin-bottom: 20px;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--brand-orange);
    background-color: #fff7ed;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--brand-green);
    margin-bottom: 16px;
}

.upload-text {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.upload-subtext {
    font-size: 0.85rem;
    color: var(--text-sub);
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #f0fdf4;
    padding: 12px;
    border-radius: 8px;
    color: var(--brand-green);
    font-weight: 600;
}

.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ef4444;
    display: flex;
    align-items: center;
}

.remove-btn:hover {
    opacity: 0.8;
}

/* Action Button */
.calculate-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: var(--brand-orange);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #c27a00;
    text-align: center;
    text-decoration: none;
    /* In case it's an anchor */
}

.calculate-btn:hover:not(:disabled) {
    background-color: #e68a00;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #c27a00;
}

.calculate-btn:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: none;
}

.calculate-btn:disabled {
    background-color: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Result Area */
.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.preview-box {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 16px;
    color: #f8fafc;
    font-family: monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Direction Selector */
.direction-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    background-color: #f1f5f9;
    padding: 8px;
    border-radius: 8px;
}

.radio-label {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 6px;
    background-color: transparent;
    color: var(--text-sub);
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.radio-label input:checked+.radio-custom {
    background-color: #ffffff;
    color: var(--brand-green);
    border-color: var(--brand-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.arrow {
    margin: 0 8px;
    color: #cbd5e1;
}

.radio-label input:checked+.radio-custom .arrow {
    color: var(--brand-green);
}

/* Responsive */
@media (min-width: 640px) {
    .simulator-layout {
        padding: 0;
    }
}