/* Shared icon rail. Only navigation is styled here; page content stays unchanged. */
html .nav.rh-expand-nav, :root[data-theme] .nav.rh-expand-nav {
  --rail-ink: #eee3c9; --rail-muted: #ae9b76; --rail-line: #493719;
  position: fixed; inset: 0 auto 0 0; z-index: 1000; box-sizing: border-box;
  width: 58px!important; height: 100dvh; padding: 16px 9px!important;
  display: flex; flex-direction: column; align-items: stretch; gap: 12px!important;
  background: linear-gradient(180deg,#090909,#11100d)!important; border-right: 1px solid #30230e!important;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  transition: width 480ms cubic-bezier(.22,1,.36,1), box-shadow 480ms ease;
}
html .nav.rh-expand-nav::-webkit-scrollbar { display: none; }
html .nav.rh-expand-nav:focus-within { width: 236px!important; box-shadow: 16px 0 42px rgba(0,0,0,.3); }
@media (hover: hover) {
  html .nav.rh-expand-nav:hover { width: 236px!important; box-shadow: 16px 0 42px rgba(0,0,0,.3); }
}
html .nav.rh-expand-nav .nav-item, html .nav.rh-expand-nav .nav-logo,
:root[data-theme] .nav.rh-expand-nav .nav-item, :root[data-theme] .nav.rh-expand-nav .nav-logo {
  position: relative; box-sizing: border-box; display: flex!important; align-items: center; justify-content: flex-start;
  flex: 0 0 auto; width: 100%!important; height: 42px!important; min-height: 42px; padding: 0!important;
  margin: 0!important; border: 1px solid transparent!important; border-radius: 9px!important;
  background: transparent!important; color: var(--rail-muted)!important; text-decoration: none; font-size: 14px!important;
  filter: none!important; box-shadow: none!important; transform: none!important;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
html .nav.rh-expand-nav .nav-logo { height: 44px!important; min-height: 44px; margin-bottom: 2px!important; }
html .nav.rh-expand-nav .nav-glyph { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; font-size: 17px; }
.nav-tree { display: block; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(226,183,86,.3); background: url('assets/tree-gold-black.png') center/cover no-repeat; box-sizing: border-box; }
:root[data-theme="light"] .nav-tree { background-image: url('assets/tree-black-white.png'); }
html .nav.rh-expand-nav .nav-text {
  display: block; position: absolute; left: 49px; white-space: nowrap; line-height: 1.3;
  color: inherit; font: 600 14px/1.3 'Rajdhani',system-ui,sans-serif;
  opacity: 0; visibility: hidden; transform: translateX(-8px);
  transition: opacity 260ms ease, transform 380ms cubic-bezier(.22,1,.36,1), visibility 0s 260ms;
}
.rh-nav-group { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.rh-nav-heading { position: relative; height: 22px; min-height: 22px; padding: 2px 12px; overflow: hidden; white-space: nowrap; color: #ae9b76; font: 500 11px/18px system-ui,sans-serif; letter-spacing: .04em; }
.nav.rh-expand-nav .rh-nav-heading { color: transparent; transition: color 260ms ease; }
.nav.rh-expand-nav .rh-nav-heading::before { content: ''; position: absolute; left: 10px; top: 11px; width: 18px; height: 1px; background: #493719; transition: opacity 200ms ease; }
html .nav.rh-expand-nav:focus-within .nav-text { opacity: 1; visibility: visible; transform: none; transition-delay: 80ms; }
html .nav.rh-expand-nav:focus-within .rh-nav-heading { color: #ae9b76; }
html .nav.rh-expand-nav:focus-within .rh-nav-heading::before { opacity: 0; }
@media (hover: hover) {
  html .nav.rh-expand-nav:hover .nav-text { opacity: 1; visibility: visible; transform: none; transition-delay: 80ms; }
  html .nav.rh-expand-nav:hover .rh-nav-heading { color: #ae9b76; }
  html .nav.rh-expand-nav:hover .rh-nav-heading::before { opacity: 0; }
}
html .nav.rh-expand-nav a:hover, html .nav.rh-expand-nav a.active,
:root[data-theme] .nav.rh-expand-nav a:hover, :root[data-theme] .nav.rh-expand-nav a.active {
  background: rgba(226,183,86,.09)!important; color: #e2b756!important; border-color: #493719!important;
}
html .nav.rh-expand-nav a::after { display: none!important; }
html .nav.rh-expand-nav a[hidden], :root[data-theme] .nav.rh-expand-nav a[hidden], .mobile-nav a[hidden] { display: none!important; }
.rh-nav-group:not(:has(a:not([hidden]))) { display: none; }
.rh-access-pending a, .rh-access-pending .rh-nav-heading { visibility: hidden!important; }
.nav.rh-expand-nav a:focus-visible { outline: 2px solid #e2b756; outline-offset: -2px; }
/* Match the existing 58px rail; opening the drawer never moves the page. */
:root[data-theme="light"] .main { margin-left: 58px!important; }
.rh-nav-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border: 1px solid var(--border2,#493719); border-radius: 9px; background: var(--panel,#16140f); color: var(--text,#eee3c9); font-size: 26px; cursor: pointer; }
.mobile-nav .rh-nav-group { margin-top: 18px; }
.mobile-nav .nav-tree { margin-right: 2px; }
.mobile-nav .nav-item { transition: background 180ms ease,color 180ms ease,border-color 180ms ease; }
body.mobile-menu-open .raid-admin-fab { visibility: hidden; pointer-events: none; }
/* Admin retains its own section navigation, with the site rail alongside it. */
.rh-admin-navigation .sidebar { left: 58px; }
.rh-admin-navigation .shell { margin-left: calc(var(--sidebar) + 58px); }
.rh-admin-navigation #hamburger { display: none; }
@media (max-width: 767px) {
  html .nav.rh-expand-nav { display: none!important; }
  :root[data-theme="light"] .main { margin-left: 0!important; }
  .rh-admin-navigation .shell { margin-left: 0; }
  .rh-admin-navigation .sidebar { left: 0; }
  .rh-admin-navigation #hamburger { display: flex; position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
  .rh-admin-navigation #hamburger span { width: 18px; height: 2px; background: var(--text); }
  .rh-admin-navigation .mobile-nav { display: block; position: fixed; z-index: 1101; inset: 0 0 0 auto; box-sizing: border-box; width: min(86vw,320px); padding: 76px 16px 24px; overflow-y: auto; background: #11100e; transform: translateX(105%); visibility: hidden; transition: transform 320ms ease,visibility 320ms step-end; }
  .rh-admin-navigation .mobile-nav.open { transform: none; visibility: visible; transition: transform 320ms ease,visibility 0s; }
  .rh-admin-navigation .mobile-nav .nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px; color: #c9b991; text-decoration: none; }
  .rh-admin-navigation .mobile-nav .nav-glyph { width: 28px; }
  .rh-admin-navigation .mobile-overlay { position: fixed; z-index: 1100; inset: 0; background: rgba(0,0,0,.65); display: none; }
  .rh-admin-navigation .mobile-overlay.open { display: block; }
  .rh-admin-navigation.mobile-menu-open { overflow: hidden; }
}
@media (min-width: 768px) { .rh-admin-navigation .mobile-nav, .rh-admin-navigation .mobile-overlay { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html .nav.rh-expand-nav, html .nav.rh-expand-nav *, html .nav.rh-expand-nav *::before { transition: none!important; }
}
@media (min-width: 768px) and (max-width: 780px) { .rh-admin-navigation .shell { margin-left: 58px; } }
/* Theme selectors must not override the expanded width. */
:root[data-theme] .nav.rh-expand-nav:focus-within { width: 236px!important; box-shadow: 16px 0 42px rgba(0,0,0,.3); }
@media (hover: hover) {
  :root[data-theme] .nav.rh-expand-nav:hover { width: 236px!important; box-shadow: 16px 0 42px rgba(0,0,0,.3); }
}
/* Editor toolbars beside the rail may wrap instead of overflowing. */
body:has(.rh-expand-nav) > .page-header { margin-left: 58px; flex-wrap: wrap; }
@media (max-width:767px) { body:has(.rh-expand-nav) > .page-header { margin-left: 0; } }
/* Administration belongs to the rail footer, not a floating page action. */
.rh-nav-footer { flex: 0 0 auto; margin-top: auto; padding-top: 12px; position: sticky; bottom: 0; background: #11100d; }
.rh-nav-footer:not(:has(a:not([hidden]))) { display: none; }
html .nav.rh-expand-nav .rh-nav-footer a { border-top-color: #493719!important; }
@media (max-width: 767px) {
  #mobileNav { display: flex; flex-direction: column; }
  #mobileNav .rh-nav-footer { padding-top: 18px; background: inherit; }
}
