/* Scoped enhancements reuse the existing theme; no resource-card geometry overrides. */
.rf-actions,.rf-filter-row,.rf-item,.rf-dialog form[method=dialog] { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rf-actions button,.rf-actions>a,.rf-button,.rf-item button,.rf-editor button,.rf-fields button,.rf-filter-row button,.rf-filter-row summary,.rf-dialog button,#rfFavoritesForm button,#rfDownloadDetails button,[data-rf-clear-history] { min-height:44px; min-width:44px; padding:8px 12px; border:1px solid var(--a-line); border-radius:9px; background:var(--a-surface); color:var(--a-ink); cursor:pointer; font:inherit; line-height:1.4; text-decoration:none; box-sizing:border-box; }
.rf-filter-row button[aria-pressed=true],.rf-fields button[type=submit] { background:var(--a-accent); color:var(--a-on-accent); }
.rf-filter-row { margin:12px 0; }
.rf-filter-row[hidden],.rf-toast[hidden],#rfDownloadDetails[hidden] { display:none; }
.rf-more-filters { width:100%; }
.rf-more-filters summary { width:fit-content; }
.rf-more-filters .rf-fields { margin-top:8px; }
.rf-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; min-width:0; }
.rf-fields label { display:flex; flex-direction:column; gap:6px; font-size:14px; line-height:1.5; min-width:0; color:var(--a-text); }
.rf-fields input,.rf-fields select,.rf-fields textarea,#rfFavoritesSearch { box-sizing:border-box; width:100%; min-width:0; min-height:44px; padding:10px; background:var(--a-surface); color:var(--a-ink); border:1px solid var(--a-line); border-radius:8px; font:inherit; }
.rf-fields .rf-check,.rf-check { display:flex; flex-direction:row; align-items:flex-start; gap:8px; line-height:1.6; }
.rf-check input[type=checkbox] { flex:0 0 18px; width:18px; height:18px; min-height:18px; margin:4px 0 0; padding:0; }
.rf-help { color:var(--a-muted); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.rf-list { display:grid; gap:8px; margin-top:12px; }
.rf-item { justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--a-line); min-width:0; }
.rf-item>div:first-child,.rf-item>a:first-child { flex:1 1 160px; min-width:0; overflow-wrap:anywhere; }
.rf-item p { margin:6px 0; font-size:13px; color:var(--a-muted); }
.rf-item small { display:block; font-size:12px; line-height:1.5; color:var(--a-muted); }
.rf-dialog { width:min(620px,calc(100% - 32px)); max-height:80dvh; box-sizing:border-box; border:1px solid var(--a-line); border-radius:14px; padding:20px; background:var(--a-surface); color:var(--a-ink); }
.rf-dialog::backdrop { background:rgb(0 0 0 / 45%); }
.rf-dialog form[method=dialog] { justify-content:space-between; }
.rf-dialog h2 { font-size:20px; margin:0; }
.rf-toast { position:fixed; bottom:calc(100px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 32px); padding:12px 16px; border:1px solid var(--a-line); border-radius:10px; background:var(--a-ink); color:var(--a-surface); z-index:12000; font-size:14px; }
.rf-editor { margin:12px 0; border-top:1px solid var(--a-line); }
.rf-editor>summary { cursor:pointer; padding:14px 0; min-height:44px; box-sizing:border-box; font-weight:600; }
.rf-editor-body { min-width:0; }
.rf-request-review { padding-top:12px; border-top:1px solid var(--a-line); }
.rf-request-review .rf-help { grid-column:1/-1; }
#rfDownloadDetails { margin:24px 0; padding:24px; border:1px solid var(--a-line); border-radius:14px; background:var(--a-surface); color:var(--a-text); }
#rfDownloadDetails h2 { font-size:20px; margin:0 0 16px; }
#rfDownloadDetails h3 { font-size:16px; margin-top:24px; }
.rf-data { margin:0; }
.rf-data>div { display:grid; grid-template-columns:120px minmax(0,1fr); gap:16px; padding:12px 0; border-bottom:1px solid var(--a-line); }
.rf-data dt { color:var(--a-muted); font-size:14px; }
.rf-data dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
.rf-effect-preview { display:block; max-width:100%; max-height:480px; object-fit:contain; margin:0 auto 20px; border-radius:10px; }
.rf-updates { padding-left:20px; }
.rf-updates li { padding:8px 0; }
.rf-updates p { white-space:pre-wrap; overflow-wrap:anywhere; margin:6px 0; }
#rfFavoritesForm { display:flex; gap:8px; margin:16px 0; }
#rfFavoritesSearch { flex:1; min-width:0; width:auto; }
#rfFavoritesForm button { flex:none; min-width:68px; white-space:nowrap; }
:where(.rf-fields,.rf-filter-row,.rf-dialog,.rf-item) :where(button,a,input,select,textarea,summary):focus-visible { outline:2px solid var(--a-ink); outline-offset:3px; }
@media(max-width:560px) {
    .rf-fields { grid-template-columns:minmax(0,1fr); }
    .rf-data>div { grid-template-columns:minmax(0,1fr); gap:6px; }
    #rfDownloadDetails { padding:16px; }
    .rf-item { align-items:flex-start; }
}
