/* Keep the editor controls in the space available to each toolbar group. */
.ru-editor.manual-editor-page{--editor-toolbar-height:56px;grid-template-rows:var(--editor-toolbar-height) minmax(0,1fr)}
.ru-editor .manual-topbar{height:var(--editor-toolbar-height);grid-template-columns:minmax(0,1fr) max-content max-content;grid-template-rows:1fr;gap:12px;padding:0 14px}
.ru-editor .manual-topbar>div{min-width:0;position:static;inset:auto;transform:none;order:0}
.ru-editor .manual-topbar>.manual-topbar-start{grid-area:1/1;overflow:hidden}
.ru-editor .manual-topbar-start>span{flex:1;min-width:0}
.ru-editor .manual-topbar-start>button,.ru-editor .manual-topbar-start>b{flex:none}
.ru-editor .manual-topbar>.zoom-control{grid-area:1/2;justify-content:center;gap:6px}
.ru-editor .manual-topbar>.manual-topbar-actions{grid-area:1/3;max-width:none;flex-wrap:nowrap;gap:6px}
.ru-editor .manual-topbar button{flex:0 0 auto;white-space:nowrap;line-height:1.2}
.ru-editor .manual-topbar .zoom-control button,.ru-editor .manual-topbar-actions button{min-width:34px;width:auto;height:34px;padding:0 10px;display:inline-flex;align-items:center;justify-content:center;gap:5px}
.ru-editor .manual-topbar-actions .tool-icon{flex:none;width:17px;height:17px}
.ru-editor .manual-topbar-actions button.save{font-size:11px;min-width:86px}
.ru-editor .manual-topbar-actions button.save:after{content:none}
.ru-editor .manual-topbar .zoom-control b{min-width:46px}
.ru-editor .mobile-tool-rail,.ru-editor .layers-panel,.ru-editor .color-list-panel,.ru-editor .manual-layer-toolbar{top:calc(var(--editor-toolbar-height) + 12px)}
.ru-editor .manual-layer-toolbar{max-height:calc(100dvh - var(--editor-toolbar-height) - 24px)}
.ru-editor .mobile-sheet-backdrop{top:var(--editor-toolbar-height)}
.ru-editor .ru-selection,.ru-editor .selection-toolbar{top:calc(var(--editor-toolbar-height) + 12px)}
@media(max-width:1280px){
 .ru-editor .manual-topbar-actions button span{display:none}
 .ru-editor .manual-topbar-actions .topbar-feature,.ru-editor .manual-topbar-actions .danger{min-width:34px;width:34px;padding:0}
 .ru-editor .manual-topbar-start>span{display:none}
}
@media(max-width:760px){
 .ru-editor.manual-editor-page{--editor-toolbar-height:104px}
 .ru-editor .manual-topbar{grid-template-columns:minmax(0,1fr) max-content;grid-template-rows:40px 40px;gap:8px;padding:8px}
 .ru-editor .manual-topbar>.manual-topbar-start{grid-area:1/1;gap:5px}
 .ru-editor .manual-topbar>.zoom-control{grid-area:1/2;gap:4px}
 .ru-editor .manual-topbar>.manual-topbar-actions{grid-area:2/1/3/-1;justify-content:space-between;gap:4px}
 .ru-editor .manual-topbar .zoom-control button{min-width:32px;padding:0 8px}
 .ru-editor .manual-topbar .zoom-control button:last-child{display:inline-flex;min-width:0;padding:0 9px;font-size:10px}
 .ru-editor .manual-topbar .zoom-control b{min-width:38px}
 .ru-editor .manual-topbar-actions button{min-width:32px;width:32px;height:36px;padding:0}
 .ru-editor .manual-topbar-actions .danger{display:inline-flex;min-width:32px;width:32px}
 .ru-editor .manual-topbar-actions #grid-toggle{display:none}
 .ru-editor .manual-topbar-actions button.save{width:auto;min-width:80px;padding:0 10px;font-size:11px}
 .ru-editor .manual-topbar-start>b{font-size:9px;padding:6px}
 .ru-editor .mobile-tool-rail{top:calc(var(--editor-toolbar-height) + 8px)}
 .ru-editor .layers-panel,.ru-editor .color-list-panel,.ru-editor .manual-layer-toolbar{top:auto;max-height:calc(100dvh - var(--editor-toolbar-height) - 12px)}
 .ru-editor .palette-panel{max-height:calc(100dvh - var(--editor-toolbar-height) - 8px)}
 .ru-editor .ru-selection,.ru-editor .selection-toolbar{top:calc(var(--editor-toolbar-height) + 8px)}
}
/* Interior routes start with a neutral loading view, never the homepage. */
.route-loading{min-height:60dvh;display:grid;place-items:center;padding:32px;color:var(--muted);text-align:center}
.route-loading>div{display:grid;justify-items:center;gap:14px}
.route-loading-indicator{width:30px;height:30px;border:3px solid #e9e4da;border-top-color:var(--accent);border-radius:50%;animation:route-loading-spin .8s linear infinite}
@keyframes route-loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.route-loading-indicator{animation:none}}
