* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f9fafb;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: #2d6a4f;
    color: white;
    padding: 2rem;
    text-align: center;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 0.95rem;
    opacity: 0.95;
}

.progress-bar {
    background: #e5e7eb;
    height: 6px;
    position: relative;
}

.progress-fill {
    background: #1e5a3f;
    height: 100%;
    transition: width 0.3s ease;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 0;
    min-height: 500px;
}

.content {
    padding: 2rem;
    border-right: 1px solid #e5e7eb;
}

.sidebar {
    background: #f9fafb;
    padding: 2rem 1.5rem;
    position: sticky;
    top: 0;
    height: fit-content;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.step-header {
    margin-bottom: 2rem;
}

.step-number {
    color: #2d6a4f;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 0.95rem;
    color: #6b7280;
}

.running-total {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.running-total h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.total-number {
    font-size: 3rem;
    font-weight: 700;
    color: #2d6a4f;
    margin-bottom: 0.25rem;
}

.total-unit {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

input[type="number"],
select {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.unit {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    min-width: 80px;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-option label {
    display: block;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.radio-option input[type="radio"]:checked + label {
    background: #2d6a4f;
    border-color: #2d6a4f;
    color: white;
}

.radio-option label:hover {
    border-color: #2d6a4f;
}

.subsection {
    border: 2px solid #2d6a4f;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.subsection h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d6a4f;
    margin-bottom: 0.75rem;
}

.subsection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.subsection-grid label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.subsection-grid input {
    width: 100%;
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 0.875rem 2rem;
    border: 2px solid #2d6a4f;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: #2d6a4f;
}

.btn:hover {
    background: #f0f9f4;
}

.btn-primary {
    background: #2d6a4f;
    color: white;
}

.btn-primary:hover {
    background: #255940;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.breakdown {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.breakdown-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.breakdown-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2d6a4f;
}

.comparison {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f9f4;
    border-radius: 12px;
    border-left: 4px solid #2d6a4f;
}

.comparison h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.comparison p {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
}

.tips {
    margin-top: 2rem;
}

.tips h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.tip-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip-icon {
    width: 24px;
    height: 24px;
    background: #2d6a4f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.tip-text {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
}

.overview-total {
    text-align: center;
    padding: 2rem;
    background: #f0f9f4;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.overview-total h2 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.overview-total .total-number {
    font-size: 4rem;
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .container {
        border-radius: 15px;
    }

    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-top: 1px solid #e5e7eb;
        border-right: none;
        position: static;
        padding: 1.5rem 1rem;
    }

    .content {
        border-right: none;
        padding: 1.5rem 1rem;
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.875rem;
    }

    .total-number {
        font-size: 2.5rem;
    }

    .running-total {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .step-title {
        font-size: 1.25rem;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }

    .subsection-grid {
        grid-template-columns: 1fr;
    }

    .subsection {
        padding: 0.875rem;
    }

    .navigation {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        padding: 1rem;
    }

    .overview-total {
        padding: 1.5rem 1rem;
    }

    .overview-total .total-number {
        font-size: 2.5rem;
    }

    .breakdown-item {
        padding: 0.875rem 1rem;
    }

    .comparison {
        padding: 1rem;
    }

    .tip-item {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.25rem;
    }

    .header p {
        font-size: 0.8125rem;
    }

    .total-number {
        font-size: 2rem;
    }

    .overview-total .total-number {
        font-size: 2rem;
    }

    .step-title {
        font-size: 1.125rem;
    }

    .step-number,
    .step-description {
        font-size: 0.8125rem;
    }

    input[type="number"],
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .radio-option label {
        padding: 0.875rem 0.75rem;
        font-size: 0.8125rem;
    }
}
