.rm-page { --rm-line:var(--studio-line,#dce1e8); --rm-muted:var(--studio-muted,#626e7d); color:var(--studio-ink,#171e2e); min-width:0; letter-spacing:0; }
.rc-page .rm-list { max-height:calc(100dvh - 310px); overflow-y:auto; }
.rc-page .rm-access { gap:8px; }
.rc-properties { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:20px 0; }
.rc-properties [hidden] { display:none; }
.rc-properties label { min-width:0; }
.rc-properties input,.rc-properties select { width:100%; min-width:0; font-size:13px; }
.rc-library-tools { display:flex; gap:8px; margin-top:12px; }
.rc-more { position:relative; }
.rc-more summary { cursor:pointer; padding:8px; list-style:none; }
.rc-more>div { position:absolute; z-index:5; right:0; width:160px; padding:8px; border:1px solid var(--studio-line); background:var(--studio-surface); border-radius:6px; }
.rc-more .button { width:100%; justify-content:flex-start; }
.rc-dialog { width:min(680px,calc(100vw - 48px)); max-height:90dvh; overflow-y:auto; }
.rc-dialog .rm-text { min-height:180px; height:220px; }
.rc-dialog .field { margin-top:16px; }
.rc-change-list { max-height:260px; overflow:auto; border-block:1px solid var(--studio-line); }
.rc-change-list>div { display:flex; justify-content:space-between; gap:20px; padding:12px 0; font-size:13px; }
.rc-change-list span { color:var(--studio-muted); }
.rm-page *, .rm-confirm * { box-sizing:border-box; }
.rm-page .page-header h1 { font-size:26px; }
.rm-page .page-header { margin-bottom:24px; }
.rm-access { display:flex; align-items:center; gap:16px; color:var(--rm-muted); font-size:12px; flex-wrap:wrap; }
.rm-workspace { display:grid; grid-template-columns:224px minmax(0,1fr); border-top:1px solid var(--rm-line); min-height:660px; }
.rm-library { padding:18px 16px 24px 0; border-right:1px solid var(--rm-line); min-width:0; }
.rm-search { display:flex; align-items:center; gap:8px; padding:0 10px; border:1px solid var(--rm-line); border-radius:6px; height:38px; }
.rm-page svg,.rm-confirm svg { width:16px; height:16px; flex:none; }
.rm-search input { min-width:0; width:100%; border:0!important; background:transparent!important; padding:0!important; box-shadow:none!important; font-size:13px; }
.rm-list { padding-top:12px; }
.rm-mobile-picker { display:none; }
.rm-category { margin:0 0 16px; padding:0; border:0; border-radius:0; background:transparent; }
.rm-category h3 { margin:12px 10px 6px; font-size:11px; color:var(--rm-muted); font-weight:500; }
.rm-rule { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:36px; padding:8px 10px; background:transparent; color:inherit; border:0; border-radius:4px; text-align:left; font-size:13px; cursor:pointer; }
.rm-rule small { color:var(--rm-muted); font-size:11px; white-space:nowrap; }
.rm-rule:hover { background:var(--studio-soft,#eef1f5); }
.rm-rule.is-active { background:var(--studio-selected,#e9edf2); font-weight:600; box-shadow:inset 2px 0 var(--studio-primary,#43566c); }
.rm-editor { padding:26px 0 0 28px; min-width:0; background:transparent; border:0; border-radius:0; }
.rm-editor-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.rm-eyebrow { font-size:12px; color:var(--rm-muted); }
.rm-editor h2 { font-size:20px; line-height:1.4; margin:8px 0 0; }
.rm-version { border:1px solid var(--rm-line); padding:4px 8px; border-radius:4px; font-size:12px; color:var(--rm-muted); white-space:nowrap; }
.rm-scope { color:var(--studio-muted,#626e7d); font-size:12px; line-height:1.8; margin:14px 0 24px; }
.rm-tabs { display:flex; border-bottom:1px solid var(--rm-line); gap:24px; }
.rm-tabs button { background:transparent; color:var(--rm-muted); border:0; border-bottom:2px solid transparent; border-radius:0; padding:12px 0; font-size:13px; cursor:pointer; }
.rm-tabs button[aria-selected="true"] { color:var(--studio-ink,#171e2e); border-bottom-color:var(--studio-primary,#43566c); font-weight:600; }
.rm-editor-meta { display:flex; justify-content:space-between; gap:12px; color:var(--rm-muted); font-size:12px; margin:18px 0 12px; }
.rm-editor-label { display:block; margin-bottom:8px; font-size:12px; }
.rm-text { width:100%; display:block; min-height:280px; height:calc(100dvh - 650px); max-height:520px; padding:18px; resize:vertical; border:1px solid var(--rm-line); border-radius:6px; font:13px/1.95 ui-monospace,SFMono-Regular,Consolas,"PingFang SC",monospace; color:inherit; background:var(--studio-surface,#fff); tab-size:2; overflow-wrap:anywhere; }
.rm-text[readonly] { background:var(--studio-soft,#eef1f5); }
.rm-text:focus { outline:2px solid var(--studio-primary,#43566c); outline-offset:2px; }
.rm-mode { display:flex; margin-top:14px; font-size:12px; color:var(--rm-muted); }
.rm-mode label { display:flex; align-items:center; gap:8px; }
.rm-mode input { accent-color:var(--studio-primary,#43566c); width:14px; height:14px; }
.rm-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:18px 0 24px; margin-top:16px; border-top:1px solid var(--rm-line); }
.rm-actions>div { display:flex; gap:8px; flex-wrap:wrap; }
.rm-page .button { min-height:36px; font-size:12px; padding:8px 12px; gap:6px; border-radius:6px; }
.rm-save-state { font-size:12px; color:var(--rm-muted); }
.rm-validation { padding:14px 0 0; font-size:12px; }
.rm-validation strong { display:flex; align-items:center; gap:6px; font-weight:500; }
.rm-validation p { color:var(--rm-muted); margin:6px 0; line-height:1.7; }
.rm-validation.is-error strong, .rm-error { color:var(--studio-error,#b43340); }
.rm-lock { max-width:330px; margin:86px auto 30px; border:0; background:transparent; padding:0; }
.rm-lock h2 { margin:16px 0 26px; }
.rm-lock-icon { color:var(--rm-muted); }
.rm-lock-icon svg { width:28px; height:28px; }
.rm-lock form { display:grid; gap:12px; }
.rm-empty { color:var(--rm-muted); text-align:center; padding:48px 12px; font-size:13px; }
.rm-pending { display:inline-flex; align-items:center; gap:8px; }
.rm-pending svg { animation:rm-spin 1.5s linear infinite; }
.rm-history-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 0; border-bottom:1px solid var(--rm-line); font-size:13px; background:transparent; border-radius:0; }
.rm-history-row p { margin:8px 0; overflow-wrap:anywhere; }
.rm-history-row small { font-size:11px; color:var(--rm-muted); }
.rm-compare-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:24px 0 16px; }
.rm-compare-header h3 { font-size:14px; }
.rm-compare-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.rm-compare-grid label { font-size:12px; color:var(--rm-muted); min-width:0; }
.rm-compare-grid textarea { display:block; margin-top:10px; width:100%; height:300px; resize:vertical; padding:12px; border:1px solid var(--rm-line); border-radius:4px; background:var(--studio-surface,#fff); color:var(--studio-ink,#171e2e); font:12px/1.8 ui-monospace,monospace; }
.rm-confirm { width:min(480px,calc(100vw - 32px)); border:1px solid var(--studio-line,#dce1e8); border-radius:8px; background:var(--studio-surface,#fff); color:var(--studio-ink,#171e2e); padding:24px; }
.rm-confirm::backdrop { background:rgb(0 0 0 / .5); }
.rm-confirm header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.rm-confirm h2 { font-size:20px; margin:0; }
.rm-confirm p { font-size:13px; line-height:1.7; }
.rm-confirm .field { margin:16px 0; }
.rm-confirm footer { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
.rm-error:empty { display:none; }
.rm-page input,.rm-confirm input { color:inherit; }
@keyframes rm-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .rm-pending svg { animation:none; } }
@media (max-width:1100px) { .rm-workspace { grid-template-columns:190px minmax(0,1fr); } .rm-editor { padding-left:20px; } .rm-actions { align-items:flex-start; flex-direction:column; } }
@media (max-width:720px) {
  .rm-page .page-header { align-items:flex-start; gap:16px; flex-direction:column; }
  .rm-page .page-header h1 { font-size:24px; }
  .rm-workspace { grid-template-columns:minmax(0,1fr); }
  .rm-library { padding:16px 0; border-right:0; border-bottom:1px solid var(--rm-line); }
  .rm-list { display:none; }
  .rm-mobile-picker { display:grid; gap:8px; margin-top:12px; font-size:12px; color:var(--rm-muted); }
  .rm-mobile-picker select { min-width:0; width:100%; height:40px; border:1px solid var(--rm-line); border-radius:6px; padding:0 10px; color:var(--studio-ink); background:var(--studio-surface); }
  .rm-text { height:320px; min-height:280px; }
  .rm-editor { padding:22px 0 0; }
  .rm-lock { margin:36px auto; }
  .rm-compare-grid { grid-template-columns:1fr; }
  .rm-actions>div { width:100%; }
  .rm-actions .button { flex:1; padding:8px; white-space:nowrap; }
  .rm-history-row { flex-wrap:wrap; }
}
