/* Layout only. Standard controls, modal/focus management and feedback are Ant Design. */
.rng-scheme-viewer.ant-modal{padding-bottom:0;}
.rng-scheme-viewer .ant-modal-container{height:min(900px,calc(100dvh - 32px));display:flex;flex-direction:column;padding:16px;overflow:hidden;}
.rng-scheme-viewer .ant-modal-header{flex:none;padding-right:36px;}
.rng-scheme-viewer .ant-modal-body{flex:1;min-height:0;}
.rng-scheme-heading{display:flex;flex-direction:column;min-width:0;}
.rng-scheme-heading>.ant-typography{max-width:100%;}
.rng-scheme-body{height:100%;display:flex;flex-direction:column;gap:10px;}
.rng-scheme-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.rng-scheme-layout{display:grid;grid-template-columns:minmax(0,1fr) 248px;min-height:0;flex:1;gap:12px;}
.rng-scheme-main{display:flex;flex-direction:column;min-width:0;min-height:0;gap:8px;}
.rng-scheme-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.rng-scheme-tools .ant-btn{min-width:44px;}
.rng-scheme-viewer .ant-segmented-item-label{min-height:44px;line-height:44px;}
.rng-scheme-compare{display:flex;justify-content:center;}
.rng-scheme-stage{position:relative;flex:1;min-height:100px;min-width:0;background:#dfe8ee;border:1px solid #afc4d2;border-radius:8px;overflow:hidden;}
.rng-scheme-stage:focus-visible{outline:3px solid #007ca8;outline-offset:2px;}
.rng-scheme-surface{position:absolute;inset:0;}
.rng-scheme-surface>img{display:block;max-width:100%;max-height:100%;}
.rng-scheme-surface .viewer-container{background:#dfe8ee;}
.rng-scheme-loading{position:absolute;inset:0;display:grid;place-items:center;background:#ffffff80;}
.rng-scheme-status{height:64px;overflow:auto;flex:none;}
.rng-scheme-status .ant-alert{padding:8px;}
.rng-scheme-actions{display:flex;flex-direction:column;gap:12px;padding-left:12px;border-left:1px solid #d6e2e9;overflow:auto;min-height:0;}
.rng-scheme-region,.rng-scheme-action-group{display:flex;flex-direction:column;gap:6px;}
.rng-scheme-provenance{font-size:12px;}
@media(max-width:760px){
 .rng-scheme-wrap .rng-scheme-viewer.ant-modal{width:100vw!important;max-width:100vw;margin:0;top:0;}
 .rng-scheme-viewer .ant-modal-container{height:100dvh;border-radius:0;padding:8px;padding-bottom:max(8px,env(safe-area-inset-bottom));}
 .rng-scheme-viewer .ant-modal-header{margin-bottom:6px;}
 .rng-scheme-top{gap:6px;}
 .rng-scheme-top>.ant-segmented{width:100%;}
 .rng-scheme-top>.ant-segmented .ant-segmented-group{display:flex;}
 .rng-scheme-top>.ant-segmented .ant-segmented-item{flex:1;}
 .rng-scheme-layout{display:flex;flex-direction:column;gap:0;}
 .rng-scheme-main{flex:1;min-height:180px;gap:6px;}
 .rng-scheme-tools{flex-wrap:nowrap;overflow-x:auto;flex:none;padding-bottom:3px;}
 .rng-scheme-tools>*{flex:none;}
 .rng-scheme-stage{min-height:80px;}
 .rng-scheme-status{height:54px;font-size:12px;}
 .rng-scheme-status .ant-alert{font-size:12px;padding:6px;}
 .rng-scheme-actions{flex:none;max-height:32dvh;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;padding:6px 0 0;border-left:0;border-top:1px solid #d6e2e9;}
 .rng-scheme-region{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 6px;align-items:center;font-size:12px;}
 .rng-scheme-region>.ant-btn{grid-column:2;grid-row:1/3;font-size:12px;}
 .rng-scheme-region>.ant-typography{font-size:12px;}
 .rng-scheme-provenance{grid-column:1/-1;font-size:11px;}
 .rng-scheme-provenance .ant-typography{font-size:11px;}
 .rng-scheme-actions .ant-btn{padding-inline:6px;font-size:12px;}
}
@media(pointer:coarse){.rng-scheme-surface .cropper-point{width:18px;height:18px;opacity:1;}.rng-scheme-surface .cropper-point::after{content:"";position:absolute;inset:-13px;}}

.rng-scheme-viewer .ant-modal-close{width:44px;height:44px;top:4px;right:4px;}
@media(max-width:760px){.rng-scheme-surface .cropper-point{width:18px;height:18px;opacity:1;}}

.rng-scheme-integrated .ant-space{max-width:100%;}
.rng-scheme-integrated .ant-btn{white-space:normal;height:auto;min-height:44px;}
@media(max-width:760px){.rng-scheme-integrated{display:flex;max-height:38dvh;}.rng-scheme-integrated>.ant-space{flex-shrink:0;}}
