/* review4d — nav fit for the long tab name "East-West Astro Hub / 东西玄学局".
   Loaded by old static pages (added by tools/rename-tab.py); the same rules live at the end of studio.css for v9 pages.
   Top nav 761–1279px: full tab names, never cut, never abbreviated; ≥14px; English tabs may wrap to two lines inside the tab.
   Bottom bar: the astro tab is two fixed lines (East-West / Astro Hub, 东西 / 玄学局) when one line does not fit. */
.mast nav a .tn{white-space:nowrap}
@media (min-width:761px) and (max-width:1440px){.mast nav a{letter-spacing:0}}
@media (min-width:761px) and (max-width:1279px){
 .mast{gap:16px}
 .mast .logo{font-size:40px;letter-spacing:-1.5px;flex-shrink:0}
 .mast nav{gap:14px!important;padding-left:14px;min-width:0;flex:1 1 auto;overflow:visible!important}
 .mast nav a{font-size:14px;line-height:1.25;flex:0 1 auto;white-space:nowrap}
 html[lang^=en] .mast nav a{white-space:normal}
 .mast nav a.current:after{bottom:-10px}
 .mast-tools{gap:8px;flex-shrink:0;margin-left:auto}
 .mast-tools .pill,.mast .pill{padding:8px 12px;font-size:14px}
 @media (max-width:900px){.mast .logo{font-size:36px;letter-spacing:-1px}.mast nav{gap:10px!important;padding-left:10px}.mast-tools{gap:6px}.mast-tools .pill,.mast .pill{padding:7px 10px}}
}
/* English tabs stack word by word only where one line cannot fit; spacing stays even */
@media (min-width:1101px) and (max-width:1279px){.mast nav a{font-size:17px}.mast nav{gap:18px!important}}
@media (min-width:761px) and (max-width:879px){html[lang^=en] .mast nav a{flex:0 0 auto;width:min-content;white-space:normal}}
nav.bottom .t2>span{white-space:nowrap}
@media (max-width:600px){nav.bottom a{line-height:1.15}html[lang^=en] nav.bottom .t2>span{display:block}}
@media (max-width:374px){nav.bottom .t2>span{display:block}}
/* review5 nav (design v1.1): >=1024 one row, current item as a pill; 761-1023 nav drops to a second row of 5 equal cells, full names. */
@media (min-width:1024px){
 .mast nav a.current,.mast nav a[aria-current="page"]{background:#23261b;color:#f3ecde;border-radius:99px;padding:4px 14px;margin:-4px -6px;text-decoration:none!important;box-shadow:none!important}
 .mast nav a.current::after,.mast nav a[aria-current="page"]::after{display:none!important}
}
@media (min-width:761px) and (max-width:1023px){
 .mast{flex-wrap:wrap!important;height:auto!important;row-gap:12px!important;padding-bottom:12px}
 .mast .logo{order:1}.mast .mast-tools{order:2;margin-left:auto}
 .mast nav{order:3;flex:1 0 100%!important;width:100%;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px!important;overflow:visible!important;margin:0!important}
 .mast nav a{display:flex!important;align-items:center;justify-content:center;text-align:center;background:#17180f;border-radius:12px;padding:8px 4px!important;min-height:44px;font-size:15px!important;line-height:1.25;white-space:normal!important;width:auto!important;flex:none!important;color:#b5b7ab;text-decoration:none!important;letter-spacing:0}
 .mast nav a.current,.mast nav a[aria-current="page"]{background:#f3ecde;color:#111!important;font-weight:600}
 .mast nav a.current::after,.mast nav a[aria-current="page"]::after{display:none!important}
 .mast nav a .tn{white-space:nowrap}
}

/* review5 QA: 761–1023 nav cells — keep the space between the two word spans (flex drops it), inner padding so text never touches the pill, no divider line before the grid */
@media (min-width:761px) and (max-width:1023px){.mast nav::before{display:none!important}.mast nav a{flex-wrap:wrap;padding:8px 10px!important}html[lang^=en] .mast nav a{column-gap:.3em}}
