diff --git a/website/integrations/SHARED-HEADER-362.md b/website/integrations/SHARED-HEADER-362.md
new file mode 100644
index 00000000..ad1b5ba3
--- /dev/null
+++ b/website/integrations/SHARED-HEADER-362.md
@@ -0,0 +1,7 @@
+# Shared canonical main menu —362
+
+One11-link source: Home, Shop, Boards, Staff roster, Discord, Exchange, Kit Exchange, Support center, Account center, Clan center, Dunopedia. Build/publish helpers use this list. Runtime normalisation repairs legacy order/missing/duplicate links while preserving existing anchor/badge objects. Native PHP consumes a generated main-navigation fragment; inner application menus, logos and memorial blocks stay untouched.
+
+Already scoped-deployed4November;5November verification completed, no stale full rebuild or new production mutation. API/runtime suffix was byte-preserved by scoped publication. Backup/root/ticket362-before-20261104. Later Support368/364 and account changes retained.
+
+17 focused tests passed. Actual authenticated HTTP checks:9surfaces(home,bans,profile,shop,CP,Support,Forums,Clans,Wiki) allHTTP200/exact11orderedhrefs/11icons. Native Support scriptproxy returnscanonical marker andCache-Control:no-store. RealSupportbrowser1280px:11loadedicons,Shopsecond,nooverflow,hamburgerhidden;390px:opens/closes,Escape restoresfocus,nooverflow. Screenshotsoutput/ticket362-final-20261105/header-{desktop,mobile}.png. No payment/permission/game changes. Source-review merge and native completion evidence in task362.
diff --git a/website/integrations/common/shared-header.php b/website/integrations/common/shared-header.php
index 912a59ed..3bfd6592 100644
--- a/website/integrations/common/shared-header.php
+++ b/website/integrations/common/shared-header.php
@@ -13,7 +13,8 @@ function dune_shared_header($html) {
$html=str_ireplace('',$head.'',$html);
}
if(!str_contains($html,'class="dune-memorial"')&&is_file($base.'shared-memorial.html'))$html=preg_replace_callback('/',file_get_contents($base.'shared-memorial.html').'',$m[0]),$html,1);
- $html=preg_replace('~https://www\.dunerealms\.com/portal-navigation\.(js|css)(?:\?[^\"\s>]*)?~','/dune-navigation.$1?v=shared-20261102',$html);
+ if(is_file($base.'shared-main-menu.html'))$html=preg_replace('~~',file_get_contents($base.'shared-main-menu.html'),$html);
+ $html=preg_replace('~https://www\.dunerealms\.com/portal-navigation\.(js|css)(?:\?[^\"\s>]*)?~','/dune-navigation.$1?v=canonical-362',$html);
if(($_SERVER['HTTP_HOST']??'')==='support.dunerealms.com'&&!str_contains($_SERVER['SCRIPT_NAME']??'','/scp/'))$html=str_ireplace('','',$html);
if(($_SERVER['HTTP_HOST']??'')==='support.dunerealms.com'){
$html=str_ireplace('','',$html);
@@ -29,7 +30,7 @@ function dune_shared_header($html) {
}
// DuneRealms native MyBB surface polish
if(($_SERVER['HTTP_HOST']??'')==='forums.dunerealms.com'){
- $html=str_replace('/dune-navigation.js?v=shared-20261102','/dune-navigation.js?v=shared-20261102',$html);
+ $html=str_replace('/dune-navigation.js?v=canonical-362','/dune-navigation.js?v=canonical-362',$html);
$html=str_ireplace('','',$html);
$html=preg_replace_callback('/
]*)>/i',function($m){$attrs=$m[1];if(preg_match('/\bclass=["\']([^"\']*)["\']/i',$attrs))$attrs=preg_replace('/\bclass=(["\'])([^"\']*)\1/i','class="$2 dune-forum"',$attrs,1);else $attrs.=' class="dune-forum"';return '';},$html,1);
}
diff --git a/website/scripts/build-portal-navigation.mjs b/website/scripts/build-portal-navigation.mjs
index 6eee84d2..6b0f1308 100644
--- a/website/scripts/build-portal-navigation.mjs
+++ b/website/scripts/build-portal-navigation.mjs
@@ -1,3 +1,4 @@
+import{CANONICAL_MENU_SCRIPT}from'./main-menu.mjs';
import{recordPageUpdates,menuBadgeScript}from'./menu-updates.mjs';
import {RELEASE_SCRIPT,RELEASE_CSS} from './release-branding.mjs';
import {BUTTON_CSS,BUTTON_SCRIPT} from './dune-buttons.mjs';
@@ -6,7 +7,7 @@ import {updatePortalNavigation,PORTAL_CSS,PORTAL_SCRIPT,CONTEXT_SCRIPT,CONTEXT_C
const web=new URL('../web/',import.meta.url);
writeFileSync(new URL('portal-navigation.css',web),PORTAL_CSS+CONTEXT_CSS+BUTTON_CSS+RELEASE_CSS);
recordPageUpdates();
-writeFileSync(new URL('portal-navigation.js',web),PORTAL_SCRIPT+CONTEXT_SCRIPT+BUTTON_SCRIPT+RELEASE_SCRIPT+menuBadgeScript());
+writeFileSync(new URL('portal-navigation.js',web),PORTAL_SCRIPT+CONTEXT_SCRIPT+BUTTON_SCRIPT+RELEASE_SCRIPT+menuBadgeScript()+CANONICAL_MENU_SCRIPT);
writeFileSync(new URL('dune-actions.css',web),BUTTON_CSS);
writeFileSync(new URL('dune-actions.js',web),BUTTON_SCRIPT);
for(const file of readdirSync(web).filter(f=>f.endsWith('.html'))){const url=new URL(file,web),before=readFileSync(url,'utf8'),after=updatePortalNavigation(before);if(after!==before)writeFileSync(url,after);}
diff --git a/website/scripts/build.mjs b/website/scripts/build.mjs
index f48bf7c2..64e977d6 100644
--- a/website/scripts/build.mjs
+++ b/website/scripts/build.mjs
@@ -1,8 +1,9 @@
+import{withCanonicalMenu}from'./main-menu.mjs';
import{recordPageUpdates,patchMenuBadges}from'./menu-updates.mjs';
// Package the authored web and worker sources without rewriting their content.
import {readFileSync,writeFileSync,readdirSync,statSync,mkdirSync,existsSync,rmSync,cpSync} from 'node:fs';import path from 'node:path';import {fileURLToPath} from 'node:url';
const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..'),web=path.join(root,'web'),dist=path.join(root,'dist');
-recordPageUpdates({root});patchMenuBadges(root);
+recordPageUpdates({root});patchMenuBadges(root);writeFileSync(path.join(web,'portal-navigation.js'),withCanonicalMenu(readFileSync(path.join(web,'portal-navigation.js'),'utf8')));
const assets={};const types={'.html':'text/html; charset=utf-8','.css':'text/css; charset=utf-8','.js':'text/javascript; charset=utf-8','.json':'application/json; charset=utf-8','.webp':'image/webp','.png':'image/png','.zip':'application/zip','.svg':'image/svg+xml'};
function collect(directory){for(const entry of readdirSync(directory).sort()){const p=path.join(directory,entry);if(statSync(p).isDirectory())collect(p);else{const type=types[path.extname(entry)];if(!type)throw Error('Unexpected asset: '+entry);assets['/'+path.relative(web,p).split(path.sep).join('/')]=[type,readFileSync(p).toString('base64')]}}}collect(web);
let api=['feed-api.mjs','exchange-api.mjs','forum-api.mjs','community-api.mjs','portal-api.mjs'].map(file=>readFileSync(path.join(root,'worker',file),'utf8').replace(/export /g,'')).join('\n');let runtime=readFileSync(path.join(root,'worker/runtime.mjs'),'utf8').replace(/^import .*;$/gm,'');
diff --git a/website/scripts/deploy-canonical-menu.mjs b/website/scripts/deploy-canonical-menu.mjs
new file mode 100644
index 00000000..0aec9e44
--- /dev/null
+++ b/website/scripts/deploy-canonical-menu.mjs
@@ -0,0 +1,14 @@
+// Scoped publication: retain every existing runtime/API byte outside the asset map.
+import{readFileSync,writeFileSync,existsSync,mkdirSync}from'node:fs';import{createHash}from'node:crypto';import path from'node:path';import{fileURLToPath}from'node:url';import{withCanonicalMenu}from'./main-menu.mjs';import{PORTAL_NAV}from'./portal-navigation.mjs';
+const navPattern=/