<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
    <meta name="theme-color" content="#0d4a8a" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="default" />
    <meta name="apple-mobile-web-app-title" content="Marshal" />
    <link rel="apple-touch-icon" href="/icons/apple-touch-icon.svg" />
    <title>Marshal</title>
    <!-- App identity: diagnose.sh checks this; must not be served from :5173 (web). -->
    <meta name="marshal-app" content="pwa" />
    <!-- cache-epoch: 2026-11-26-no-a2hs -->
    <script>
      (function () {
        var path = location.pathname;
        if (path === '/login' || path.indexOf('/auth/') === 0) {
          document.documentElement.classList.add('boot-plain');
        }
      })();
    </script>
    <style>
      html, body, #root { margin: 0; height: 100%; background: #f2f2f7; color: #1c1c1e; }
      html.boot-plain #boot-shell { display: none; }
      #boot-shell { position: fixed; inset: 0; background: #f2f2f7; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
      .boot-header { position: absolute; top: 0; left: 0; right: 0; padding: env(safe-area-inset-top, 0px) 16px 0; background: #e8eef6; border-bottom: 4px solid #30b0a0; }
      .boot-header-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding-right: 12px; padding-left: 12px; }
      .boot-lockup { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; flex: none; width: 131px; color: #0d3f67; font: 600 12px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; letter-spacing: -0.02em; }
      .boot-lockup img { height: 32px; width: 131px; display: block; }
      .boot-header .shell-skeleton-line { width: 4.5rem; }
      .boot-club { width: 88px; height: 40px; border-radius: 8px; background: #e3e8ee; flex: none; }
      .boot-skeleton { box-sizing: border-box; display: flex; flex-direction: column; min-height: 100%; padding: 76px 16px 16px; }
      .boot-card, .shell-skeleton-line { position: relative; overflow: hidden; background: #e3e8ee; }
      .boot-card { height: 92px; margin-bottom: 12px; border-radius: 16px; }
      .boot-card--title { height: 76px; border-radius: 18px; }
      .boot-card--tall { flex: 1; height: auto; min-height: 148px; }
      .shell-skeleton-line { display: inline-block; width: 7.5rem; height: 0.7rem; border-radius: 999px; }
      .boot-card::after, .shell-skeleton-line::after {
        content: ""; position: absolute; inset: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.72), transparent);
        transform: translateX(-100%);
        animation: shell-shimmer 1.35s ease-in-out infinite;
      }
      @media (prefers-reduced-motion: reduce) {
        .boot-card::after, .shell-skeleton-line::after { animation: none; }
      }
      @keyframes shell-shimmer { 100% { transform: translateX(100%); } }
      .floating-tab-bar {
        position: fixed; z-index: 30; left: 0; right: 0; isolation: isolate;
        width: max-content; max-width: calc(100% - 16px); margin: 0 auto;
        bottom: max(2px, calc(env(safe-area-inset-bottom, 0px) - 12px));
        height: 56px; box-sizing: border-box; padding: 4px 6px; border-radius: 28px;
        border: 1px solid rgba(255,255,255,0.72);
        background: transparent;
        box-shadow: 0 0 0 0.5px rgba(13,63,103,0.16), 0 8px 28px rgba(13,63,103,0.12);
      }
      .floating-tab-bar::before {
        content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
        background: rgba(255,255,255,0.88);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
      }
      @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
        .floating-tab-bar::before {
          background: rgba(255,255,255,0.68);
          -webkit-backdrop-filter: blur(40px) saturate(180%);
          backdrop-filter: blur(40px) saturate(180%);
        }
      }
      .floating-tab-bar__track { position: relative; z-index: 1; display: flex; align-items: stretch; height: 100%; }
      .floating-tab {
        position: relative; z-index: 1; display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center;
        gap: 1px; min-width: 44px; height: 100%; padding: 3px 12px 4px; border: 0; border-radius: 16px; background: transparent;
        color: #3a3a3c; font: 600 12px/14px -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
        text-decoration: none;
      }
      .floating-tab.is-active { background: rgba(13,74,138,0.14); color: #0d4a8a; }
      .floating-tab svg { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; shape-rendering: geometricPrecision; filter: none; }
      .floating-tab svg * { vector-effect: non-scaling-stroke; shape-rendering: geometricPrecision; }
      @media (min-width: 1280px) { .floating-tab-bar { display: none; } }
    </style>
    <script>
      // If a hashed bundle 404s (stale iOS / SW cache after deploy), drop
      // caches once and reload so the next navigation gets current assets.
      (function () {
        var key = 'marshal-pwa-asset-recover';
        function recover() {
          if (sessionStorage.getItem(key)) return;
          sessionStorage.setItem(key, '1');
          var done = Promise.resolve();
          if (navigator.serviceWorker) {
            done = navigator.serviceWorker.getRegistrations().then(function (regs) {
              return Promise.all(regs.map(function (r) { return r.unregister(); }));
            });
          }
          done
            .then(function () {
              return typeof caches === 'undefined'
                ? undefined
                : caches.keys().then(function (names) {
                    return Promise.all(names.map(function (n) { return caches.delete(n); }));
                  });
            })
            .finally(function () {
              location.reload();
            });
        }
        window.addEventListener(
          'error',
          function (e) {
            var t = e.target;
            if (t && (t.tagName === 'SCRIPT' || t.tagName === 'LINK')) recover();
          },
          true,
        );
      })();
    </script>
    <script type="module" crossorigin src="/assets/index-clI--66x.js"></script>
    <link rel="modulepreload" crossorigin href="/assets/vendor-3N4cq3MT.js">
    <link rel="stylesheet" crossorigin href="/assets/index-D0rurRRH.css">
  <link rel="manifest" href="/manifest.webmanifest"></head>
  <body>
    <div id="root">
      <div id="boot-shell">
        <header class="boot-header">
          <div class="boot-header-row">
            <span class="boot-lockup">
              <img src="/brand/marshal/wave.svg" alt="" width="131" height="32" />
              <span data-boot-brand>Marshal</span>
            </span>
            <span class="shell-skeleton-line"></span>
            <span class="boot-club"></span>
          </div>
        </header>
        <div class="boot-skeleton" aria-busy="true" aria-label="Loading">
          <div class="boot-card boot-card--title"></div>
          <div class="boot-card"></div>
          <div class="boot-card boot-card--tall"></div>
          <div class="boot-card"></div>
        </div>
        <nav class="floating-tab-bar" aria-label="Main">
          <div class="floating-tab-bar__track" id="boot-tabs"></div>
        </nav>
      </div>
    </div>
    <script>
      (function () {
        var hrefs = { home: '/', meets: '/meets', sessions: '/sessions', store: '/store', coach: '/coach', feedback: '/feedback', me: '/me', copilot: '/co-pilot' };
        var labels = { home: 'Home', meets: 'Meets', sessions: 'Sessions', store: 'Store', coach: 'Coach', feedback: 'Feedback', me: 'Me', copilot: 'Co-pilot' };
        function glyph(inner) {
          return '<svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" shape-rendering="geometricPrecision" aria-hidden="true">' + inner + '</svg>';
        }
        var shapes = {
          home: '<path d="M4 10.6 12 3.8l8 6.8V20a1 1 0 0 1-1 1h-5.2v-6.2h-3.6V21H5a1 1 0 0 1-1-1z"/>',
          meets: '<path d="M8 4h8v5a4 4 0 0 1-8 0z"/><path d="M8 6H5.2a2.2 2.2 0 0 0 0 4.4H8M16 6h2.8a2.2 2.2 0 0 1 0 4.4H16"/><path d="M12 13v4M8 21h8"/>',
          sessions: '<rect x="4" y="5" width="16" height="15" rx="2"/><path d="M4 10h16M8 3v4M16 3v4"/>',
          store: '<path d="M6.5 8h11l.8 11.2a1.4 1.4 0 0 1-1.4 1.5H7.1a1.4 1.4 0 0 1-1.4-1.5z"/><path d="M9 8V6.6a3 3 0 0 1 6 0V8"/>',
          coach: '<rect x="7" y="3" width="10" height="4" rx="1"/><path d="M9 5h6"/><rect x="5" y="7" width="14" height="13" rx="2"/><path d="M8 12h8M8 15.5h5"/>',
          feedback: '<path d="M5 5h14a1.5 1.5 0 0 1 1.5 1.5V14a1.5 1.5 0 0 1-1.5 1.5H9l-4 3.5V15.5H5A1.5 1.5 0 0 1 3.5 14V6.5A1.5 1.5 0 0 1 5 5z"/><path d="M8 9h8M8 12h5"/>',
          me: '<circle cx="12" cy="8" r="3.2"/><path d="M5.4 19.2c.7-3.1 3.2-5 6.6-5s5.9 1.9 6.6 5"/>',
          copilot: '<rect x="9" y="3" width="6" height="10" rx="3"/><path d="M6.5 11a5.5 5.5 0 0 0 11 0M12 16.5V20M9 21h6"/>',
          more: '<circle cx="6" cy="12" r="1.2"/><circle cx="12" cy="12" r="1.2"/><circle cx="18" cy="12" r="1.2"/>'
        };
        var tabs = ['home', 'meets', 'sessions', 'store'];
        try {
          var saved = JSON.parse(localStorage.getItem('marshal.pwa.navPrimary.v1') || 'null');
          if (Array.isArray(saved)) {
            var clean = saved.filter(function (id) { return hrefs[id]; }).slice(0, 4);
            if (clean.length === 4) tabs = clean;
          }
        } catch (e) {}
        var path = location.pathname;
        var index = 4;
        for (var i = 0; i < tabs.length; i++) {
          var href = hrefs[tabs[i]];
          if (href === '/' ? path === '/' : path === href || path.indexOf(href + '/') === 0) { index = i; break; }
        }
        var html = '';
        for (var j = 0; j < tabs.length; j++) {
          var id = tabs[j];
          var on = j === index;
          html += '<a class="floating-tab' + (on ? ' is-active' : '') + '" href="' + hrefs[id] + '"' + (on ? ' aria-current="page"' : '') + '>' + glyph(shapes[id] || shapes.home) + '<span>' + labels[id] + '</span></a>';
        }
        html += '<button type="button" class="floating-tab' + (index === 4 ? ' is-active' : '') + '"' + (index === 4 ? ' aria-current="page"' : '') + '>' + glyph(shapes.more) + '<span>More</span></button>';
        var track = document.getElementById('boot-tabs');
        if (track) track.innerHTML = html;
      })();
    </script>
  </body>
</html>
