.ahc-calculator {
    --ahc-border: #e1e1e1;
    --ahc-muted: #666;
    --ahc-soft: #f7f7f7;
    --ahc-accent: #b84568;
    --ahc-accent-dark: #933650;
    max-width: 760px;
    margin: 32px 0;
    padding: 28px;
    border: 1px solid var(--ahc-border);
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}

.ahc-calculator *,
.ahc-calculator *::before,
.ahc-calculator *::after {
    box-sizing: border-box;
}

.ahc-calculator h2,
.ahc-calculator h3,
.ahc-calculator p {
    margin-top: 0;
}

.ahc-intro h2 {
    margin-bottom: 8px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
}

.ahc-intro p {
    margin-bottom: 24px;
}

.ahc-unit-switcher {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.ahc-unit-switcher legend {
    margin-bottom: 8px;
    font-weight: 700;
}

.ahc-unit-options {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    background: var(--ahc-soft);
}

.ahc-unit-options label {
    margin: 0;
    cursor: pointer;
}

.ahc-unit-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ahc-unit-options span {
    display: block;
    min-width: 76px;
    padding: 9px 14px;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
}

.ahc-unit-options input:checked + span {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.ahc-unit-options input:focus-visible + span {
    outline: 2px solid var(--ahc-accent);
    outline-offset: 2px;
}

.ahc-section {
    margin-bottom: 24px;
}

.ahc-section h3 {
    margin-bottom: 12px;
    font-size: 1.08rem;
}

.ahc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ahc-field {
    display: block;
    margin: 0;
    font-weight: 700;
}

.ahc-field small {
    font-weight: 400;
    color: var(--ahc-muted);
}

.ahc-input-wrap {
    display: flex;
    align-items: stretch;
    margin-top: 7px;
    border: 1px solid #bbb;
    border-radius: 7px;
    overflow: hidden;
    background: #fff;
}

.ahc-input-wrap:focus-within {
    border-color: var(--ahc-accent);
    box-shadow: 0 0 0 2px rgba(184, 69, 104, 0.12);
}

.ahc-input-wrap input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    font: inherit;
    background: transparent;
}

.ahc-unit-label {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-left: 1px solid #ddd;
    background: var(--ahc-soft);
    color: var(--ahc-muted);
    font-weight: 600;
}

.ahc-input-wrap-plain {
    max-width: 220px;
}

.ahc-section-compact {
    margin-bottom: 20px;
}

.ahc-submit {
    min-height: 48px;
    padding: 11px 22px;
    border: 0;
    border-radius: 7px;
    background: var(--ahc-accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ahc-submit:hover {
    background: var(--ahc-accent-dark);
}

.ahc-submit:focus-visible {
    outline: 2px solid var(--ahc-accent-dark);
    outline-offset: 3px;
}

.ahc-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ahc-error {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-left: 4px solid #a11;
    background: #fff5f5;
}

.ahc-result {
    margin-top: 24px;
    padding: 22px;
    border-radius: 9px;
    background: var(--ahc-soft);
}

.ahc-result-label {
    margin-bottom: 2px !important;
    color: var(--ahc-muted);
    font-size: 0.95rem;
}

.ahc-result-total {
    margin-bottom: 4px !important;
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    line-height: 1.15;
}

.ahc-result-breakdown {
    margin-bottom: 14px !important;
    font-weight: 700;
}

.ahc-pack-result {
    margin-bottom: 12px !important;
}

.ahc-result-note {
    margin-bottom: 0 !important;
    color: var(--ahc-muted);
    font-size: 0.92rem;
}

@media (max-width: 560px) {
    .ahc-calculator {
        padding: 20px;
    }

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

    .ahc-submit {
        width: 100%;
    }
}
