.phbt-calculator {
    --phbt-border: #dedede;
    --phbt-soft: #f7f7f7;
    --phbt-text: #202020;
    --phbt-muted: #656565;
    --phbt-accent: #9a3425;
    --phbt-accent-hover: #7f291d;
    color: var(--phbt-text);
    border: 1px solid var(--phbt-border);
    border-radius: 14px;
    padding: clamp(18px, 3vw, 32px);
    margin: 28px 0;
    background: #fff;
}

.phbt-calculator * { box-sizing: border-box; }
.phbt-calculator h2,
.phbt-calculator h3 { margin-top: 0; }
.phbt-calculator__header p,
.phbt-products__head p { color: var(--phbt-muted); }
.phbt-calculator__grid { display: grid; gap: 14px; }
.phbt-calculator__grid--people { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.phbt-field { display: grid; gap: 7px; font-weight: 600; }
.phbt-field input,
.phbt-field select,
.phbt-product-search input {
    width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #bdbdbd; border-radius: 8px;
    background: #fff; color: inherit; font: inherit;
}
.phbt-field input:focus,
.phbt-field select:focus,
.phbt-product-search input:focus { outline: 2px solid var(--phbt-accent); outline-offset: 1px; }
.phbt-margin { display: flex; align-items: center; gap: 10px; margin: 18px 0 24px; font-weight: 600; }
.phbt-margin input[type="checkbox"] { width: 20px; height: 20px; }
.phbt-products { border-top: 1px solid var(--phbt-border); padding-top: 22px; }
.phbt-products__head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.phbt-products__head h3 { margin-bottom: 5px; }
.phbt-products__head p { margin: 0; }
.phbt-products__count { white-space: nowrap; font-size: .9em; color: var(--phbt-muted); padding-top: 4px; }
.phbt-products__count.is-limit { color: var(--phbt-accent); font-weight: 700; }
.phbt-products__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }
.phbt-product-search { flex: 1 1 260px; }
.phbt-link-button { border: 0; background: transparent; color: var(--phbt-accent); text-decoration: underline; padding: 8px 4px; cursor: pointer; font: inherit; }
.phbt-product-group { border: 1px solid var(--phbt-border); border-radius: 9px; margin-bottom: 9px; overflow: clip; }
.phbt-product-group summary { cursor: pointer; padding: 12px 14px; font-weight: 700; background: var(--phbt-soft); }
.phbt-product-group summary span { color: var(--phbt-muted); font-weight: 400; margin-left: 6px; }
.phbt-product-group__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 7px; }
.phbt-product-choice { display: flex; gap: 9px; align-items: center; min-height: 44px; padding: 8px 9px; border-radius: 7px; cursor: pointer; }
.phbt-product-choice:hover { background: var(--phbt-soft); }
.phbt-product-choice input { width: 18px; height: 18px; flex: 0 0 auto; }
.phbt-product-choice:has(input:checked) { background: #f2ede9; font-weight: 600; }
.phbt-form-message { min-height: 24px; margin-top: 10px; color: #9b1c1c; font-weight: 600; }
.phbt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.phbt-submit,
.phbt-reset { min-height: 46px; border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.phbt-submit { border: 1px solid var(--phbt-accent); background: var(--phbt-accent); color: #fff; }
.phbt-submit:hover { background: var(--phbt-accent-hover); }
.phbt-submit:disabled { opacity: .65; cursor: wait; }
.phbt-reset { border: 1px solid #aaa; background: #fff; color: inherit; }
.phbt-calculator__result { border-top: 1px solid var(--phbt-border); margin-top: 26px; padding-top: 26px; }
.phbt-result__hero { display: grid; gap: 3px; padding: 18px; background: var(--phbt-soft); border-radius: 10px; }
.phbt-result__hero > span { color: var(--phbt-muted); }
.phbt-result__hero > strong { font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.phbt-result__hero > small { color: var(--phbt-muted); margin-top: 4px; }
.phbt-result__summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
.phbt-result__summary > div { border: 1px solid var(--phbt-border); border-radius: 9px; padding: 12px; display: grid; gap: 3px; }
.phbt-result__summary span,
.phbt-result__summary small { color: var(--phbt-muted); }
.phbt-result__table-wrap { overflow-x: auto; border: 1px solid var(--phbt-border); border-radius: 9px; }
.phbt-result__table { width: 100%; border-collapse: collapse; min-width: 650px; }
.phbt-result__table th,
.phbt-result__table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--phbt-border); vertical-align: top; }
.phbt-result__table th { background: var(--phbt-soft); }
.phbt-result__table tbody tr:last-child td { border-bottom: 0; }
.phbt-result__table td strong,
.phbt-result__table td small { display: block; }
.phbt-result__table td small { color: var(--phbt-muted); margin-top: 2px; }
.phbt-result__note { color: var(--phbt-muted); font-size: .92em; margin-bottom: 0; }
.phbt-result__actions { display:flex; flex-wrap:wrap; gap:9px; align-items:center; margin-top:18px; }
.phbt-result__actions button { border:1px solid var(--phbt-accent); border-radius:7px; padding:8px 12px; background:#fff; color:var(--phbt-accent); font:inherit; font-weight:700; cursor:pointer; }
.phbt-result__actions button:hover { background:var(--phbt-soft); }
.phbt-result__action-status { color:var(--phbt-muted); font-size:.9em; }
.phbt-result-cta { margin-top:18px; padding:20px; border-radius:10px; background:#f2ede9; border-left:4px solid var(--phbt-accent); }
.phbt-result-cta h3 { margin:0 0 5px; }.phbt-result-cta p { margin:0 0 14px; }
.phbt-result-cta__link { display:inline-flex; padding:10px 16px; border-radius:7px; background:var(--phbt-accent); color:#fff!important; font-weight:700; text-decoration:none!important; }
.phbt-result-cta__link:hover { background:var(--phbt-accent-hover); }

@media print {
    body.phbt-printing * { visibility:hidden!important; }
    body.phbt-printing .phbt-print-target, body.phbt-printing .phbt-print-target * { visibility:visible!important; }
    body.phbt-printing .phbt-print-target { position:absolute; left:0; top:0; width:100%; border:0; margin:0; }
    body.phbt-printing .phbt-calculator__form, body.phbt-printing .phbt-calculator__header, body.phbt-printing .phbt-result__actions, body.phbt-printing .phbt-result-cta { display:none!important; }
}

@media (max-width: 900px) {
    .phbt-calculator__grid--people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .phbt-product-group__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .phbt-calculator { padding: 16px; border-radius: 10px; }
    .phbt-calculator__grid--people,
    .phbt-product-group__list,
    .phbt-result__summary { grid-template-columns: 1fr; }
    .phbt-products__head { display: block; }
    .phbt-products__count { display: block; margin-top: 8px; }
    .phbt-actions > * { flex: 1 1 100%; }
}
