/* Compact modal = size, not side alignment. Explicit anchors and reader panels retain their own geometry. */
#modal.compact-modal:not(.fox-unified,.fox-form-modal,.reference-rate-modal,.reference-report-modal,.reference-work-menu-modal,.sa-form-dialog,.fox-anchored,.fox-dialog-profile-menu,.review-account-menu,.review-notice-menu,.community-messages,.community-notifications):not(:has(.reader-settings-compact,.messages,.notice-layout))[open]{position:fixed!important;inset:0!important;margin:auto!important;transform:none!important;width:min(350px,calc(100vw - 28px))!important;max-width:calc(100vw - 28px)!important;height:fit-content;max-height:calc(100dvh - 28px)!important;border-radius:11px;overflow:hidden;display:flex;flex-direction:column}
#modal.compact-modal:not(.fox-unified,.fox-form-modal,.reference-rate-modal,.reference-report-modal,.reference-work-menu-modal,.sa-form-dialog,.fox-anchored,.fox-dialog-profile-menu,.review-account-menu,.review-notice-menu):not(:has(.reader-settings-compact,.messages,.notice-layout)) .dialog-head{min-height:39px;padding:7px 12px;flex:none}
#modal.compact-modal:not(.fox-unified,.fox-form-modal,.reference-rate-modal,.reference-report-modal,.reference-work-menu-modal,.sa-form-dialog,.fox-anchored,.fox-dialog-profile-menu,.review-account-menu,.review-notice-menu):not(:has(.reader-settings-compact,.messages,.notice-layout)) .dialog-head h3{font-size:14px;margin:0}
#modal.compact-modal:not(.fox-anchored,.fox-dialog-profile-menu,.review-account-menu,.review-notice-menu):not(:has(.reader-settings-compact,.messages,.notice-layout)) .dialog-body{min-height:0;overflow:auto;padding:11px 12px}
#modal.fx-center-dialog[open]{width:min(390px,calc(100vw - 28px))!important}
#modal.fx-center-dialog .fx-modal{gap:10px}
#modal.fx-center-dialog .fx-modal>button{min-height:34px;border-radius:7px;font-size:12px}
.fox-release-guide{position:fixed;inset:auto;margin:0;padding:10px 12px;width:min(220px,calc(100vw - 16px));max-height:calc(100dvh - 20px);overflow:auto;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:9px;box-shadow:0 8px 24px #0004;font-size:12px}
.fox-release-guide>b{display:block;padding-bottom:6px;margin-bottom:5px;border-bottom:1px solid var(--border)}
.fox-guide-row{display:flex;align-items:flex-start;gap:8px;padding:5px 0}.fox-guide-row i{width:7px;height:7px;border-radius:50%;margin-top:5px;flex:none}.fox-guide-row strong,.fox-guide-row small{display:block}.fox-guide-row small{color:var(--muted);font-size:11px;margin-top:2px}
@media(min-width:901px){body:has(.settings-layout.sv4-layout) #app{padding:0 clamp(28px,3vw,50px) 12px!important}body:has(.settings-layout.sv4-layout) .settings-layout.sv4-layout:has(.sv4-content){grid-template-columns:clamp(250px,19vw,285px) minmax(0,1fr);gap:24px}body:has(.settings-layout.sv4-layout) .settings-layout.sv4-layout .sv4-nav{padding:14px 12px;gap:6px}body:has(.settings-layout.sv4-layout) .sv4-nav>button[data-action^="setting:"]{min-height:42px;padding:6px 8px;flex-shrink:0}body:has(.settings-layout.sv4-layout) .sv4-nav .sa-nav-status{display:none!important}}
@media(min-width:901px) and (max-height:740px){body:has(.settings-layout.sv4-layout) .settings-layout.sv4-layout .sv4-nav{gap:5px;padding:10px}body:has(.settings-layout.sv4-layout) .sv4-nav>button[data-action^="setting:"]{min-height:36px;padding:3px 7px}}
.fx-compare-matrix{min-width:740px;table-layout:fixed}.fx-compare-matrix th,.fx-compare-matrix td{padding:7px 8px;border-bottom:1px solid var(--border);font-size:11px;text-align:center;white-space:normal!important}.fx-compare-matrix th:first-child{width:26%;text-align:start;font-weight:500}.fx-compare-matrix thead th{font-weight:700;vertical-align:top}.fx-compare-matrix th small{display:block;font-size:10px;margin-top:4px}.fx-current-col{background:var(--accent-soft)}.fx-extra{color:#4cc9a1}.fx-listed{color:var(--accent)}.fx-compare-matrix .ic{height:15px;width:15px}.fx-compare-note{font-size:11px;color:var(--muted);padding:9px}
.fx-filters{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:7px;padding:9px;border:1px solid var(--border);background:var(--surface);border-radius:9px}.fx-filters>.fx-segments:last-child{grid-column:1/-1}.fx-filters select{max-width:135px}.fx-filters .fx-segments button{min-height:30px}
.fx-art .fx-effect{position:relative}.fx-art.avatar .fx-effect:after,.fx-profile-preview.avatar:after{content:"";position:absolute;inset:-6px;border:1px dashed currentColor;border-radius:50%;opacity:.5}.fx-art.banner .fx-effect:after{content:"";position:absolute;inset:-3px;border-radius:7px;border:2px solid currentColor;opacity:.5}.fx-art.streak .fx-effect .ic{transform-origin:center bottom}
@media(hover:hover) and (pointer:fine){.fx-item:hover .fx-art.avatar .fx-effect:after{animation:fox-orbit 2s linear infinite}.fx-item:hover .fx-art.banner .fx-effect:after{animation:fox-glow 1.2s ease-in-out infinite alternate}.fx-item:hover .fx-art.streak .fx-effect .ic{animation:fox-flame .65s ease-in-out infinite alternate}}
.fx-profile-preview.avatar:after{width:58px;height:58px;inset:auto;top:72px;inset-inline-start:10px;color:var(--tier);animation:fox-orbit 3s linear infinite}.fx-profile-preview.banner .fx-preview-banner{animation:fox-glow 1.5s ease-in-out infinite alternate}.fx-profile-preview.streak>div:after{display:inline-block;animation:fox-flame 1s ease-in-out infinite alternate}.fx-redemption-cost{border-top:1px solid var(--border);padding-top:8px}
@keyframes fox-orbit{to{rotate:360deg}}@keyframes fox-glow{to{filter:brightness(1.3);box-shadow:0 0 18px currentColor}}@keyframes fox-flame{to{transform:scale(1.12,.92) rotate(6deg);filter:brightness(1.35)}}
@media(max-width:700px){.fx-filters{grid-template-columns:1fr;padding:6px}.fx-filters>.fx-segments:last-child{grid-column:auto}.fx-filters .fx-segments button{font-size:11px}.fx-filters select{max-width:110px}}
@media(prefers-reduced-motion:reduce){.fx-art *, .fx-art *::after,.fx-profile-preview *, .fx-profile-preview::after,.fx-profile-preview *::after{animation:none!important;transition:none!important}}
html[data-reduce-motion=true] :is(.fx-art,.fx-profile-preview) *,html[data-reduce-motion=true] :is(.fx-art,.fx-profile-preview) *::after,html[data-reduce-motion=true] .fx-profile-preview::after{animation:none!important;transition:none!important}

/* Restore approved custom sizing; correct only coordinates. */
#modal:is(.fox-form-modal,.reference-rate-modal,.reference-report-modal,.sa-form-dialog)[open]:not(.fox-anchored){position:fixed!important;inset:0!important;margin:auto!important;transform:none!important}
#modal#modal.fox-unified.fox-library-menu[open]{width:min(270px,calc(100vw - 24px))!important}
@media(max-width:700px){#modal#modal.fox-unified.fox-library-menu[open]{width:min(240px,calc(100vw - 24px))!important}}
