/* v0.4.02 scroll-safe options dialog; it is mounted under document.body. */
.re402-options {width:min(480px,calc(100vw - 24px));max-width:min(480px,calc(100vw - 24px));max-height:min(86dvh,860px);overflow-y:auto;box-sizing:border-box;overscroll-behavior:contain;padding:20px!important;}
.re402-options form {display:grid;gap:4px;}
.re402-options .re376-dialog-actions {position:sticky;bottom:-20px;background:#142a38;padding:14px 0 6px;margin-top:8px;z-index:2;}
.re402-options .re376-dialog-actions button[type=submit] {background:#087eac!important;border-color:#17a6d5!important;}
/* Cloud v0.4.02 — content density and validated options. Layout coordinates unchanged. */
.re402-options .re402-content-settings {margin:12px 0;padding:13px 14px;border:1px solid rgba(88,176,215,.45);border-radius:9px;display:grid;gap:10px;min-width:0}
.re402-options .re402-content-settings legend {font-weight:600;font-size:14px;padding:0 6px;color:#d9f5ff}
.re402-options .re402-content-settings label {display:flex;flex-direction:column;gap:5px;min-width:0}
.re402-options .re402-content-settings select {width:100%;min-height:36px;max-width:100%;box-sizing:border-box;background:#153346;color:#f0fbff;border:1px solid #497b95;border-radius:6px;padding:6px 9px}
.re402-options .re402-content-note {margin:0;color:#b9d0de;font-size:12px;line-height:1.45}
/* No absolute dimensions: preserve the current six-column grid and allow charts to measure their actual available size. */
#appShell .re376-module[data-re402-density="compact"] {--re402-content-gap:6px;--re402-content-padding:8px}
#appShell .re376-module[data-re402-density="comfortable"] {--re402-content-gap:12px;--re402-content-padding:14px}
#appShell .re376-module[data-re402-density="spacious"] {--re402-content-gap:18px;--re402-content-padding:20px}
#appShell .re376-module[data-re402-density] .re56-graph {min-width:0;max-width:100%;}
#appShell .re376-module.re385-activity-card[data-re402-density="compact"] {gap:6px!important}
#appShell .re376-module.re385-activity-card[data-re402-density="spacious"] {gap:18px!important}
#appShell .re376-module.re385-activity-card[data-re402-density="compact"] header {margin-bottom:4px!important}
#appShell .re376-module.re385-activity-card[data-re402-density="spacious"] header {margin-bottom:16px!important}
@media(max-width:640px){.re402-options .re402-content-settings{padding:10px}}
/* Conservative native spacing adapters for existing card markup; these affect
   immediate presentation children only, never chart geometry or form internals. */
#appShell .re376-module[data-re402-density="compact"] > :is(header,.card-header,.premium-card-heading,.section-head):not(:last-child) {margin-bottom:6px!important}
#appShell .re376-module[data-re402-density="spacious"] > :is(header,.card-header,.premium-card-heading,.section-head):not(:last-child) {margin-bottom:18px!important}
#appShell .re376-module[data-re402-density="compact"] > :is(p,ul,ol,.re56-card-desc,.re56-disclaimer) {margin-block:5px!important}
#appShell .re376-module[data-re402-density="spacious"] > :is(p,ul,ol,.re56-card-desc,.re56-disclaimer) {margin-block:13px!important}
#appShell .re376-module[data-re402-density="compact"] > :is(.re56-donut-row,.re56-timeline-preview,.re56-table-wrap) {margin-block:5px!important}
#appShell .re376-module[data-re402-density="spacious"] > :is(.re56-donut-row,.re56-timeline-preview,.re56-table-wrap) {margin-block:14px!important}
