/* 086: scope responsive sizing to the two editor bars; never scale Blockly/body. */
@media (max-width:1600px){
 html body>header{gap:6px;padding:5px 8px;overflow:visible;flex-wrap:nowrap;min-width:0}
 html body>header .brand{flex:0 1 155px;min-width:115px;gap:5px;max-width:155px}
 html body>header .brand>div{flex:1;min-width:0;overflow:hidden}
 html body>header .brand strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:2.2;font-size:14px}
 html body>header .brand-km{white-space:nowrap;overflow-wrap:normal}
 html body>header .brand-km{font-size:19px}
 html[lang] body>header #language-select{width:100px;min-width:100px;max-width:100px;font-size:14px!important;padding-inline:4px;min-height:34px}
 html body>header .brand-language{flex:0 0 100px;min-width:0;max-width:100px}
 html body>header #editor-connection{flex:1 1 auto;min-width:0;gap:4px;flex-wrap:nowrap}
 html body>header #editor-connection :is(button,select,a){padding-inline:6px;font-size:12px}
 html body>header #editor-connection #port{width:100px;min-width:70px;flex:0 1 100px}
 html body>header #editor-connection #operation-status{min-width:65px;max-width:140px;width:auto;flex:1 1 65px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:5px}
 html body>header #editor-connection #operation-view-actions{gap:3px;margin-left:0}
 html body>header #editor-connection #operation-details{font-size:12px;padding-inline:4px;max-width:72px;white-space:normal}
 html body>header #editor-connection .bridge-download-link{max-width:90px;white-space:normal;line-height:1.5}
 html body>header #editor-connection #check{max-width:72px;white-space:normal;padding-inline:4px}
 html body>header #editor-connection #upload{min-width:70px;max-width:110px;white-space:normal;padding-inline:7px}
 html body>header #editor-connection #tools-toggle-048{max-width:74px;min-width:0;padding-inline:4px;white-space:normal;flex-wrap:wrap;justify-content:center;gap:2px}
 html body>header #editor-connection #tools-toggle-048 span{min-width:0;overflow-wrap:anywhere}
 html body>header .header-actions{gap:4px;flex:0 0 auto}
 html body>header .header-actions :is(button,summary){font-size:12px;padding-inline:6px}
 html body>nav.toolbar{flex-wrap:nowrap;gap:5px;padding:5px 8px;overflow:visible;min-width:0}
 html body>nav.toolbar .group{flex-wrap:nowrap;gap:4px;padding-right:4px;min-width:0}
 html body>nav.toolbar .project-save-group{flex:1 1 160px;min-width:90px;max-width:250px}
 html body>nav.toolbar #project-filename{width:100%;min-width:0;flex:1 1 0}
 html body>nav.toolbar .group:has(#example){flex:1 1 210px;min-width:130px;max-width:380px}
 html body>nav.toolbar #example{width:100%;min-width:65px;max-width:250px;flex:1 1 130px;text-overflow:ellipsis}
 html body>nav.toolbar :is(button,select,summary){font-size:12px;padding-inline:7px;flex-shrink:0}
 html body>nav.toolbar .spacer{flex:0 1 10px}
 html[lang=km] body>header :is(button,select,a,summary),html[lang=km] body>nav.toolbar :is(button,select,summary){font-size:16px;line-height:2}
 html[lang=km] body>header #language-select{font-size:16px!important;line-height:2}
 html[lang=km] body>header #editor-connection #upload{font-size:18px!important;line-height:2}
 html[lang=km] body>header #editor-connection :is(#operation-details,.bridge-download-link){font-size:16px;line-height:2}
}
@media(min-width:1101px) and (max-width:1400px){
 html body>header #editor-connection .bridge-download-link{max-width:none;white-space:nowrap}
 html body>header #editor-connection #check{max-width:none;white-space:nowrap}
 html body>header #editor-connection #operation-details{max-width:none;white-space:nowrap}
 html body>header #editor-connection #tools-toggle-048{max-width:none;white-space:nowrap;flex-wrap:nowrap}
}
@media(min-width:1001px) and (max-width:1100px){
 html[lang=km] body>header{gap:4px}
 html[lang=km] body>header .brand{flex-basis:115px;max-width:115px;gap:3px}
 html[lang=km] body>header .brand-logo{flex-basis:40px;width:40px}
 html[lang=km] body>header .brand-logo img{width:40px;height:30px}
 html[lang=km] body>header .brand-language{flex-basis:85px;max-width:85px}
 html[lang=km] body>header #language-select{width:85px;min-width:85px;max-width:85px}
 html[lang=km] body>header #editor-connection{gap:3px}
 html[lang=km] body>header #editor-connection #operation-details{max-width:56px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
 html[lang=km] body>header #editor-connection #tools-toggle-048{max-width:62px;flex-wrap:nowrap;overflow:hidden;white-space:nowrap}
 html[lang=km] body>header #editor-connection #tools-toggle-048 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
/* At narrow widths preserve readable controls using additional rows, not hidden actions. */
@media(max-width:1000px){
 html body>header,html body>nav.toolbar{flex-wrap:wrap}
 html body>header #editor-connection{flex-wrap:wrap;flex-basis:100%}
 html body>nav.toolbar .group:has(#example){min-width:220px;flex-grow:1}
}
/* 115: fit the editor bars at browser 100%; no document/Blockly zoom changes. */
@media(min-width:1001px) and (max-width:1600px){
 html body>header .brand{flex-basis:160px;max-width:160px;min-width:160px}
 html body>header .brand-km{display:none}
 html body>header .brand-logo,html body>header .brand-logo img{width:44px;flex-basis:44px}
 html body>header .brand-language{flex-basis:88px;max-width:88px}
 html[lang] body>header #language-select{width:88px;min-width:88px;max-width:88px}
 html body>header #editor-connection{gap:3px}
 html body>header #editor-connection #check{max-width:64px;font-size:12px;padding-inline:5px}
 html body>header #editor-connection #port{width:90px;flex-basis:90px}
 html body>header #editor-connection #operation-status{max-width:130px;min-width:60px}
 html body>header #editor-connection #operation-view-actions{gap:2px;min-width:0}
 html body>header #editor-connection .bridge-download-link{max-width:120px;white-space:normal;line-height:1.45}
 html[lang=km] body>header #editor-connection :is(button,select,a,summary){font-size:15px;line-height:1.75}
 html[lang=km] body>header #editor-connection #operation-details{font-size:15px;max-width:none;white-space:nowrap;line-height:1.65}
 html[lang=km] body>header #editor-connection #tools-toggle-048{max-width:none;white-space:nowrap;flex-wrap:nowrap;line-height:1.65}
 html[lang=km] body>header #editor-connection #tools-toggle-048 .tools-label{white-space:nowrap;overflow-wrap:normal}
}
@media(max-width:1279px){html body>header #editor-connection{flex-wrap:wrap}html body>nav.toolbar{flex-wrap:wrap}}
