.pbg-page [hidden], .pbg-hub [hidden] { display: none !important; }
.pbg-page, .pbg-hub { letter-spacing: 0; }
body.dark-theme .pbg-page { --pbg-red: #ff9790; --pbg-green: #79d3a7; }
.pbg-page button, .pbg-page input, .pbg-page textarea, .pbg-page select { max-width: 100%; }
.pbg-page button { gap: 7px; }
.pbg-page :is(button, a, input, textarea, select):focus-visible { outline: 2px solid var(--pbg-blue); outline-offset: 3px; }
.pbg-page button:disabled { opacity: .55; cursor: wait; }
.pbg-page :is(h1, h2, h3, p), .pbg-form-message { overflow-wrap: anywhere; }
body .pbg-page .is-error { color: var(--pbg-red); }
body .pbg-page [aria-invalid=true] { border-color: var(--pbg-red); }
body .pbg-page .pbg-form-message a { text-decoration: underline; color: var(--pbg-blue); }
body .pbg-tool-top-actions .is-active,
body .pbg-tool-item.is-active,
body .pbg-tool-categorybar button.is-active { color: var(--pbg-blue); background: var(--pbg-soft); border-color: var(--pbg-blue); }
body .pbg-tool-item.is-active i { color: inherit; }
body .pbg-segments input:checked + span { background: var(--pbg-blue); color: #fff; }
body .pbg-tools-page .pbg-tool-shell { border: 0; border-radius: 0; background: transparent; }
.pbg-tool-topbar { padding: 0 0 16px; }
.pbg-tool-categorybar { padding: 12px 0; }
.pbg-tool-top-actions button { min-height: 40px; }
.pbg-tool-item { color: var(--pbg-ink); background: transparent; min-height: 42px; }
.pbg-tool-item span { overflow-wrap: anywhere; }
.pbg-tool-workbench { padding-right: 0; }
.pbg-tool-workbench-head h2 { font-size: 22px; line-height: 1.5; }
.pbg-tool-workbench-head > div { min-width: 0; }
.pbg-tool-favorite { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; }
.pbg-tool-favorite[aria-pressed=true] { color: var(--pbg-blue); border-color: var(--pbg-blue); }
.pbg-tool-pane-head { min-height: 48px; gap: 8px; }
.pbg-tool-pane-head label { margin: 0; }
.pbg-tool-pane .pbg-secondary { width: 38px; height: 38px; font-size: 14px; }
.pbg-tool-options label { flex-wrap: wrap; min-width: 0; }
.pbg-tool-options input[type=file] { width: 100%; font-size: 14px; }
.pbg-tool-options:empty { min-height: 0; padding: 0; }
.pbg-tool-actions [data-tool-status] { flex: 1 1 100%; min-height: 20px; overflow-wrap: anywhere; }
.pbg-tool-actions [data-tool-status]:empty { min-height: 0; }
.pbg-mobile-tool-select { display: none; }
.pbg-tool-pane textarea:disabled { opacity: .65; }
.pbg-tools-page .pbg-page-title h1, .pbg-requests-page .pbg-page-title h1 { font-size: 28px; }
.pbg-requests-page { max-width: 850px; margin-left: auto; margin-right: auto; }
body .pbg-requests-page .pbg-request-form { margin: 0; padding: 0 0 28px; background: transparent; border: 0; border-bottom: 1px solid var(--pbg-line); }
.pbg-request-form h2, .pbg-request-history h2, .pbg-login-gate h2 { font-size: 20px; margin: 0 0 22px; line-height: 1.5; }
.pbg-request-form label { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 14px; margin: 18px 0 7px; }
.pbg-request-form label span { color: var(--pbg-muted); font-size: 12px; font-weight: 400; }
.pbg-request-form input:not([type=hidden]), .pbg-request-form textarea { display: block; font-family: inherit; font-size: 16px; padding: 11px 12px; margin: 0; }
.pbg-request-form input:not([type=hidden]) { min-height: 46px; }
.pbg-request-form textarea { min-height: 190px; resize: vertical; }
.pbg-request-form small[data-count-for] { display: block; text-align: right; margin-top: 5px; font-size: 12px; color: var(--pbg-muted); font-variant-numeric: tabular-nums; }
.pbg-request-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.pbg-request-actions button, .pbg-login-gate a { min-height: 44px; }
.pbg-form-message { margin: 12px 0 0; min-height: 24px; color: var(--pbg-green); line-height: 1.6; }
.pbg-request-history { margin-top: 28px; }
.pbg-request-history .pbg-section-title h2 { margin: 0; }
.pbg-request-record { padding: 20px 0; border-bottom: 1px solid var(--pbg-line); }
.pbg-request-record-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.pbg-request-record h3 { font-size: 16px; margin: 0; line-height: 1.6; }
.pbg-request-badge { flex: 0 0 auto; color: var(--pbg-blue); font-size: 12px; padding-top: 4px; }
.pbg-request-record p { color: var(--pbg-muted); white-space: pre-wrap; line-height: 1.7; margin: 12px 0; }
.pbg-request-record-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--pbg-muted); }
.pbg-request-record-footer button { margin-left: auto; min-height: 40px; }
.pbg-request-empty { padding: 20px 0; color: var(--pbg-muted); }
.pbg-login-gate { padding: 32px 0 48px; text-align: center; border-top: 1px solid var(--pbg-line); }
.pbg-login-gate > i { color: var(--pbg-muted); font-size: 24px; margin-bottom: 18px; }
.pbg-request-history .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--pbg-line); border-radius: 4px; font-size: 13px; }
.pbg-request-history .page-numbers.current { color: var(--pbg-blue); border-color: var(--pbg-blue); }
body .pbg-toast { color: var(--pbg-ink); background: var(--pbg-surface); border-color: var(--pbg-line); box-shadow: 0 4px 18px rgba(0,0,0,.14); }
@media (max-width: 960px) {
    .pbg-tool-layout { grid-template-columns: 200px minmax(0, 1fr); }
    .pbg-tool-workbench { padding-left: 16px; }
    .pbg-tool-editor { grid-template-columns: 1fr; }
    .pbg-tool-pane textarea { min-height: 220px; }
}
@media (max-width: 760px) {
    .pbg-tool-topbar { gap: 12px; }
    .pbg-tool-top-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .pbg-tool-top-actions button { font-size: 13px; padding: 10px 6px; }
    .pbg-tool-categorybar { flex-wrap: nowrap; overflow-x: auto; padding: 12px 0; }
    .pbg-tool-categorybar button { flex: 0 0 auto; min-height: 44px; }
    .pbg-mobile-tool-select { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 0; color: var(--pbg-muted); font-size: 13px; }
    .pbg-mobile-tool-select select { width: 100%; min-height: 46px; padding: 8px 10px; font-size: 16px; border: 1px solid var(--pbg-line); border-radius: 4px; color: var(--pbg-ink); background: var(--pbg-soft); }
    .pbg-tool-nav { display: none; }
    .pbg-tool-layout { display: block; }
    .pbg-tool-workbench { padding: 20px 0 0; }
    .pbg-tool-workbench-head { flex-wrap: wrap; gap: 12px; }
    .pbg-tool-workbench-head h2 { font-size: 20px; }
    .pbg-tool-workbench-head p { line-height: 1.7; }
    .pbg-tool-workbench-head > div { flex: 1 1 100%; }
    .pbg-tools-page :is(input, textarea) { font-size: 16px; }
    .pbg-tools-page button { min-height: 44px; }
    .pbg-tool-pane .pbg-secondary { width: 44px; height: 44px; }
    .pbg-tool-options input[type=number] { min-height: 44px; }
    .pbg-tool-actions { gap: 8px; }
    .pbg-tool-actions > button { flex: 1 1 auto; }
    .pbg-request-record-footer button { min-height: 44px; }
    .pbg-requests-page .pbg-page-title h1, .pbg-tools-page .pbg-page-title h1 { font-size: 25px; }
}
