/* ── shared.css ────────────────────────────────────────────────*/

  /* NAV */
  #sticky-header { position: sticky; top: 0; z-index: 50; }
  .guest-banner {
    display: none;
    background: #8B1A1A;
    color: white;
    padding: 9px 20px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    align-items: center;
    gap: 12px;
  }
  .guest-banner-text { flex: 1; font-weight: 400; opacity: 0.92; }
  .guest-banner-btn {
    padding: 5px 14px;
    background: white;
    color: #8B1A1A;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
  }
  nav {
    background: var(--brand-primary);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: relative;
  }
  /* Thin per-club accent strip laid directly against the bottom of the nav —
     see js/auth.js's initClubApp(), which always reveals it and sets its
     background to clubs.accent_color, or the SABC red fallback
     (BRANDING_DEFAULT_ACCENT, js/branding.js) when that column is NULL —
     never gated on the raw column being set. display:none here is only the
     pre-boot state, avoiding a flash of the strip before initClubApp() has
     run. Positioned absolutely against nav's own bottom edge (nav is its
     containing block) rather than flowed as a sibling box, so it paints
     flush over the last 3px of the nav's own background with zero
     possibility of a gap or sliver of nav background showing beneath it —
     same 3px thickness as the landing page's nav border-bottom accent,
     which this mirrors. */
  #nav-accent-strip { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
  .nav-actions { flex-shrink: 0; }
  .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--nav-text);
    text-decoration: none;
    min-width: 0;
    flex-shrink: 1;
  }
  .nav-brand > div { min-width: 0; overflow: hidden; }
  .nav-crest {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
  }
  .nav-title {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* nav-title-short is the club's short_name (or full name if it has none) —
     shown only below the 768px mobile breakpoint (css/mobile.css), where
     nav-title-full (clubs.name) switches to display:none. Both rely on
     .nav-title's existing white-space:nowrap/ellipsis handling (the
     2026-07-13 nav-wrapping fix) as their own truncation safety net at
     in-between widths — no new text-measurement logic needed. */
  #nav-title-short { display: none; }
  .nav-subtitle { font-size: 11px; opacity: 0.6; margin-top: 1px; }
  .nav-links { display: flex; gap: 4px; flex-shrink: 0; }
  .nav-link {
    color: var(--nav-text);
    opacity: 0.7;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    font-family: inherit;
  }
  .nav-link.active { background: var(--nav-active-bg); opacity: 1; }
  /* :hover's overlay is deliberately still a fixed white tint, NOT split
     alongside .active above — a transient hover highlight fading into a
     light custom primary is a minor polish gap, not a readability break
     (the tab's text stays legible via --nav-text either way), so it's
     flagged rather than fixed in this pass. */
  .nav-link:hover { background: rgba(255,255,255,0.1); opacity: 1; }

  /* MAIN */
  main { max-width: 960px; margin: 0 auto; padding: 28px 20px; }
  body.is-captain main { max-width: none; padding: 28px 32px; }
  main.sv-grid-mode { max-width: 904px; margin: 0 auto; }
  main:has(#page-sessions:not([style*="display: none"])) { max-width: none; }
  main:has(#page-availability:not([style*="display: none"])) { max-width: none; }
  main:has(#page-training:not([style*="display: none"])) { max-width: none; }
  main:has(#page-coaches:not([style*="display: none"])) { max-width: none; }

  /* PAGE HEADER */
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
  }
  .page-header h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 26px;
    font-weight: 400;
    color: var(--text);
  }
  .page-header p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
  .av-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
  .week-nav { display: flex; align-items: center; gap: 10px; }
  .week-nav span { font-size: 14px; color: var(--text-secondary); font-weight: 500; min-width: 160px; text-align: center; }
  .btn-nav {
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.15s;
  }
  .btn-nav:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); }

  /* MODAL */
  .modal-bg {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: center; justify-content: center;
    backdrop-filter: blur(2px);
  }
  /* .closing plays the backdrop out first so that if the same element gets
     reopened mid-close (double-tap), .open — declared after, same specificity
     — wins the cascade tie and snaps back to fully visible. See js/utils.js
     _injectClosingClass, which adds/removes .closing on the same overlay set
     this file's .open toggles already drive (MODAL_OVERLAY_SELECTOR). */
  .modal-bg.closing { display: flex; animation: modal-bg-out 190ms ease-out forwards; }
  .modal-bg.open { display: flex; animation: modal-bg-in 200ms ease-out forwards; }
  @keyframes modal-bg-in  { from { opacity: 0; } to { opacity: 1; } }
  @keyframes modal-bg-out { from { opacity: 1; } to { opacity: 0; } }
  .modal {
    background: var(--surface);
    border-radius: var(--radius);
    border: 0.5px solid var(--border-strong);
    padding: 24px;
    width: 92vw;
    max-width: 740px;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    animation: modal-pop-in 300ms var(--spring-ease) forwards;
  }
  /* Higher specificity than the bare .modal rule above, so closing always
     wins over the default open/in animation regardless of source order. */
  .modal-bg.closing .modal { animation: modal-pop-out 190ms ease-out forwards; }
  @keyframes modal-pop-in {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }
  @keyframes modal-pop-out {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.95) translateY(8px); }
  }
  .modal h3 { font-family: 'DM Serif Display', serif; font-size: 18px; font-weight: 400; margin-bottom: 4px; }
  .modal-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
  .modal-notice {
    margin-bottom: 12px; padding: 8px 12px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 500; line-height: 1.5;
    display: none;
  }
  .modal-notice.conflict { background: #fee2e2; color: #991b1b; border: 0.5px solid #fca5a5; display: block; }
  .modal-notice.soft-warn { background: #fef9c3; color: #713f12; border: 0.5px solid #d97706; display: block; }
  .uopt.blocked { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
  .uopt-block-reason { font-size: 10px; color: #dc2626; font-weight: 500; }
  .btn-signup-blocked {
    flex: 1; border: 0.5px solid #fca5a5; border-radius: 5px;
    background: #fee2e2; font-size: 11px; color: #991b1b;
    padding: 3px 6px; text-align: center; font-family: inherit;
    cursor: not-allowed; font-weight: 500;
  }
  .user-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
  .uopt {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 0.5px solid var(--border);
    cursor: pointer;
    transition: all 0.12s;
  }
  .uopt:hover { background: var(--bg); }
  .uopt.sel { background: var(--navy-light); border-color: var(--navy-mid); }
  .uopt .un { font-size: 13px; font-weight: 500; }
  .uopt .us { font-size: 11px; color: var(--text-secondary); }
  /* Modal sign-up redesign */
  .modal-section-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
  .modal-sug-section { margin-bottom: 10px; }
  .modal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .modal-chip { padding: 5px 12px; border-radius: 20px; border: 0.5px solid var(--border-strong); background: var(--surface); font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.12s; color: var(--text); font-family: inherit; }
  .modal-chip:hover { background: var(--bg); }
  .modal-chip.sel { background: var(--navy-light); border-color: var(--navy-mid); color: var(--navy-dark); }
  .modal-chip.blocked { opacity: 0.4; cursor: not-allowed; }
  .modal-search-wrap { margin-bottom: 6px; }
  .modal-search-input { width: 100%; padding: 8px 12px; border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; outline: none; background: var(--bg); color: var(--text); box-sizing: border-box; }
  .modal-search-input:focus { border-color: var(--navy-mid); }
  .modal-search-results { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
  .modal-guest-wrap { margin-top: 10px; padding-top: 10px; border-top: 0.5px solid var(--border); }
  .modal-guest-row { display: flex; gap: 8px; margin-top: 6px; }
  .modal-guest-input { flex: 1; padding: 7px 10px; border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; outline: none; background: var(--bg); color: var(--text); min-width: 0; }
  .modal-guest-input:focus { border-color: var(--navy-mid); }
  .modal-guest-btn { padding: 7px 14px; background: var(--nav-navy); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
  .modal-btns { display: flex; gap: 8px; }
  .modal-btns button {
    flex: 1; padding: 9px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; transition: all 0.15s;
  }
  .b-ok { background: var(--nav-navy); color: white; border: none; }
  .b-ok:hover { background: var(--navy-mid); }
  .b-no { background: var(--surface); color: var(--text); border: 0.5px solid var(--border-strong); }
  .b-no:hover { background: var(--bg); }

  /* Modal two-panel layout */
  .modal-panels {
    flex: 1;
    min-height: 0;
    display: flex;
    margin: 0 -24px 16px;
    overflow: hidden;
  }
  .modal-info-panel {
    display: none;
    width: 220px;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 4px 12px 12px 14px;
    border-right: 0.5px solid var(--border);
  }
  .modal-info-panel.mip-open {
    display: flex;
    flex-direction: column;
  }
  .modal-signup-col {
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    padding: 0 24px;
  }
  /* Mobile summary tap-line (hidden on desktop) */
  .mip-summary {
    display: none;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 0.5px solid var(--border);
    padding: 9px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
  }
  .mip-chevron { font-size: 10px; margin-left: 6px; }
  .mip-detail { flex: 1; overflow-y: auto; padding: 4px 0; }
  .mip-side-badge {
    font-size: 9px; font-weight: 600;
    color: #6b7280; background: #f3f4f6;
    border-radius: 3px; padding: 1px 4px;
    flex-shrink: 0; margin-left: auto;
  }

  @media (max-width: 699px) {
    .modal-panels { flex-direction: column; }
    .modal-info-panel.mip-open {
      width: auto;
      border-right: none;
      border-bottom: 0.5px solid var(--border);
      padding: 0;
      overflow: visible;
      flex-shrink: 0;
    }
    .mip-summary { display: flex; }
    .mip-detail { display: none; padding: 8px 14px; max-height: 180px; overflow-y: auto; }
    .mip-detail.expanded { display: block; }
    .modal-signup-col { padding: 0 14px; }
  }

  /* NOTICE BANNER */
  .notice {
    background: var(--navy-light);
    border: 0.5px solid rgba(139,26,26,0.25);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--navy-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .notice-dot { width: 8px; height: 8px; background: var(--navy-mid); border-radius: 50%; flex-shrink: 0; }
  /* In dark mode the navy-light/navy-dark pairing loses too much contrast for
     body text, so the notice banner reads off var(--text) instead while
     keeping its navy-tinted background/border. */
  [data-theme="dark"] .notice { color: var(--text); }

  /* PLACEHOLDER PAGES */
  .placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
  }
  .placeholder h2 { font-family: 'DM Serif Display', serif; font-size: 22px; font-weight: 400; margin-bottom: 8px; color: var(--text); }
  .placeholder p { font-size: 14px; line-height: 1.6; }
  .placeholder .coming { display: inline-block; margin-top: 16px; font-size: 12px; background: var(--navy-light); color: var(--navy-dark); padding: 4px 12px; border-radius: 20px; font-weight: 500; }


  .toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 2px 0; }
  .toggle-wrap { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; vertical-align: middle; }
  .toggle-wrap input { opacity: 0; width: 0; height: 0; }
  .toggle-slider { position: absolute; inset: 0; cursor: pointer; background: var(--text-tertiary); border: 1px solid var(--border-strong); border-radius: 22px; transition: 0.2s; }
  .toggle-slider:before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; bottom: 2px; background: white; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.35); }
  input:checked + .toggle-slider { background: var(--nav-navy); border-color: var(--nav-navy); }
  input:checked + .toggle-slider:before { transform: translateX(18px); }
  .toggle-label { font-size: 13px; color: var(--text); }
  .toggle-sub { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

  /* PROFILE SWITCHER */
  .nav-right { display: flex; align-items: center; gap: 6px; position: relative; }
  .nav-profile-btn {
    display: flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,0.1); border: none; cursor: pointer;
    border-radius: var(--radius-sm); padding: 4px 10px 4px 5px;
    color: white; font-family: inherit; font-size: 13px; font-weight: 500;
    transition: background 0.15s;
  }
  .nav-profile-btn:hover { background: rgba(255,255,255,0.18); }
  .nav-av {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: white; flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.3);
  }
  .nav-profile-name { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1; color: #fff; }
  .nav-captain-badge {
    font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 8px;
    background: rgba(202,138,4,0.3); color: #fde68a; letter-spacing: 0.02em; line-height: 1.4;
  }

  /* CLUB SWITCHER DROPDOWN */
  .club-switcher-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 200;
    overflow: hidden;
  }
  .club-switcher-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    text-align: left;
    transition: background 0.12s;
  }
  .club-switcher-item:hover { background: var(--navy-light); }
  .club-switcher-item.current { background: var(--navy-light); }
  .club-switcher-item + .club-switcher-item { border-top: 0.5px solid var(--border); }
  .club-switcher-check { font-size: 11px; color: var(--navy-mid); flex-shrink: 0; width: 12px; }
  .club-switcher-name { flex: 1; font-weight: 600; }
  .club-switcher-role-pill {
    font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 8px;
    background: var(--nav-navy); color: rgba(255,255,255,0.85);
    letter-spacing: 0.02em; line-height: 1.4; white-space: nowrap; flex-shrink: 0;
  }

  /* NAV HAMBURGER & MOBILE DRAWER */
  #nav-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--nav-text);
    opacity: 0.85;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 4px 4px 8px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    min-width: 44px;
    min-height: 44px;
    transition: background 0.15s;
    flex-shrink: 0;
  }
  /* Hover overlay left as a fixed white tint — same "minor polish gap, not a
     readability break" reasoning as .nav-link:hover above. */
  #nav-hamburger:hover { background: rgba(255,255,255,0.1); }
  #nav-drawer {
    background: var(--brand-primary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, box-shadow 0.25s ease;
  }
  #nav-drawer.open {
    max-height: 520px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  .drawer-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 0 24px;
    background: none;
    border: none;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
    color: var(--nav-text);
    opacity: 0.85;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
  }
  /* Hover overlay left fixed, same reasoning as .nav-link:hover — text stays
     legible via --nav-text regardless. */
  .drawer-link:hover,
  .drawer-link:active { background: rgba(255,255,255,0.08); opacity: 1; }
  .drawer-link:last-child { border-bottom: none; }
  .drawer-divider { height: 0.5px; background: rgba(255,255,255,0.12); margin: 4px 0; }
  .drawer-signout { color: rgba(255,160,160,0.9); }
  .drawer-signout:hover,
  .drawer-signout:active { background: rgba(200,30,30,0.2); color: #fca5a5; }

  /* PROFILE POPOVER */
  .profile-popover {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 240px; z-index: 300; animation: pop 0.12s ease;
    max-height: 480px; display: none; flex-direction: column;
    overflow: hidden;
  }
  .profile-popover.open { display: flex; }
  #pp-member-list { overflow-y: auto; max-height: 260px; }
  .pp-head { padding: 12px 14px 10px; border-bottom: 0.5px solid var(--border); background: #fafaf8; }
  .pp-head-lbl { font-size: 10px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
  .pp-current { display: flex; align-items: center; gap: 9px; }
  .pp-cur-name { font-size: 13px; font-weight: 600; color: var(--text); }
  .pp-cur-meta { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
  .pp-section-lbl { font-size: 10px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.07em; padding: 10px 14px 4px; }
  .pp-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 14px; cursor: pointer; transition: background 0.1s;
  }
  .pp-item:hover { background: var(--bg); }
  .pp-item.is-me { background: var(--navy-light); }
  .pp-item-name { font-size: 13px; font-weight: 500; color: var(--text); flex: 1; }
  .pp-item-sub { font-size: 11px; color: var(--text-secondary); }
  .pp-star { font-size: 11px; }
  .pp-footer { padding: 9px 14px; border-top: 0.5px solid var(--border); font-size: 11px; color: var(--text-tertiary); text-align: center; line-height: 1.5; }


  /* Slide-out detail panel */
  .roster-panel-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.25); z-index: 150;
    backdrop-filter: blur(1px);
  }
  /* Reuses the same fade keyframes as .modal-bg — see that block for why
     .closing is declared before .open. Durations are sped up (160/150ms
     rather than the 200/190ms used for .modal-bg/.cp-panel-overlay) to stay
     ahead of/in sync with .roster-panel's own faster desktop slide below —
     see that rule for why this family deliberately doesn't share the
     --spring-ease timing used elsewhere. */
  .roster-panel-overlay.closing { display: block; animation: modal-bg-out 150ms ease-out forwards; }
  .roster-panel-overlay.open { display: block; animation: modal-bg-in 160ms ease-out forwards; }
  .roster-panel {
    position: fixed; top: 0; right: -480px; width: 460px; height: 100vh;
    background: var(--surface); border-left: 0.5px solid var(--border-strong);
    z-index: 151; overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0,0,0,0.1);
    display: flex; flex-direction: column;
    /* Deliberate exception to the app's shared --spring-ease treatment: this
       is the desktop/wide-screen right-edge slide (roster panel + coach/cox/
       crew pickers, which reuse this exact chrome) — Notion-style panel
       slide, fast and linear-ish with no overshoot, not a spring/bounce.
       (The mobile bottom-sheet/full-screen versions of these same elements
       are separately defined in css/mobile.css via #roster-panel/#cpk-panel
       etc. id selectors and keep their existing spring/ease treatment —
       untouched here.) Base (closed/closing) transition below is the close
       duration; .open defines its own (open) duration, so opening and
       closing animate at different speeds off the same `right` property,
       same trick as the rest of the app, just without a spring curve. */
    transition: right 160ms ease-out;
  }
  .roster-panel.open { right: 0; transition: right 180ms ease-out; }
  .rp-head {
    padding: 20px 20px 16px; border-bottom: 0.5px solid var(--border);
    display: flex; align-items: flex-start; gap: 12px; position: sticky;
    top: 0; background: var(--surface); z-index: 1; flex-shrink: 0;
  }
  .rp-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 600; color: white;
  }
  .rp-title { flex: 1; }
  .rp-name { font-family: 'DM Serif Display', serif; font-size: 20px; font-weight: 400; }
  .rp-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .rp-close {
    background: none; border: none; cursor: pointer;
    font-size: 18px; color: var(--text-tertiary); padding: 2px 6px;
    border-radius: var(--radius-sm); transition: all 0.1s;
  }
  .rp-close:hover { background: var(--bg); color: var(--text); }

  /* Coach/cox/crew picker sheets: bigger tap target than the base .rp-close
     (44x44pt touch target) while keeping the ✕ glyph itself the same size —
     only these three reuse .rp-close as a full-screen mobile sheet. */
  #cpk-panel .rp-close, #cxpk-panel .rp-close, #crpk-panel .rp-close {
    min-width: 44px; min-height: 44px; padding: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .rp-body { padding: 16px 20px; flex: 1; }
  .rp-section { margin-bottom: 20px; }
  .rp-section-title {
    font-size: 10px; font-weight: 600; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 10px;
  }
  .rp-field { margin-bottom: 10px; }
  .rp-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
  .rp-input {
    width: 100%; padding: 7px 10px; border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-sm); font-size: 13px; font-family: inherit;
    background: var(--surface); color: var(--text); outline: none;
  }
  .rp-input:focus { border-color: var(--navy-mid); }
  .rp-select {
    width: 100%; padding: 7px 10px; border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-sm); font-size: 13px; font-family: inherit;
    background: var(--surface); color: var(--text); cursor: pointer; outline: none;
  }
  .rp-select:focus { border-color: var(--navy-mid); }
  .rp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .rp-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .rp-check-group { display: flex; gap: 6px; flex-wrap: wrap; }
  .rp-check-btn {
    padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
    border: 0.5px solid var(--border-strong); background: var(--surface);
    color: var(--text-secondary); cursor: pointer; font-family: inherit;
    transition: all 0.12s;
  }
  .rp-check-btn:hover { background: var(--bg); }
  .rp-check-btn.sel { background: var(--nav-navy); color: white; border-color: transparent; }
  .rp-check-btn.rp-squad-primary {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--nav-navy);
  }
  .rp-footer {
    padding: 14px 20px; border-top: 0.5px solid var(--border);
    display: flex; gap: 8px; position: sticky; bottom: 0;
    background: var(--surface); flex-shrink: 0;
  }
  .rp-save-btn {
    flex: 1; padding: 9px; border-radius: var(--radius-sm);
    background: var(--nav-navy); color: white; border: none;
    font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: background 0.15s;
  }
  .rp-save-btn:hover { background: var(--navy-mid); }
  .rp-del-btn {
    padding: 9px 16px; border-radius: var(--radius-sm);
    background: var(--surface); color: #dc2626; border: 0.5px solid #fca5a5;
    font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: all 0.15s;
  }
  .rp-del-btn:hover { background: #fee2e2; }


/* ── PAGE FOOTER ─────────────────────────────────────────────────────────── */
.app-footer {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 48px 20px;
}
