.structure-panel{overflow-y:auto;overscroll-behavior:contain}.structure-panel>.preview-heading,.structure-panel>.preview-controls,.structure-panel>.molecule-wrap,.structure-panel>.structure-legend,.structure-panel>.detail-tabs{flex-shrink:0}.structure-panel>.preview-body{flex:0 0 auto;min-height:190px;overflow:visible}.structure-view-tools{flex-wrap:wrap;max-width:calc(100% - 16px);justify-content:flex-end;gap:3px}.structure-view-tools button{padding:4px 6px;font-size:10px}
#structure-settings-panel{position:absolute;z-index:12;top:48px;left:8px;right:8px;max-height:calc(100% - 58px);overflow:auto;border:1px solid #bfcddb;border-radius:7px;background:rgba(255,255,255,.98);box-shadow:0 5px 20px #22365026;padding:12px;color:#24354a;font-size:11px;text-align:left}
.viewer-setting-grid{display:grid;grid-template-columns:1fr;gap:8px}.viewer-setting-grid label{display:grid;gap:4px}.viewer-setting-grid select{width:100%;min-width:0;font-size:11px;padding:6px}.viewer-check{display:flex;gap:5px;align-items:flex-start;margin:9px 0;line-height:1.5}.viewer-check input{width:auto;margin:2px 0}.structure-downloads{display:flex;flex-wrap:wrap;gap:6px}.structure-downloads button,#close-structure-settings{font-size:11px;padding:6px}#structure-mode-note{line-height:1.6;color:#425971;background:#f0f5fa;padding:8px;border-radius:4px}#structure-settings-panel small{display:block;line-height:1.5;margin:8px 0;color:#65758a}
.structure-legend{flex-wrap:wrap;gap:5px!important;line-height:1.5}.structure-legend span{display:inline-flex;align-items:center;gap:4px}.structure-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;flex-shrink:0}.structure-legend small{display:block;flex-basis:100%}
.residue-profile{padding:10px 12px;border-top:1px solid #d9e2ec;background:#fff;font-size:10px;flex-shrink:0}.profile-heading{display:flex;align-items:center;gap:5px;justify-content:space-between}.profile-heading strong{font-size:11px}.profile-heading select{max-width:55%;min-width:0;font-size:10px;padding:4px}.residue-profile p{font-size:10px;line-height:1.5;color:#64758a;margin:5px 0}.residue-profile small{display:block;color:#718096;line-height:1.6;margin-top:7px}#confidence-plot{width:100%;height:105px;display:block;cursor:crosshair}#confidence-plot text{font:8px sans-serif;fill:#75879b}#confidence-residue{width:100%;padding:0;height:15px;margin:3px 0}#residue-readout{min-height:30px;font-size:10px;line-height:1.5;color:#345470;overflow-wrap:anywhere}.profile-actions{display:flex;flex-wrap:wrap;gap:5px}.profile-actions button{font-size:10px;padding:4px 5px}
.structure-expanded #structure-settings-panel,.molecule-wrap:fullscreen #structure-settings-panel{left:auto;right:14px;width:min(360px,calc(100% - 28px));top:62px;max-height:calc(100% - 80px)}.structure-expanded .viewer-setting-grid,.molecule-wrap:fullscreen .viewer-setting-grid{grid-template-columns:1fr 1fr}.structure-expanded .structure-view-tools button,.molecule-wrap:fullscreen .structure-view-tools button{font-size:12px;padding:7px 10px}
@media(max-width:680px){.structure-view-tools{gap:2px}.structure-view-tools button{font-size:10px;padding:5px}.structure-expanded .structure-view-title{max-width:45%;font-size:10px}.structure-expanded #structure-settings-panel{top:86px;max-height:calc(100% - 100px)}}
/* Primary display controls are visible without opening the export menu. */
#structure-quick-controls{flex-shrink:0;padding:10px 12px;background:#f3f7fb;border-top:1px solid #d9e2ec;border-bottom:1px solid #d9e2ec;gap:8px}
#structure-quick-controls label{font-size:11px;font-weight:600;color:#354d66}
#structure-quick-controls select{background:#fff;border:1px solid #b9c9da;border-radius:4px;font-size:12px;min-height:32px;color:#203b56}
.molecule-wrap.structure-expanded #structure-quick-controls,.molecule-wrap:fullscreen #structure-quick-controls{position:absolute;z-index:11;top:66px;left:16px;width:300px;max-width:calc(100% - 32px);box-sizing:border-box;border:1px solid #c5d3e1;border-radius:6px;background:rgba(255,255,255,.96);grid-template-columns:1fr}
@media(max-width:680px){.molecule-wrap.structure-expanded #structure-quick-controls,.molecule-wrap:fullscreen #structure-quick-controls{top:90px;left:10px;width:240px}}