/* App navigation (layouts/app.html): top bar on every screen, bottom tab bar on phones,
   a side sheet for everything else. The app is the door, not the room: four tabs, no feed. */
.topbar { position: sticky; top: 0; z-index: 1030; height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .page-wrap { height: 100%; display: flex; align-items: center; gap: var(--space-3); }
.topbar .logo { margin-right: auto; }
.topnav { display: none; gap: 4px; position: absolute; left: 50%; transform: translateX(-50%); }
.topnav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.topnav a:hover { color: var(--text); background: var(--tint); }
.topnav a[aria-current="page"] { color: var(--text); background: var(--tint); }
@media (min-width: 992px) { .topnav { display: flex; } }
.topbar .tools { display: flex; align-items: center; gap: 6px; }
.city-pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; }
.city-pill .icon { width: 16px; height: 16px; }
.city-label-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 8px 6px 0;
  min-height: 32px; cursor: pointer; }
.city-label-btn .icon:last-child { width: 14px; height: 14px; }
.city-label-btn:hover { color: var(--text); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden;
  background: var(--cmu-marigold-light); color: var(--cmu-ink); font-family: var(--font-display); font-weight: 800; font-size: 14px; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 72px; height: 72px; font-size: 26px; }
.avatar--xl { width: 96px; height: 96px; font-size: 34px; }

/* Bottom tab bar: phones only */
.tabbar { position: fixed; z-index: 1030; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--text-muted);
  text-decoration: none; font-size: 11.5px; font-weight: 700; }
.tabbar a .icon { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] .icon { stroke-width: 2.4; }
.tabbar a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cmu-marigold);
  position: absolute; top: 5px; left: 50%; margin-left: -3px; }
@media (min-width: 992px) { .tabbar { display: none; } }

/* Side sheet (the "more" menu) */
.side-menu .offcanvas-header { border-bottom: 1px solid var(--line); justify-content: space-between; gap: 12px; }
.side-menu .side-menu-who { min-width: 0; flex: 1 1 auto; }
.side-menu .side-menu-who .min-w-0 { min-width: 0; }
.side-menu .side-menu-close { margin-left: auto; flex: none; }
.menu-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 600; background: none; border: 0; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--tint); }
.menu-list .icon { color: var(--text-muted); }
.menu-group { padding: 14px 20px 4px; }

/* Back link at the top of inner pages */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); text-decoration: none;
  font-weight: 600; font-size: 14.5px; min-height: 44px; }
.back-link:hover { color: var(--text); }
.topbar .btn-icon[aria-current="page"] { background: var(--cmu-marigold-light); color: var(--cmu-ink); }
.topbar .btn-icon[aria-current="page"] .icon-toggle, .topbar .btn-icon[aria-current="page"] .icon { fill: none; }
@media (display-mode: standalone) { [data-pwa-topbar] { display: none !important; } }
