.level-editor-context-menu{position:fixed;z-index:160;min-width:190px;padding:5px;border:1px solid var(--edge);border-radius:10px;background:var(--surface);color:var(--text);box-shadow:0 10px 35px #0003;font-size:12px}
.level-editor-context-menu[hidden]{display:none!important}
.level-editor-context-menu button{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;border:0;border-radius:6px;padding:9px 11px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;white-space:nowrap}
.level-editor-context-menu button:hover,.level-editor-context-menu button:focus-visible{background:color-mix(in srgb,var(--text) 10%,var(--surface));outline:1px solid var(--edge)}
.level-editor-context-menu button:disabled{opacity:.4;cursor:default}
.editor-context-shortcut{font-size:10px;color:var(--muted)}
.editor-context-branch{position:relative}
.editor-context-branch>button:after{content:'›';margin-left:auto}
.editor-context-submenu{display:none;position:absolute;left:calc(100% - 2px);top:-5px;min-width:205px;max-height:min(580px,calc(100vh - 28px));overflow-y:auto;padding:5px;border:1px solid var(--edge);border-radius:9px;background:var(--surface);color:var(--text);box-shadow:0 10px 30px #0003}
.editor-context-branch:hover>.editor-context-submenu,.editor-context-branch:focus-within>.editor-context-submenu,.editor-context-branch[data-open=true]>.editor-context-submenu{display:block}
.editor-context-branch[data-flip=true]>.editor-context-submenu{left:auto;right:calc(100% - 2px)}
#editorSelectionStatus{padding:8px 10px;border:1px solid var(--edge);border-radius:7px;font-size:11px;line-height:1.5}
#generatedSelectionGroup{position:absolute;inset:0;pointer-events:none;z-index:9}
#generatedSelectionGroup>span{position:absolute;box-sizing:border-box;border:2px dashed #428eff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #fff9}
.editor-rotation-handle{position:absolute;z-index:12;width:24px;height:24px;border:2px solid #428eff;border-radius:50%;background:var(--surface);color:#2469b5;transform:translate(-50%,-50%);font-size:18px;line-height:18px;padding:0;cursor:grab;touch-action:none;box-shadow:0 1px 5px #0003}
.editor-rotation-handle:active{cursor:grabbing}.editor-rotation-handle[hidden],.editor-rotation-connector[hidden]{display:none!important}
.editor-rotation-connector{position:absolute;z-index:10;height:1px;background:#428eff;transform-origin:left center;pointer-events:none}

/* Menus share the desktop editor's smaller interface. Keep client-space fixed
   positioning unscaled so right-click placement and edge fitting stay exact. */
@media(min-width:901px){
 body:not([data-mobile-layout=true]) .level-editor-context-menu{min-width:142.5px;padding:3.75px;border-radius:7.5px;box-shadow:0 7.5px 26.25px #0003;font-size:9px}
 body:not([data-mobile-layout=true]) .level-editor-context-menu button{gap:13.5px;border-radius:4.5px;padding:6.75px 8.25px}
 body:not([data-mobile-layout=true]) .editor-context-shortcut{font-size:7.5px}
 body:not([data-mobile-layout=true]) .editor-context-submenu{left:calc(100% - 1.5px);top:-3.75px;min-width:153.75px;max-height:min(435px,calc(100vh - 28px));padding:3.75px;border-radius:6.75px;box-shadow:0 7.5px 22.5px #0003}
 body:not([data-mobile-layout=true]) .editor-context-branch[data-flip=true]>.editor-context-submenu{left:auto;right:calc(100% - 1.5px)}
}
