/* Optional local statistics UI: catalogue footer and native dialog only. */
.local-stats-trigger { display: block; margin-top: .6rem; }
#local-stats-dialog { color: #20241f; background: #f8faf6; border: 1px solid #60715d; border-radius: 12px; width: min(940px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: clamp(20px, 4vw, 40px); overflow: auto; }
#local-stats-dialog::backdrop { background: rgb(10 20 12 / 65%); }
#local-stats-dialog h2 { font: 600 clamp(24px, 4vw, 34px)/1.2 Manrope, sans-serif; margin: 0 0 20px; }
#local-stats-dialog p { font: 400 15px/1.65 Manrope, sans-serif; margin: 16px 0; color: #354031; }
#local-stats-dialog .local-stats-state { font-weight: 700; }
.local-stats-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.local-stats-actions button { min-height: 44px; padding: 10px 16px; border: 1px solid #52644c; border-radius: 6px; background: #fff; color: #20241f; font: 600 14px/1.4 Manrope, sans-serif; cursor: pointer; }
.local-stats-actions button:disabled { opacity: .6; cursor: default; }
#local-stats-dialog :focus-visible { outline: 3px solid #416a39; outline-offset: 3px; }
.local-stats-table { overflow-x: auto; margin: 20px 0; }
.local-stats-table table { width: 100%; min-width: 690px; border-collapse: collapse; font: 400 13px/1.5 Manrope, sans-serif; text-align: left; }
.local-stats-table caption { text-align: left; font-weight: 700; margin-bottom: 12px; }
.local-stats-table th, .local-stats-table td { padding: 10px; border-bottom: 1px solid #a1ad9c; }
.local-stats-table th { font-weight: 600; }
@media (forced-colors: active) { #local-stats-dialog, .local-stats-actions button { border: 1px solid CanvasText; } }
