.svm2-modal.rs-panel { width: min(1120px, calc(100vw - 32px)); max-width: 100%; }
.rs-panel .svm2-body { overflow: auto; max-height: calc(100dvh - 170px); overscroll-behavior: contain; }
.rs-panel .svm2-actions:empty { display: none; }
.rs { color: var(--text-main, #f4f5f7); font-size: 13px; line-height: 1.5; min-width: 0; }
.rs * { box-sizing: border-box; }
.rs-scope { margin: 0 0 6px; }
.rs-caption { color: var(--text-secondary, #a2a8b4); font-size: 12px; margin: 6px 0 12px; overflow-wrap: anywhere; }
.rs-status { margin: 0 0 10px; color: var(--text-secondary, #a2a8b4); overflow-wrap: anywhere; }
.rs-status:empty { display: none; }
.rs-status[data-error="true"] { color: var(--down, #f6465d); }
.rs button, .rs input:not([type="checkbox"]), .rs select {
  border: 1px solid var(--line-strong, var(--line, #454b56)); border-radius: 7px;
  color: inherit; background: var(--bg-core, #101217); min-height: 38px;
  padding: 7px 10px; font: inherit; max-width: 100%;
}
.rs button { cursor: pointer; touch-action: manipulation; }
.rs button:hover:not(:disabled) { background: var(--bg-hover, rgba(128,128,128,.12)); }
.rs button:disabled { opacity: .45; cursor: not-allowed; }
.rs button:focus-visible, .rs input:focus-visible, .rs select:focus-visible, .rs a:focus-visible, .rs-table-wrap:focus-visible, .rs summary:focus-visible {
  outline: 2px solid currentColor; outline-offset: 3px;
}
.rs button.rs-primary { background: var(--text-main, #f4f5f7); color: var(--bg-core, #101217); font-weight: 650; border-color: var(--text-main, #f4f5f7); }
.rs button.rs-primary:hover:not(:disabled) { background: var(--text-main, #f4f5f7); opacity: .88; }
.rs-logic { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 10px; }
.rs-logic > span { margin-left: auto; color: var(--text-secondary, #a2a8b4); font-size: 12px; }
.rs-conditions { display: grid; gap: 8px; }
.rs-condition { display: grid; grid-template-columns: minmax(180px, 1.5fr) 70px minmax(130px, 1fr) auto; gap: 8px; align-items: center; }
.rs-condition > label { min-width: 0; }
.rs-condition select, .rs-value input { width: 100%; }
.rs-value { position: relative; display: flex; align-items: center; }
.rs-value input { padding-right: 44px !important; font-variant-numeric: tabular-nums; }
.rs-value > [data-rs-unit] { position: absolute; right: 10px; pointer-events: none; color: var(--text-secondary, #a2a8b4); }
.rs-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rs-presets { margin: 18px 0; border-top: 1px solid var(--line, #454b56); padding-top: 14px; }
.rs-presets summary { cursor: pointer; font-weight: 600; }
.rs-name, .rs-saved { flex: 1 1 200px; max-width: 360px; min-width: 0; }
.rs-name input, .rs-saved select { width: 100%; }
.rs-empty { text-align: center; padding: 28px 12px; color: var(--text-secondary, #a2a8b4); }
.rs-coverage { margin: 18px 0 4px; font-weight: 600; }
.rs-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line, #454b56); border-radius: 8px; overscroll-behavior-inline: contain; }
.rs-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-table th, .rs-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line, #454b56); }
.rs-table thead th { font-weight: 500; font-size: 12px; color: var(--text-secondary, #a2a8b4); background: var(--bg-hover, rgba(128,128,128,.08)); }
.rs-table th:first-child, .rs-table td:first-child, .rs-table th:nth-child(2) { text-align: left; }
.rs-table tbody tr:last-child > * { border-bottom: 0; }
.rs-table a { color: var(--text-main, #f4f5f7); text-decoration: underline; text-underline-offset: 3px; }
.rs-table input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--text-main, #f4f5f7); vertical-align: middle; cursor: pointer; }
.rs-time { color: var(--text-secondary, #a2a8b4); font-size: 12px; }
.rs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.svac-research-conditions { margin: 0; padding-left: 20px; overflow-wrap: anywhere; }
.svac-research-conditions li + li { margin-top: 5px; }
@media (max-width: 640px) {
  .svm2-modal.rs-panel { width: calc(100vw - 16px); }
  .rs-panel .svm2-body { padding: 16px 12px; max-height: calc(100dvh - 130px); }
  .rs-condition { grid-template-columns: minmax(0, 1fr) 64px; gap: 7px; padding: 10px 0; border-bottom: 1px solid var(--line, #454b56); }
  .rs-value { grid-column: 1; }
  .rs-condition > button { grid-column: 2; padding: 8px 4px; font-size: 12px; }
  .rs-actions > button { min-height: 42px; }
  .rs-logic > span { width: 100%; margin-left: 0; }
  .rs-table th, .rs-table td { padding: 10px; }
}
