/* Shared navigation geometry only. Kuku themed battle headers remain untouched. */
body:not(.rv-battle):not(.bu-battle) .app-header{
 display:grid!important;grid-template-columns:minmax(82px,1fr) 72px 76px 60px!important;grid-template-rows:44px 24px!important;column-gap:4px!important;row-gap:4px!important;align-items:center;box-sizing:border-box;min-height:88px;height:88px;padding:8px 6px!important;margin-bottom:12px;
}
body:not(.rv-battle):not(.bu-battle) .app-header .header-right{display:contents!important}
body:not(.rv-battle):not(.bu-battle) .app-header #backButton{grid-column:1!important;grid-row:1!important;justify-self:start;width:82px;min-width:82px!important;max-width:82px!important;height:44px!important;min-height:44px!important;margin:0;padding:0 4px!important;font-size:14px!important;line-height:1.2;white-space:nowrap;box-sizing:border-box}
body:not(.rv-battle):not(.bu-battle) .app-header #homeButton{grid-column:2!important;grid-row:1!important;width:72px!important;min-width:72px!important;height:44px!important;min-height:44px!important;margin:0;padding:0!important;font-size:0!important;box-sizing:border-box;border-radius:14px}
body:not(.rv-battle):not(.bu-battle) .app-header #homeButton::before{content:'🏠 ホーム';font-size:14px;font-weight:700;white-space:nowrap}
body:not(.rv-battle):not(.bu-battle) .app-header #navCardsButton{grid-column:3!important;grid-row:1!important;width:76px!important;min-width:76px!important;height:44px!important;min-height:44px!important;margin:0;padding:0 4px!important;font-size:14px!important;line-height:1.2;white-space:nowrap;box-sizing:border-box;border-radius:14px}
body:not(.rv-battle):not(.bu-battle) .app-header #settingsButton{grid-column:4!important;grid-row:1!important;width:60px!important;min-width:60px!important;height:44px!important;min-height:44px!important;margin:0;padding:0!important;font-size:0!important;box-sizing:border-box;border-radius:14px}
body:not(.rv-battle):not(.bu-battle) .app-header #settingsButton::before{content:'⚙️ 設定';font-size:14px;font-weight:700;white-space:nowrap}
body:not(.rv-battle):not(.bu-battle) .app-header #homeButton::after,body:not(.rv-battle):not(.bu-battle) .app-header #settingsButton::after{content:none}
body:not(.rv-battle):not(.bu-battle) .app-header #screenTitle{grid-column:1/-1!important;grid-row:2!important;width:100%;min-width:0;margin:0!important;padding:0;line-height:24px!important;font-size:19px!important;letter-spacing:1px;text-align:center;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
body:not(.rv-battle):not(.bu-battle) .app-header button[hidden]{display:none!important}
body:not(.rv-battle):not(.bu-battle) .app-header button{touch-action:manipulation}
body:not(.rv-battle):not(.bu-battle) .app-header:not(.nav-four){grid-template-columns:minmax(82px,1fr) 72px 60px!important}
body:not(.rv-battle):not(.bu-battle) .app-header:not(.nav-four) #settingsButton{grid-column:3!important}

/* Anchor both groups to one explicit row; no flexible right-group expansion. */
body:not(.rv-battle):not(.bu-battle) .app-header.nav-unified .shared-nav-row{display:grid!important;grid-template-columns:82px minmax(0,1fr)!important;column-gap:4px!important;align-items:center!important}
body:not(.rv-battle):not(.bu-battle) .app-header.nav-unified .shared-nav-row .header-right{grid-column:2!important;justify-self:end!important;display:flex!important;flex:0 0 auto!important;width:max-content!important;margin:0!important;gap:4px!important;align-items:center!important}
body:not(.rv-battle):not(.bu-battle) .app-header.nav-unified .shared-nav-row #backButton{grid-column:1!important;grid-row:1!important}
body:not(.rv-battle):not(.bu-battle) .app-header.nav-unified .shared-nav-row #homeButton{order:0!important}
body:not(.rv-battle):not(.bu-battle) .app-header.nav-unified .shared-nav-row #navCardsButton{order:1!important}
body:not(.rv-battle):not(.bu-battle) .app-header.nav-unified .shared-nav-row #settingsButton{order:2!important}
