.bonus-brand img { display: block; }
.bonus-period {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: #475569;
}

.bonus-period strong { color: #1d4ed8; }
.bonus-layout { display: grid; gap: 18px; }
.bonus-layout fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.bonus-layout legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.bonus-layout label { font-size: .875rem; font-weight: 600; }
.bonus-section-meta { margin-left: 6px; color: #475569; font-size: .8rem; font-weight: 500; }
.bonus-layout [hidden] { display: none; }
.bonus-layout input[type="number"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    color: inherit;
}
.bonus-layout :is(input, summary):focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.bonus-hint { margin: 4px 0 8px; color: #475569; font-size: .875rem; }
.bonus-pay-panel { padding: 12px; background: #eff6ff; border: 1px solid #dbeafe; border-radius: 12px; }
.bonus-pay-panel .bonus-hint { margin: 0 0 10px; }
.bonus-pay-fields { display: grid; gap: 8px; }
.bonus-pay-fields label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 8px;
}
.bonus-pay-fields input { background: white; text-align: right; }
.bonus-pay-total {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #bfdbfe;
    font-size: .875rem;
    font-weight: 700;
}
.bonus-pay-total output { color: #1d4ed8; font-variant-numeric: tabular-nums; }
.bonus-parts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bonus-layout .bonus-rate { margin-top: 18px; }
.bonus-wiki-line { margin: 12px 0 0; }
.bonus-wiki { font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }

.bonus-reference {
    align-self: start;
    min-width: 0;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.bonus-reference summary { cursor: pointer; font-weight: 700; }
.bonus-table-scroll { overflow-x: auto; }
.bonus-reference table {
    width: 100%;
    min-width: 245px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
}
.bonus-reference caption { text-align: left; color: #475569; }
.bonus-reference :is(th, td) { padding: 5px 2px; border-bottom: 1px solid #e2e8f0; text-align: center; }
.bonus-reference th:first-child { width: 33%; text-align: left; }
.bonus-reference thead th:nth-child(2) { width: 10%; }
.bonus-reference thead th:nth-child(3) { width: 17%; white-space: nowrap; }
.bonus-reference tbody th { white-space: nowrap; }

.bonus-error { margin: 8px 0 0; color: #991b1b; }
.bonus-result { margin-top: 12px; padding: 12px 16px; background: #eff6ff; border-radius: 12px; }
.bonus-result p { margin: 0; }
.bonus-result output { color: #1d4ed8; font-size: 1.5rem; font-weight: 700; }
.bonus-note { margin: 20px 0 0; color: #475569; font-size: .875rem; }
.bonus-ad { margin-top: 16px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.bonus-ad-label { margin-bottom: 6px; color: #64748b; font-size: .75rem; text-align: right; }
.bonus-ad:has(ins[data-ad-status="unfilled"]) { display: none; }

@media (min-width: 700px) {
    .bonus-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .bonus-inputs { grid-area: 1 / 1; }
    .bonus-reference { grid-area: 1 / 2 / span 2; }
    .bonus-actions { grid-area: 2 / 1; }
}
