/* Site navigation, shared by every page (rendered by api/i18n.py _nav / _subnav, signed-in state by nav.js).
   Three places — 復盤 review, 挑戰 play, 隊友 squad — plus the lobby behind the logo. The current place is marked with
   the logo's orange light dot instead of an underline, so the header and the mark read as one thing. */
.gnav { position: sticky; top: 0; z-index: 40; background: rgba(8, 11, 16, .86); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.gnav-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 64px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(20px, 3vw, 44px); }
.gnav .brand { font-size: 24px; gap: 8px; }

.gnav-main { display: flex; gap: 2px; }
.gnav-main a { position: relative; padding: 10px 14px; color: var(--mute); text-decoration: none; font: 600 15px/1 var(--body);
  border-radius: 6px; white-space: nowrap; }
.gnav-main a:hover { color: var(--fg); background: rgba(150, 170, 200, .06); }
.gnav-main a[aria-current] { color: var(--fg); }
.gnav-main a[aria-current]::after { content: ''; position: absolute; left: 50%; bottom: -1px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--t); box-shadow: 0 0 10px 1px rgba(233, 162, 59, .7); }

.gnav-side { display: flex; align-items: center; gap: 18px; }
.gnav-wall { color: var(--mute); text-decoration: none; font-size: 14px; white-space: nowrap; }
.gnav-wall:hover { color: var(--fg); }
.gnav .lang { position: relative; margin: 0; }
.gnav .lang summary { list-style: none; cursor: pointer; color: var(--mute); font-size: 14px; white-space: nowrap; }
.gnav .lang summary::-webkit-details-marker { display: none; }
.gnav .lang[open] summary, .gnav .lang summary:hover { color: var(--fg); }
.gnav .lang ul { position: absolute; right: 0; top: 34px; z-index: 50; list-style: none; margin: 0; padding: 8px 0; min-width: 170px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; }
.gnav .lang li a { display: block; padding: 7px 16px; margin: 0; color: #c6cfdb; text-decoration: none; font-size: 14px; }
.gnav .lang li a:hover, .gnav .lang li a[aria-current] { color: var(--fg); background: rgba(150, 170, 200, .08); }

/* account: a sign-in button, or the player's avatar with a small menu */
.gnav-me { min-width: 64px; display: flex; justify-content: flex-end; }
.gnav-login { padding: 8px 14px; border: 1px solid rgba(150, 170, 200, .32); border-radius: 6px; color: var(--fg); text-decoration: none;
  font: 600 14px/1 var(--body); white-space: nowrap; }
.gnav-login:hover { border-color: var(--fg); }
.gnav-acct { position: relative; }
.gnav-acct summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; color: var(--fg); font-size: 14px; }
.gnav-acct summary::-webkit-details-marker { display: none; }
.gnav-acct summary img, .gnav-acct summary .ini { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.gnav-acct summary .ini { display: grid; place-items: center; background: #1b2433; color: #c6cfdb; font-weight: 700; font-size: 13px; }
.gnav-acct summary span.nm { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gnav-acct ul { position: absolute; right: 0; top: 42px; z-index: 50; list-style: none; margin: 0; padding: 8px 0; min-width: 180px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; }
.gnav-acct li a, .gnav-acct li button { display: block; width: 100%; text-align: left; padding: 8px 16px; color: #c6cfdb; text-decoration: none;
  font: 400 14px/1.4 var(--body); background: none; border: 0; cursor: pointer; }
.gnav-acct li a:hover, .gnav-acct li button:hover { color: var(--fg); background: rgba(150, 170, 200, .08); }
.gnav-acct li.sep { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* a place's own tabs (復盤: 戰績 / 每週練習 / CS 人格 …) */
.subnav { border-bottom: 1px solid var(--line); }
.subnav-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.subnav-in::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 15px 0 13px; color: var(--mute); text-decoration: none; font-size: 15px; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--fg); }
.subnav a[aria-current] { color: var(--fg); border-bottom-color: var(--t); }

/* phone: the three places move to a tab bar under the thumb */
.tabbar { display: none; }
@media (max-width: 760px) {
  .gnav-in { height: 56px; grid-template-columns: auto 1fr; gap: 12px; }
  .gnav .brand { font-size: 21px; }
  .gnav .brand-mark { width: 24px; height: 24px; }
  .gnav-main, .gnav-wall { display: none; }
  .gnav-side { justify-content: flex-end; gap: 14px; }
  .gnav-acct summary span.nm { display: none; }
  .subnav-in { gap: 22px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 0 0 env(safe-area-inset-bottom); background: rgba(8, 11, 16, .94); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px;
    color: var(--mute); text-decoration: none; font-size: 11px; line-height: 1.2; }
  .tabbar svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current] { color: var(--fg); }
  .tabbar a[aria-current]::before { content: ''; position: absolute; top: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px;
    border-radius: 50%; background: var(--t); box-shadow: 0 0 8px 1px rgba(233, 162, 59, .7); }
  body:has(.tabbar) { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-transparency: reduce) { .gnav, .tabbar { background: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; } }
html.in-app a[href*="/pricing"], html.in-app .plan-line { display: none !important; }
