.app-header {
  position: sticky; top: 0; z-index: 30; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-header__inner {
  max-width: var(--content-max); margin: 0 auto; height: 100%; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: var(--space-5);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 28px; height: 28px; flex: none; }
.brand__name { font: 700 1.375rem/1 var(--font-display); letter-spacing: 0.01em; white-space: nowrap; }
.brand__name span { font-weight: 500; color: var(--ink-2); }

.nav { display: flex; gap: var(--space-1); margin-left: var(--space-3); }
.nav a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-s);
  text-decoration: none; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current='page'] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -3px 0 var(--turf); border-radius: var(--radius-s) var(--radius-s) 0 0; }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.sport-select { min-height: 36px; width: 164px; font-weight: 600; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-s); color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.page { max-width: var(--content-max); margin: 0 auto; padding: var(--space-5) var(--gutter) var(--space-8); }

.tabbar { display: none; }

.app-footer { max-width: var(--content-max); margin: 0 auto; padding: var(--space-5) var(--gutter) var(--space-8); color: var(--ink-3); font-size: var(--step--1); }
.app-footer__inner { border-top: 1px solid var(--line); padding-top: var(--space-4); display: grid; gap: var(--space-2); max-width: 78ch; }
.app-footer a { color: var(--ink-2); }

@media (max-width: 719px) {
  .app-header__inner { gap: var(--space-3); }
  .nav { display: none; }
  .sport-select { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none;
    font-size: 0.6875rem; font-weight: 600; color: var(--ink-3); position: relative;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current='page'] { color: var(--ink); }
  .tabbar a[aria-current='page']::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--turf); }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .app-footer { padding-bottom: var(--space-6); }
}
