/* Shared, first-paint navigation. Its geometry never depends on a page's data. */
:root { --juji-site-tools-height: 52px; --juji-site-nav-height: 48px; --juji-site-header-height: calc(var(--juji-site-tools-height) + var(--juji-site-nav-height)); }
html { scroll-padding-top: calc(var(--juji-site-header-height) + 16px); }
html body { padding-top: var(--juji-site-header-height) !important; }
.juji-legacy-navigation { display: none !important; }
#juji-site-header, #juji-site-header * { box-sizing: border-box; text-shadow: none !important; }
#juji-site-header {
  position: fixed; inset: 0 0 auto; z-index: 1200; height: var(--juji-site-header-height);
  color: #f5eee4; background: rgba(8,8,12,.94); border-bottom: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  font: 500 14px/1.4 "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: left; letter-spacing: 0;
}
#juji-site-header .site-tools {
  height: var(--juji-site-tools-height); max-width: 1440px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
#juji-site-header .site-brand {
  display: inline-flex; flex: 0 0 auto; gap: 9px; align-items: center;
  color: #f5eee4; font: 700 19px/1 sans-serif; text-decoration: none; letter-spacing: .03em;
}
#juji-site-header .site-brand img { width: 26px; height: 26px; object-fit: contain; filter: grayscale(1); }
#juji-site-header .site-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
#juji-site-header .site-native-r6c,
#juji-site-header .r6c-topbar-right {
  position: static !important; width: auto !important; min-width: 0 !important; height: auto !important;
  display: flex !important; align-items: center; gap: 8px; padding: 0 !important; margin: 0 !important;
  background: none !important; border: 0 !important; box-shadow: none !important; transform: none !important;
}
#juji-site-header button, #juji-site-header summary, #juji-site-header .site-signin {
  font: inherit; color: #f5eee4; background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.16); border-radius: 8px;
  min-height: 36px; padding: 7px 12px; cursor: pointer; white-space: nowrap;
}
#juji-site-header .site-signin { display: inline-flex; align-items: center; text-decoration: none; }
#juji-site-header #juji-site-account { width: 264px !important; height: 36px !important; flex: 0 0 264px; justify-content: flex-end; }
#juji-site-header #juji-site-account :is(.jr-slot-account, #juji-acct-root) { min-width: 0; max-width: 100%; }
#juji-site-header #juji-acct-trigger { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#juji-site-lang { width: 108px; flex: 0 0 108px; }
/* 繁／简: the Chinese script switch (Simplified pages show 繁, Traditional pages show 简; English hides it).
 * In Chinese it shares the language button's slot (44 + 8 gap + 56 = 108; phones 30 + 5 + 33 = 68), so every
 * other header item stays where it was: the phone header is fitted to the pixel (subscribe pill, account, brand). */
#juji-site-header #juji-site-script { width: 44px; flex: 0 0 44px; padding-left: 0; padding-right: 0; text-align: center; }
html:not([lang^="en"]) #juji-site-header #juji-site-lang { width: 56px; flex-basis: 56px; padding-left: 0; padding-right: 0; }
#juji-site-script .site-script-hans,
html.jx-hant #juji-site-script .site-script-hant { display: none; }
html.jx-hant #juji-site-script .site-script-hans { display: inline; }
html[lang^="en"] #juji-site-header #juji-site-script { display: none; }
#juji-site-more { width: 84px; flex: 0 0 84px; }
#juji-site-header #juji-site-more summary { justify-content: center; width: 100%; }
#juji-site-header button:hover, #juji-site-header summary:hover { background: rgba(255,255,255,.1); }
#juji-site-header a:focus-visible, #juji-site-header button:focus-visible, #juji-site-header summary:focus-visible {
  outline: 2px solid #f5eee4; outline-offset: -3px;
}
#juji-site-nav {
  display: flex; width: 100%; max-width: 1440px; height: var(--juji-site-nav-height); margin: 0 auto; padding: 0 24px;
  gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-behavior: auto;
  background: transparent; border: 0; border-radius: 0; -webkit-overflow-scrolling: touch;
}
#juji-site-nav::-webkit-scrollbar { display: none; }
#juji-site-nav > a {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 18px; min-width: 92px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; background: transparent; color: #c4c1bc; text-decoration: none;
  font: 600 14px/1.2 "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  white-space: nowrap; letter-spacing: 0; transition: color .12s, background-color .12s;
}
#juji-site-nav > a[data-site-page="launches"] { min-width: 272px; }
#juji-site-nav > a[data-site-page="agent"] { gap: 5px; font-weight: 700; }
#juji-site-nav > a[data-site-page="agent"]::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #D96A1C; flex: 0 0 5px; }
#juji-site-nav > a:hover { color: #f5eee4; background: rgba(255,255,255,.04); }
#juji-site-nav > a[aria-current="page"] { color: #f5eee4; border-bottom-color: #f5eee4; background: rgba(255,255,255,.055); }
#juji-site-more { position: relative; }
#juji-site-more summary { display: flex; align-items: center; gap: 6px; list-style: none; }
#juji-site-more summary::-webkit-details-marker { display: none; }
#juji-site-more summary::after { content: "⌄"; }
#juji-site-more[open] summary::after { content: "⌃"; }
#juji-site-more-menu {
  position: absolute; top: calc(100% + 9px); right: 0; width: 290px;
  max-height: calc(100dvh - 74px); overflow: auto; padding: 8px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 12px;
  color: #f5eee4; background: rgba(8,8,12,.98); box-shadow: 0 18px 48px rgba(0,0,0,.32);
}
#juji-site-more-menu > a, #juji-site-more-menu > button {
  display: block; width: 100%; padding: 11px 12px; min-height: 44px; margin: 0;
  text-align: left; text-decoration: none; white-space: normal; border: 0; border-radius: 7px;
  font: inherit; color: #f5eee4; background: transparent;
}
#juji-site-more-menu > a:hover, #juji-site-more-menu > button:hover { background: rgba(255,255,255,.07); }
#juji-site-header #juji-site-more-menu > button { min-height: 44px; padding: 11px 12px; font: inherit; }
#juji-site-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 6px; }
#juji-site-status .r6c-air-pill, #juji-site-status .r6c-quota-pill { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1.4 sans-serif; color: #c4c1bc; }
#juji-site-status .r6c-air-pill.is-live { color: #34d399; }
#juji-site-more-menu .juji-site-more-account-wrap { margin: 0 0 4px; }
#juji-site-more-menu .juji-site-more-account-wrap[hidden], #juji-site-more-menu #r6c-sheet-account[hidden] { display: none !important; }
#juji-site-more-menu #r6c-sheet-account {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 7px; font: inherit; color: #f5eee4; background: rgba(255,255,255,.045);
}
#juji-site-more-menu #r6c-sheet-account:hover { background: rgba(255,255,255,.1); }
#juji-site-more-menu .site-menu-divider { border: 0; border-top: 1px solid rgba(255,255,255,.08); margin: 6px 8px; }
#juji-site-more-menu .site-menu-address { display: block; font: 12px/1.5 Consolas, monospace; color: #c4c1bc; overflow-wrap: anywhere; }
#juji-site-header .site-en { display: none; }
html[lang^="en"] #juji-site-header .site-en { display: inline; }
html[lang^="en"] #juji-site-header .site-zh { display: none; }
#juji-site-mine-layer:empty { display: none; }
#juji-site-mine-layer {
  position: fixed; top: 62px; right: 24px; z-index: 1210; width: min(380px, calc(100vw - 32px));
}
#juji-site-mine-layer .jr-pop { position: static !important; width: 100% !important; max-width: 100% !important; max-height: calc(100dvh - 78px); overflow: auto; background: rgba(8,8,12,.98); backdrop-filter: blur(22px); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: #f5eee4; box-shadow: 0 18px 48px rgba(0,0,0,.32); }
#juji-site-account [hidden] { display: none !important; }
#juji-site-notice { position: absolute; top: calc(var(--juji-site-header-height) + 8px); right: 16px; max-width: min(360px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: #f5eee4; background: rgba(8,8,12,.98); font-size: 14px; box-shadow: 0 12px 28px rgba(0,0,0,.25); }
body:not(.is-juji-sealed) #juji-site-header #r6c-topbar .jr-slot-account:not([hidden]) { display: inline-flex !important; }
#juji-site-header #r6c-pass-pill { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  #juji-site-header .site-tools { padding: 0 16px; gap: 8px; }
  #juji-site-header .site-actions { gap: 5px; }
  #juji-site-header #juji-site-account { width: 92px !important; flex-basis: 92px; }
  /* 11-09 上線巡站：92px 塞不下「BSC 0xc0…7559 · 51 点 ▾」（頭尾被切、看不到點數）＝手機只秀「51 点 ▾」，地址在下拉選單 */
  #juji-site-header #juji-acct-trigger .jacct-who { display: none; }
  #juji-site-lang { width: 68px; flex-basis: 68px; }
  #juji-site-more { width: 64px; flex-basis: 64px; }
  #juji-site-header button, #juji-site-header summary, #juji-site-header .site-signin { min-height: 36px; padding: 6px 9px; font-size: 12px; }
  #juji-site-header #juji-site-script { width: 30px; flex-basis: 30px; padding-left: 0; padding-right: 0; }
  html:not([lang^="en"]) #juji-site-header #juji-site-lang { width: 33px; flex-basis: 33px; padding-left: 0; padding-right: 0; }
  #juji-site-nav { padding: 0 16px; }
  #juji-site-nav > a { min-width: 78px; padding: 0 14px; font-size: 13px; }
  #juji-site-nav > a[data-site-page="launches"] { min-width: 258px; }
  #juji-site-more-menu { right: 0; width: min(310px, calc(100vw - 32px)); }
  #juji-site-mine-layer { right: 16px; }
  #juji-site-header #juji-acct-menu { position: fixed; top: 60px; right: 16px; width: min(320px, calc(100vw - 32px)); max-height: calc(100dvh - 76px); overflow: auto; }
  #juji-site-header #r6c-pass-pill { display: none; }
}
@media (max-width: 820px) {
  :root { --juji-site-nav-height: 96px; }
  #juji-site-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, 48px); gap: 0 4px; overflow: visible; }
  #juji-site-nav > a, #juji-site-nav > a[data-site-page="launches"] { min-width: 0; width: 100%; height: 48px; padding: 4px 7px; white-space: normal; text-align: center; line-height: 1.15; }
  #juji-site-nav > a[data-site-page="launches"] { padding: 0; font-size: 12px; line-height: 1.25; }
}
@media (max-width: 360px) {
  #juji-site-header .site-brand > span { display: none; }
  #juji-site-nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { #juji-site-header * { transition: none !important; scroll-behavior: auto !important; } }
