/* The app bar at the top of every app (Action Atlas, Move Explorer, Trends), filled by shared/appbar.js: the Funsmith
   club link, the library title and the app switcher. One copy, so switching apps never moves or reshapes it. Its own
   row rules use .hrow.approw so an app's .hrow rules for its tool rows below cannot change the bar's spacing */
.brand{display:flex;align-items:baseline;gap:4px 10px;min-width:0;flex-wrap:wrap}
.club{display:inline-flex;align-items:center;gap:7px;color:var(--fg);text-decoration:none;font-family:var(--display);font-weight:700;font-size:14px;white-space:nowrap;padding:4px 10px 4px 8px;border:1px solid var(--line);border-radius:6px}
.club:hover{border-color:#5865f2}
.club svg{width:20px;height:20px;fill:#5865f2;flex:none}
.brand h1{font-family:var(--display);font-weight:800;font-size:22px;letter-spacing:-.02em;margin:0;text-wrap:balance}
.brand h1 a{color:inherit;text-decoration:none}
.brand h1 a:hover{text-decoration:underline;text-underline-offset:3px}
.brand .tagline{font-size:13px;color:var(--muted);font-style:italic}
/* app switcher: its own row with the brand, styled as underlined tabs so it never reads as one of the filled filter toggles below */
.hrow.approw{display:flex;flex-wrap:wrap;gap:16px;padding-block:12px 0;border-bottom:1px solid var(--line);align-items:flex-end}
.approw .club,.approw .brand{align-self:center;margin-bottom:12px}
.apps{display:flex;gap:0 28px;flex-wrap:wrap;margin-left:8px}
.apps a{display:flex;gap:8px;align-items:center;padding:3px 2px 6px;margin-bottom:-1px;border-bottom:3px solid transparent;color:var(--muted);text-decoration:none}
/* each app has its own badge colour and glyph (from game-icons.net); the colour also marks the current app */
.apps .ico{display:grid;place-items:center;width:28px;height:28px;flex:none;border-radius:7px;background:var(--app)}
.apps .ico svg{width:20px;height:20px;fill:#fff}
.apps a[aria-current="page"]{color:var(--fg);border-bottom-color:var(--app)}
.apps a:not([aria-current]) .ico{opacity:.8}
.apps a:not([aria-current]):hover{color:var(--fg);border-bottom-color:var(--line)}
.apps a:not([aria-current]):hover .ico{opacity:1}
.apps b{display:block;font-family:var(--display);font-size:16px;font-weight:700;line-height:1.1}
.apps small{display:block;font-size:12px;line-height:1.2}
/* phones: two short rows, the club as its Discord icon alone with the title on one line, then name-only app buttons
   that scroll sideways rather than wrapping on the narrowest screens */
@media (max-width:820px){
  .hrow.approw{gap:6px 8px;padding-block:6px}
  .approw .club,.approw .brand{margin-bottom:6px}
  .club{padding:4px 6px}
  .club span{display:none}
  .brand{flex:1 1 0}
  .brand h1{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .brand .tagline{display:none}
  .apps{margin-left:0;gap:0 12px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
  .apps a{gap:5px;padding:2px 1px 5px;margin-bottom:0;white-space:nowrap}
  .apps .ico{width:22px;height:22px;border-radius:6px}
  .apps .ico svg{width:15px;height:15px}
  .apps small{display:none}
  .apps b{font-size:14px}
}
/* switching apps loads the next app's page; where the browser supports it, the bar holds still while the app below
   cross-fades in (elsewhere the page simply loads, as before) */
@view-transition{navigation:auto}
.approw{view-transition-name:appbar}
::view-transition-group(appbar),::view-transition-new(appbar){animation:none}
::view-transition-old(appbar){display:none}
@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}

.theme-toggle{margin-left:auto;align-self:center;margin-bottom:12px;display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--fg);padding:5px;cursor:pointer;font:12px var(--body);white-space:nowrap}
.theme-track{width:34px;height:20px;border-radius:999px;background:var(--muted);position:relative;transition:background .2s}
.theme-thumb{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--bg);transition:transform .2s}
.theme-toggle[aria-checked="true"] .theme-track{background:var(--key)}
.theme-toggle[aria-checked="true"] .theme-thumb{transform:translateX(14px)}
@media (prefers-reduced-motion:reduce){.theme-track,.theme-thumb{transition:none}}
.theme-toggle:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
@media (max-width:820px){.theme-toggle{order:0;margin-bottom:6px}.apps{order:1;flex-basis:100%}}
.apps a[hidden]{display:none}
