.pet-main h1 { margin: 0; font-size: 30px; }
.pet-main h2 { margin: 0 0 16px; font-size: 21px; }
.pet-title, .pet-actions, .pet-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pet-title { justify-content: space-between; }
.pet-main button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.pet-main button:hover:not(:disabled) { background: var(--active); }
.pet-main .primary-button { color: #fff; background: var(--primary); border-color: var(--primary); }
.pet-main .primary-button:hover:not(:disabled) { background: var(--primary-hover); }
.pet-main :is(input,select,button):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.pet-main button:disabled { opacity: .55; cursor: default; }
.pet-main button.pet-danger { color: var(--danger); border-color: var(--danger); }
.pet-main fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.pet-main legend { font-size: 21px; font-weight: 700; margin-bottom: 16px; padding: 0; }
.pet-muted { color: var(--secondary); font-size: 14px; line-height: 1.65; }
.pet-status, .pet-conflict { padding: 12px 16px; background: var(--answer); border-radius: 6px; font-size: 14px; overflow-wrap: anywhere; }
.pet-status[data-error="true"], .pet-conflict { color: var(--warning); background: #fcf3df; }
.pet-conflict p { margin: 0 0 12px; }
.pet-toolbar { margin: 20px 0 26px; align-items: flex-end; }
.pet-toolbar .calc-field { min-width: 220px; flex: 1; margin: 0; }
.pet-editor { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(240px,1fr); gap: 28px; align-items: start; }
.pet-info { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.pet-info .calc-field:first-child { grid-column: 1/-1; }
.pet-budget-fields { margin-top: 20px; }
.pet-budget-fields .calc-field:first-child { grid-column: auto; }
.pet-table-wrap { width: 100%; }
.pet-points-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.pet-points-table th, .pet-points-table td { border-bottom: 1px solid var(--border); padding: 10px 6px; text-align: right; }
.pet-points-table th:first-child { text-align: left; }
.pet-points-table thead th { font-size: 14px; color: var(--secondary); font-weight: 500; }
.pet-points-table input { width: 100%; min-width: 0; text-align: right; }
.pet-points-table tbody th { font-size: 16px; width: 50px; }
.pet-points-table td:last-child { min-width: 56px; }
.pet-preview { border-top: 2px solid var(--primary); padding-top: 16px; }
.pet-preview dl { margin: 0 0 20px; font-variant-numeric: tabular-nums; }
.pet-preview dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pet-preview dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; text-align: right; }
.pet-speed-result { padding: 14px 16px; background: var(--answer); border-radius: 6px; }
.pet-speed-result p { margin: 0 0 6px; }
.pet-speed-result strong { font-variant-numeric: tabular-nums; font-size: 24px; }
.pet-error { color: var(--danger); font-size: 14px; }
.pet-history, .pet-comparison, .pet-scope { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 28px; }
.pet-history .calc-field { max-width: 480px; }
.pet-comparison-selects { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 16px; align-items: end; }
.pet-comparison-selects .calc-field { margin: 0; }
#pet-comparison-result { margin-top: 20px; }
.pet-comparison table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pet-comparison th, .pet-comparison td { padding: 10px 6px; border-bottom: 1px solid var(--border); text-align: right; overflow-wrap: anywhere; }
.pet-comparison tr > :first-child { text-align: left; }
.pet-comparison thead th { width: 25%; }
.pet-scope summary { cursor: pointer; min-height: 44px; color: var(--primary); }
.pet-main [hidden] { display: none !important; }
@media (max-width: 1100px) { .pet-editor { grid-template-columns: 1fr; } .pet-preview { margin-top: 8px; } }
@media (max-width: 767px) { .pet-main h1 { font-size: 26px; } .pet-info { gap: 0 12px; } .pet-comparison-selects { grid-template-columns: 1fr 1fr; } .pet-comparison-selects button { grid-column: 1/-1; justify-self: start; } .pet-table-wrap th, .pet-table-wrap td { padding: 8px 3px; } .pet-points-table td:last-child { min-width: 44px; } .pet-points-table tbody th { width: 40px; } .pet-actions button { flex-grow: 1; } }
.pet-points-table input { min-height: 44px; padding: 8px 10px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.pet-points-table input[aria-invalid="true"] { border-color: var(--danger); }
