  :root {
    --navy-dark: #1a2744;
    --navy-mid: #243660;
    --navy-light: #e8edf5;
    --m1: #3b82f6; --m1-bg: #dbeafe; --m1-text: #1e3a5f;
    --m2: #7c3aed; --m2-bg: #ede9fe; --m2-text: #3b1c6e;
    --m3: #16a34a; --m3-bg: #dcfce7; --m3-text: #14532d;
    --w1: #db2777; --w1-bg: #fce7f3; --w1-text: #831843;
    --w2: #ea580c; --w2-bg: #ffedd5; --w2-text: #7c2d12;
    --w3: #0891b2; --w3-bg: #cffafe; --w3-text: #164e63;
    --mix: #ca8a04; --mix-bg: #fef9c3; --mix-text: #713f12;
    --bg: #f7f6f3;
    --surface: #ffffff;
    --border: rgba(0,0,0,0.09);
    --border-strong: rgba(0,0,0,0.15);
    --text: #1a1a1a;
    --text-secondary: #666;
    --text-tertiary: #999;
    --radius: 12px;
    --radius-sm: 8px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
  }

  /* 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(--navy-dark);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
  }
  .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
  }
  .nav-crest {
    width: 30px;
    height: 30px;
    background: #8B1A1A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    font-family: 'DM Serif Display', serif;
  }
  .nav-title { font-size: 15px; font-weight: 500; letter-spacing: 0.01em; }
  .nav-subtitle { font-size: 11px; opacity: 0.6; margin-top: 1px; }
  .nav-links { display: flex; gap: 4px; }
  .nav-link {
    color: rgba(255,255,255,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:hover { background: rgba(255,255,255,0.1); color: white; }
  .nav-link.active { background: rgba(255,255,255,0.15); color: white; }

  /* MAIN */
  main { max-width: 960px; margin: 0 auto; padding: 28px 20px; }
  body.is-captain main { max-width: none; padding: 28px 32px; }

  /* 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; }
  .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); }

  /* TABS */
  .tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
  .tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
  }
  .tab:hover { color: var(--text); }
  .tab.active { color: var(--navy-dark); border-bottom-color: var(--navy-dark); }

  /* LEGEND */
  .legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
  .legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); }
  .legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

  /* SESSION CARDS — day-row layout */
  .sessions-day-group { margin-bottom: 10px; }
  .sessions-day-label {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 6px;
  }
  .sessions-day-name {
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.08em;
    white-space: nowrap;
  }
  .sessions-day-line { flex: 1; height: 0.5px; background: var(--border); }
  .sessions-day-scroll {
    display: flex; gap: 12px;
    overflow-x: auto; padding-bottom: 6px;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  }
  .sessions-day-scroll::-webkit-scrollbar { height: 4px; }
  .sessions-day-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
  .session-card {
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
    flex: 0 0 230px; /* fixed width, no shrink */
    min-width: 230px;
  }
  .session-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  .card-head { padding: 12px 14px 10px; }
  .ch-date { font-size: 11px; color: inherit; opacity: 0.65; margin-bottom: 3px; }
  .ch-row { display: flex; align-items: center; gap: 7px; }
  .ch-time { font-size: 18px; font-weight: 600; font-family: 'DM Serif Display', serif; }
  .ch-badge {
    font-size: 10px; font-weight: 500;
    padding: 2px 7px; border-radius: 20px;
    background: rgba(255,255,255,0.55);
  }
  .full-tag {
    font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: 8px;
    background: rgba(220,38,38,0.15);
    color: #991b1b;
    margin-left: auto;
  }
  .ch-group { font-size: 12px; margin-top: 4px; opacity: 0.75; }
  .divider { height: 0.5px; background: var(--border); }
  .card-staff { padding: 8px 14px; display: flex; flex-direction: column; gap: 4px; }
  .staff-row { display: flex; align-items: center; justify-content: space-between; }
  .staff-label { font-size: 11px; color: var(--text-secondary); }
  .chip { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px; }
  .chip-coach { background: #fef3c7; color: #713f12; }
  .chip-cox { background: #dcfce7; color: #14532d; }
  .chip-tbc { background: #f3f4f6; color: var(--text-tertiary); font-weight: 400; font-style: italic; }
  .staff-select {
    font-size: 11px; font-weight: 500; padding: 2px 6px;
    border-radius: 20px; border: 0.5px solid var(--border-strong);
    background: var(--surface); color: var(--text);
    font-family: inherit; cursor: pointer; max-width: 130px;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23666' d='M0 0l4 5 4-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 6px center;
    padding-right: 18px;
  }
  .staff-select.has-value { background-color: #fef3c7; color: #713f12; border-color: #d97706; }
  .staff-select.has-value-cox { background-color: #fde8e8; color: #8B1A1A; border-color: #b91c1c; }

  /* SUB BOX */
  .sub-box {
    border-top: 0.5px solid var(--border);
    padding: 8px 14px 10px;
    background: #fafaf8;
  }
  .sub-box-hdr {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none;
  }
  .sub-box-title {
    font-size: 10px; font-weight: 600; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: 0.06em;
    display: flex; align-items: center; gap: 5px;
  }
  .sub-dot { width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; flex-shrink: 0; }
  .sub-toggle-btn {
    font-size: 10px; color: var(--text-tertiary); background: none;
    border: none; cursor: pointer; font-family: inherit; padding: 0;
  }
  .sub-body { margin-top: 7px; display: none; }
  .sub-body.open { display: block; }
  .sub-list { display: flex; flex-direction: column; margin-bottom: 6px; }
  .sub-entry {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--text-secondary);
    padding: 4px 0; border-bottom: 0.5px solid var(--border);
  }
  .sub-entry:last-child { border-bottom: none; }
  .sub-entry .av { width: 18px; height: 18px; font-size: 7px; flex-shrink: 0; }
  .sub-entry-name { flex: 1; }
  .sub-entry-me { color: var(--navy-mid); font-weight: 500; }
  .sub-move-up {
    font-size: 10px; padding: 2px 7px; border-radius: 10px;
    border: 0.5px solid #b91c1c; background: transparent;
    color: #b91c1c; cursor: pointer; font-family: inherit;
    transition: all 0.12s; white-space: nowrap;
  }
  .sub-move-up:hover { background: #fde8e8; }
  .sub-remove {
    font-size: 11px; color: #dc2626; cursor: pointer; padding: 0 2px; opacity: 0.6;
  }
  .sub-remove:hover { opacity: 1; }
  .sub-empty { font-size: 11px; color: var(--text-tertiary); font-style: italic; margin-bottom: 6px; }
  .btn-sub-request {
    width: 100%; padding: 4px 8px; border-radius: var(--radius-sm);
    border: 0.5px dashed var(--border-strong);
    background: transparent; font-size: 11px; color: var(--text-tertiary);
    cursor: pointer; font-family: inherit; transition: all 0.15s;
    text-align: center;
  }
  .btn-sub-request:hover { background: #fef3c7; color: #92400e; border-color: #d97706; border-style: solid; }
  .btn-sub-request.active { background: #fef3c7; color: #92400e; border-color: #d97706; border-style: solid; font-weight: 500; }
  .card-seats { padding: 8px 14px 12px; }
  .seats-hdr {
    font-size: 10px; font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
  }
  .seat-row {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 0;
    border-bottom: 0.5px solid var(--border);
  }
  .seat-row:last-child { border-bottom: none; }
  .snum { font-size: 10px; color: var(--text-tertiary); width: 12px; text-align: right; flex-shrink: 0; }
  .av {
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 600; flex-shrink: 0; color: white;
  }
  .sname { font-size: 12px; color: var(--text); flex: 1; }
  .rmv { font-size: 12px; color: #dc2626; cursor: pointer; padding: 0 2px; opacity: 0.7; }
  .rmv:hover { opacity: 1; }

  /* Seat row info badges */
  .seat-badges { display: flex; gap: 3px; margin-left: auto; flex-shrink: 0; }
  .sbadge {
    font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 4px;
    line-height: 1.4; letter-spacing: 0.02em;
  }
  .sbadge-nov  { background: #fef9c3; color: #713f12; }
  .sbadge-sen  { background: #ede9fe; color: #3b1c6e; }
  .sbadge-bow  { background: #dbeafe; color: #1e3a5f; }
  .sbadge-str  { background: #fce7f3; color: #831843; }
  .sbadge-warn { background: #fee2e2; color: #991b1b; }

  /* Card balance + warning bar */
  .seats-balance {
    font-size: 10px; color: var(--text-tertiary); margin-top: 4px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  }
  .seats-balance-item { display: flex; align-items: center; gap: 3px; }
  .bal-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
  .card-warn {
    margin: 4px 14px 6px;
    background: #fee2e2; border: 0.5px solid #fca5a5;
    border-radius: var(--radius-sm); padding: 5px 10px;
    font-size: 11px; color: #991b1b; font-weight: 500;
    display: flex; gap: 6px; align-items: flex-start; line-height: 1.4;
  }
  .card-warn-icon { flex-shrink: 0; }
  .btn-signup {
    flex: 1;
    border: 0.5px dashed var(--border-strong);
    border-radius: 5px;
    background: transparent;
    font-size: 11px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 3px 6px;
    text-align: center;
    font-family: inherit;
    transition: all 0.15s;
  }
  .btn-signup:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); border-style: solid; }
  .you-in { font-size: 11px; color: var(--navy-mid); text-align: center; margin-top: 7px; font-weight: 500; }

  /* COX AVAILABILITY */
  .section-intro { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
  .cox-table { border: 0.5px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
  .cx-row { display: grid; grid-template-columns: 120px repeat(4, 1fr); }
  .cx-cell {
    padding: 9px 8px; font-size: 12px;
    border-right: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
  }
  .cx-cell:first-child { justify-content: flex-start; padding-left: 14px; }
  .cx-cell:last-child { border-right: none; }
  .cx-row:last-child .cx-cell { border-bottom: none; }
  .cx-hdr .cx-cell { background: #f9f9f7; font-size: 11px; font-weight: 600; color: var(--text-secondary); min-width: 80px; }
  .cx-me .cx-cell { background: #fafafa; }
  .av-chip { font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 20px; background: #dcfce7; color: #14532d; }
  .asgn-chip { font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 20px; background: #dbeafe; color: #1e3a5f; }
  .av-no { font-size: 12px; color: var(--text-tertiary); }
  .av-btn {
    font-size: 11px; padding: 3px 9px; border-radius: 20px;
    border: 0.5px dashed var(--border-strong);
    color: var(--text-tertiary); cursor: pointer;
    background: transparent; font-family: inherit;
    transition: all 0.15s;
  }
  .av-btn:hover { background: var(--navy-light); color: var(--navy-dark); border-style: solid; border-color: var(--navy-mid); }

  /* MY SESSIONS */
  .stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
  .stat-card {
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .s-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
  .s-val { font-size: 28px; font-weight: 400; font-family: 'DM Serif Display', serif; color: var(--text); }
  .my-list { background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
  .my-row {
    display: grid; grid-template-columns: 110px 55px 1fr 90px 65px 20px;
    padding: 9px 16px; border-bottom: 0.5px solid var(--border);
    font-size: 13px; align-items: center; gap: 8px;
  }
  .my-row:last-child { border-bottom: none; }
  .my-row.hdr { background: #f9f9f7; font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
  .bdg { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; }

  /* 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);
  }
  .modal-bg.open { display: flex; }
  .modal {
    background: var(--surface);
    border-radius: var(--radius);
    border: 0.5px solid var(--border-strong);
    padding: 24px;
    width: 300px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    animation: pop 0.15s ease;
  }
  @keyframes pop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .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; max-height: 220px; overflow-y: auto; }
  .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-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(--navy-dark); 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); }

  /* 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; }

  /* 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; }

  @media (max-width: 600px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .my-row { grid-template-columns: 90px 50px 1fr 55px; }
    .my-row > div:nth-child(4), .my-row > div:nth-child(6) { display: none; }
    .cx-row { grid-template-columns: 80px repeat(4,1fr); }
    .cx-cell { padding: 7px 4px; font-size: 11px; }
  }

  /* PROFILE PAGE */
  .profile-grid { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
  @media (max-width: 700px) { .profile-grid { grid-template-columns: 1fr; } }
  .profile-card { background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
  .profile-card-head { background: var(--navy-dark); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 600; color: white; font-family: 'DM Serif Display', serif; border: 2px solid rgba(255,255,255,0.25); }
  .profile-name { font-family: 'DM Serif Display', serif; font-size: 20px; color: white; }
  .profile-squad-tag { font-size: 12px; font-weight: 500; padding: 3px 12px; border-radius: 20px; background: rgba(255,255,255,0.18); color: white; }
  .profile-body { padding: 18px; }
  .pref-section { margin-bottom: 18px; }
  .pref-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
  .pill-group { display: flex; gap: 6px; flex-wrap: wrap; }
  .pill { padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 500; border: 0.5px solid var(--border-strong); cursor: pointer; transition: all 0.15s; background: var(--surface); color: var(--text-secondary); font-family: inherit; }
  .pill:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); }
  .pill.sel { background: var(--navy-dark); color: white; border-color: var(--navy-dark); }
  .pill[data-squad="W1"].sel { background: var(--w1); border-color: var(--w1); }
  .pill[data-squad="W2"].sel { background: var(--w2); border-color: var(--w2); }
  .pill[data-squad="W3"].sel { background: var(--w3); border-color: var(--w3); }
  .pill[data-squad="M1"].sel { background: var(--m1); border-color: var(--m1); }
  .pill[data-squad="M2"].sel { background: var(--m2); border-color: var(--m2); }
  .pill[data-squad="M3"].sel { background: var(--m3); border-color: var(--m3); }
  .toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 2px 0; }
  .toggle-wrap { position: relative; width: 38px; height: 21px; flex-shrink: 0; }
  .toggle-wrap input { opacity: 0; width: 0; height: 0; }
  .toggle-slider { position: absolute; inset: 0; cursor: pointer; background: #d1d5db; border-radius: 22px; transition: 0.2s; }
  .toggle-slider:before { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
  input:checked + .toggle-slider { background: var(--navy-dark); }
  input:checked + .toggle-slider:before { transform: translateX(17px); }
  .toggle-label { font-size: 13px; color: var(--text); }
  .toggle-sub { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
  .save-btn { width: 100%; padding: 9px; border-radius: var(--radius-sm); background: var(--navy-dark); color: white; border: none; font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; transition: background 0.15s; margin-top: 4px; }
  .save-btn:hover { background: var(--navy-mid); }
  .saved-toast { font-size: 12px; color: var(--navy-mid); text-align: center; margin-top: 8px; height: 16px; opacity: 0; transition: opacity 0.3s; }
  .prof-outings { display: flex; flex-direction: column; gap: 14px; }
  .prof-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

  /* CALENDAR */
  .cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
  .cal-nav span { font-size: 15px; font-family: 'DM Serif Display', serif; flex: 1; }
  .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; border: 0.5px solid var(--border-strong); }
  .cal-cell { background: var(--surface); padding: 5px 6px; min-height: 72px; font-size: 11px; }
  .cal-cell.other-month { background: #fafaf8; opacity: 0.6; }
  .cal-cell.today-cell { background: #fef2f2; }
  .cal-hdr-cell { background: #f3f4f2; padding: 6px; text-align: center; font-size: 10px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.06em; min-height: auto; }
  .cal-day-num { font-size: 11px; font-weight: 600; color: var(--text-tertiary); margin-bottom: 3px; }
  .cal-day-num.today-num { color: var(--navy-dark); background: var(--navy-dark); color: white; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
  .cal-ev { font-size: 9px; font-weight: 500; padding: 1px 4px; border-radius: 3px; margin-bottom: 2px; cursor: default; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .btn-captain {
    font-size: 11px; padding: 3px 10px; border-radius: 20px;
    border: 0.5px solid var(--border-strong); cursor: pointer;
    background: var(--surface); color: var(--text-secondary); font-family: inherit;
    transition: all 0.15s;
  }
  .btn-captain:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); }
  .btn-captain.open { background: var(--navy-dark); color: white; border-color: var(--navy-dark); }

  /* COX AVAILABILITY CYCLING */
  .av-chip { font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 20px; background: #dcfce7; color: #14532d; cursor: pointer; border: none; font-family: inherit; transition: all 0.15s; }
  .av-chip:hover { opacity: 0.8; }
  .av-chip.unsure { background: #fef9c3; color: #713f12; }
  .av-chip.unavail { background: #fee2e2; color: #991b1b; }

  /* COX TABLE GROUPS */
  .cox-group { margin-bottom: 22px; }
  .cox-group-hdr {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px;
  }
  .cox-group-title {
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .cox-group-pill {
    font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 20px;
  }
  .cox-group-desc {
    font-size: 12px; color: var(--text-tertiary); margin-top: 2px; font-style: italic;
  }

  /* NON-COX INFO CARD */
  .cox-info-card {
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .cox-info-head {
    background: #fef2f2; border-bottom: 0.5px solid rgba(139,26,26,0.2);
    padding: 16px 20px; display: flex; align-items: center; gap: 12px;
  }
  .cox-info-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: #fde8e8; display: flex; align-items: center;
    justify-content: center; font-size: 18px; flex-shrink: 0;
  }
  .cox-info-head h3 {
    font-family: 'DM Serif Display', serif; font-size: 18px;
    font-weight: 400; color: var(--text); margin-bottom: 2px;
  }
  .cox-info-head p { font-size: 12px; color: var(--text-secondary); }
  .cox-info-body { padding: 18px 20px; }
  .cox-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .cox-fact {
    background: var(--bg); border-radius: var(--radius-sm);
    padding: 10px 12px; border: 0.5px solid var(--border);
  }
  .cox-fact-label { font-size: 10px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
  .cox-fact-val { font-size: 12px; color: var(--text); line-height: 1.5; }
  .cox-info-cta {
    background: var(--navy-light); border: 0.5px solid rgba(26,71,42,0.2);
    border-radius: var(--radius-sm); padding: 12px 16px;
    font-size: 13px; color: var(--navy-dark); line-height: 1.6;
  }
  .cox-info-cta strong { font-weight: 600; }
  .gender-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
  .gtab { padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; border: 0.5px solid var(--border-strong); cursor: pointer; background: var(--surface); color: var(--text-secondary); font-family: inherit; transition: all 0.15s; }
  .gtab:hover { background: var(--bg); }
  .gtab.active { background: var(--navy-dark); color: white; border-color: var(--navy-dark); }

  /* 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;
  }

  /* NAV HAMBURGER & MOBILE DRAWER */
  #nav-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,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;
  }
  #nav-hamburger:hover { background: rgba(255,255,255,0.1); }
  #nav-drawer {
    background: var(--navy-dark);
    border-top: 1px solid rgba(255,255,255,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  #nav-drawer.open { max-height: 520px; }
  .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: rgba(255,255,255,0.85);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
  }
  .drawer-link:hover,
  .drawer-link:active { background: rgba(255,255,255,0.08); color: white; }
  .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; }

  /* ── CAPTAIN PAGE ─────────────────────────────────────────────────────────── */

  /* Top bar */
  .cp-topbar {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); padding: 12px 16px;
    margin-bottom: 16px; flex-wrap: wrap;
  }
  .cp-week-nav { display: flex; align-items: center; gap: 8px; }
  .cp-week-label {
    font-family: 'DM Serif Display', serif; font-size: 17px;
    font-weight: 400; min-width: 180px; text-align: center;
  }
  .cp-spacer { flex: 1; }
  .cp-draft-pill {
    font-size: 11px; font-weight: 600; padding: 3px 10px;
    border-radius: 20px; background: #fef9c3; color: #713f12;
    border: 0.5px solid #d97706;
  }
  .cp-pub-btn {
    padding: 7px 18px; border-radius: var(--radius-sm);
    background: var(--navy-dark); color: white; border: none;
    font-size: 13px; font-weight: 500; font-family: inherit;
    cursor: pointer; transition: background 0.15s;
  }
  .cp-pub-btn:hover { background: var(--navy-mid); }
  .cp-pub-btn:disabled { opacity: 0.4; cursor: default; }

  /* Tabs within captain page */
  .cp-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
  .cp-tab {
    padding: 7px 16px; font-size: 13px; font-weight: 500;
    cursor: pointer; border: none; background: none;
    color: var(--text-secondary); font-family: inherit;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: all 0.15s;
  }
  .cp-tab:hover { color: var(--text); }
  .cp-tab.active { color: var(--navy-dark); border-bottom-color: var(--navy-dark); }

  /* Week grid */
  .cp-grid-scroll-wrap { overflow-x: auto; scrollbar-width: none; }
  .cp-grid-scroll-wrap::-webkit-scrollbar { display: none; }
  .cp-grid { display: flex; flex-direction: column; gap: 4px; }

  /* Day row */
  .cp-day-row {
    display: flex; align-items: stretch; gap: 0;
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); overflow: hidden;
    min-height: 72px;
  }
  .cp-day-label {
    width: 64px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 10px 6px;
    background: #f9f9f7; border-right: 0.5px solid var(--border);
    cursor: default;
  }
  .cp-day-name {
    font-size: 11px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.07em;
  }
  .cp-day-date { font-size: 13px; font-family: 'DM Serif Display', serif; color: var(--text); margin-top: 2px; }
  .cp-day-label.today { background: #fef2f2; }
  .cp-day-label.today .cp-day-name { color: var(--navy-dark); }

  /* Planned session card */
  .cp-sess {
    display: flex; flex-direction: column; justify-content: space-between;
    min-width: 130px; max-width: 170px; border-radius: 8px;
    padding: 7px 10px; cursor: pointer; position: relative;
    transition: box-shadow 0.15s, opacity 0.15s;
    border: 1.5px solid transparent;
    flex: 1;
  }
  .cp-sess:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
  .cp-sess.draft {
    border-style: dashed; opacity: 0.82;
  }
  .cp-sess.published { border-style: solid; opacity: 1; }
  .cp-sess-time { font-size: 11px; font-weight: 600; opacity: 0.75; margin-bottom: 2px; }
  .cp-sess-grp { font-size: 13px; font-weight: 600; line-height: 1.2; }
  .cp-sess-type { font-size: 10px; opacity: 0.7; margin-top: 2px; }
  .cp-sess-footer { display: flex; align-items: center; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
  .cp-sess-chip {
    font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 8px;
    background: rgba(255,255,255,0.45);
  }
  .cp-sess-status {
    font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 8px;
    margin-left: auto;
  }
  .cp-sess-status.draft-tag { background: rgba(0,0,0,0.12); color: inherit; opacity: 0.7; }
  .cp-sess-status.pub-tag { background: rgba(255,255,255,0.5); }
  .cp-sess-del {
    position: absolute; top: 4px; right: 5px;
    font-size: 11px; opacity: 0; cursor: pointer;
    background: rgba(0,0,0,0.15); border: none; border-radius: 50%;
    width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
    color: inherit; font-family: inherit; transition: opacity 0.15s;
    line-height: 1;
  }
  .cp-sess:hover .cp-sess-del { opacity: 1; }
  .cp-sess-del:hover { background: rgba(220,38,38,0.3); }

  /* Add session button */
  .cp-add-slot {
    min-width: 60px; border-radius: 8px;
    border: 1.5px dashed var(--border-strong); background: transparent;
    color: var(--text-tertiary); font-size: 20px; font-weight: 300;
    cursor: pointer; padding: 6px 10px; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; align-self: stretch;
  }
  .cp-add-slot:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); border-style: solid; }

  /* Empty day hint */
  .cp-day-empty {
    font-size: 11px; color: var(--text-tertiary); font-style: italic;
    display: flex; align-items: center; padding: 0 4px;
  }

  /* Erg section */
  .cp-section-hdr {
    display: flex; align-items: center; gap: 10px;
    margin: 20px 0 10px; cursor: pointer; user-select: none;
  }
  .cp-section-title {
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .cp-section-toggle { font-size: 12px; color: var(--text-tertiary); }
  .cp-section-line { flex: 1; height: 0.5px; background: var(--border); }
  .cp-erg-grid { display: flex; flex-direction: column; gap: 4px; }
  .cp-erg-card {
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 10px 14px;
    display: flex; align-items: center; gap: 12px;
    cursor: pointer; transition: box-shadow 0.15s;
  }
  .cp-erg-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
  .cp-erg-card.draft { opacity: 0.75; border-style: dashed; }
  .cp-erg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #6b7280; }
  .cp-erg-info { flex: 1; }
  .cp-erg-label { font-size: 13px; font-weight: 500; }
  .cp-erg-meta { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
  .cp-erg-plan { font-size: 11px; color: var(--text-tertiary); font-style: italic; margin-top: 2px; }
  .cp-erg-status { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }

  /* Session panel — centred modal */
  .cp-panel-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 150;
    backdrop-filter: blur(2px);
  }
  .cp-panel-overlay.open { display: block; }
  .cp-panel {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0; pointer-events: none;
    width: 540px; max-width: 96vw; max-height: 88vh;
    background: var(--surface);
    border-radius: var(--radius);
    border: 0.5px solid var(--border-strong);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    z-index: 151; display: flex; flex-direction: column;
    transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    overflow: hidden;
  }
  .cp-panel.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1; pointer-events: auto;
  }
  .cp-panel-head {
    padding: 18px 20px 14px; border-bottom: 0.5px solid var(--border);
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  }
  .cp-panel-head h3 {
    font-family: 'DM Serif Display', serif; font-size: 20px;
    font-weight: 400; flex: 1;
  }
  .cp-panel-close {
    width: 28px; height: 28px; border-radius: 50%;
    border: 0.5px solid var(--border-strong); background: var(--surface);
    cursor: pointer; font-size: 14px; color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; transition: all 0.15s;
  }
  .cp-panel-close:hover { background: var(--bg); color: var(--text); }
  .cp-panel-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
  .cp-panel-footer {
    padding: 14px 20px; border-top: 0.5px solid var(--border);
    display: flex; gap: 8px; flex-shrink: 0; background: #fafaf8;
  }

  /* Form elements inside panel */
  .cp-field { margin-bottom: 16px; }
  .cp-field:last-child { margin-bottom: 0; }
  .cp-label {
    font-size: 11px; font-weight: 600; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: 0.06em;
    display: block; margin-bottom: 6px;
  }
  .cp-label span { font-weight: 400; color: var(--text-secondary); text-transform: none; letter-spacing: 0; font-size: 11px; }
  .cp-input, .cp-select, .cp-textarea {
    width: 100%; padding: 8px 10px;
    border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit; color: var(--text);
    background: var(--surface); transition: border-color 0.15s;
    outline: none;
  }
  .cp-input:focus, .cp-select:focus, .cp-textarea:focus { border-color: var(--navy-mid); }
  .cp-textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
  .cp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .cp-pill-group { display: flex; gap: 5px; flex-wrap: wrap; }
  .cp-pill {
    padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
    border: 0.5px solid var(--border-strong); cursor: pointer;
    background: var(--surface); color: var(--text-secondary);
    font-family: inherit; transition: all 0.15s;
  }
  .cp-pill:hover { background: var(--bg); }
  .cp-pill.sel { color: white; border-color: transparent; }
  .cp-pill[data-v="M1"].sel { background: var(--m1); }
  .cp-pill[data-v="M2"].sel { background: var(--m2); }
  .cp-pill[data-v="M3"].sel { background: var(--m3); }
  .cp-pill[data-v="W1"].sel { background: var(--w1); }
  .cp-pill[data-v="W2"].sel { background: var(--w2); }
  .cp-pill[data-v="W3"].sel { background: var(--w3); }
  .cp-pill[data-v="Mixed"].sel { background: var(--mix); color: #713f12; }
  .cp-pill[data-v="M1/2"].sel { background: var(--m1); }
  .cp-pill[data-v="W1/2"].sel { background: var(--w1); }
  .cp-divider { height: 0.5px; background: var(--border); margin: 18px 0; }
  .cp-btn {
    flex: 1; padding: 9px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; transition: all 0.15s;
  }
  .cp-btn-primary { background: var(--navy-dark); color: white; border: none; }
  .cp-btn-primary:hover { background: var(--navy-mid); }
  .cp-btn-secondary { background: var(--surface); color: var(--text); border: 0.5px solid var(--border-strong); }
  .cp-btn-secondary:hover { background: var(--bg); }
  .cp-btn-danger { background: #fee2e2; color: #991b1b; border: 0.5px solid #fca5a5; }
  .cp-btn-danger:hover { background: #fecaca; }
  .cp-publish-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--bg); border: 0.5px solid var(--border);
    margin-bottom: 0;
  }
  .cp-publish-toggle-label { font-size: 13px; flex: 1; }
  .cp-publish-toggle-sub { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

  /* Publish button on card */
  .cp-pub-card-btn {
    font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 8px;
    border: none; cursor: pointer; font-family: inherit;
    transition: all 0.12s; margin-left: auto;
  }
  .cp-pub-card-btn.pub { background: var(--navy-dark); color: white; }
  .cp-pub-card-btn.pub:hover { background: var(--navy-mid); }
  .cp-pub-card-btn.unpub { background: rgba(255,255,255,0.55); color: inherit; opacity: 0.8; }
  .cp-pub-card-btn.unpub:hover { opacity: 1; background: rgba(255,255,255,0.75); }
  .cp-pub-card-btn.unpub.locked { opacity: 0.4; cursor: not-allowed; }

  /* Preset buttons */
  .cp-preset-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
  .cp-preset-btn {
    font-size: 11px; padding: 4px 10px; border-radius: 20px;
    border: 0.5px solid var(--border-strong); background: var(--bg);
    color: var(--text-secondary); cursor: pointer; font-family: inherit;
    transition: all 0.12s;
  }
  .cp-preset-btn:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); }

  /* ── CAPTAIN TIME-GRID ───────────────────────────────────────────────────────── */
  .cp-timegrid {
    display: grid;
    grid-template-columns: 72px repeat(7, minmax(168px, 1fr));
    min-width: calc(72px + 7 * 168px);
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--border);
    gap: 0.5px;
    margin-bottom: 16px;
  }
  .cp-tg-corner {
    background: #f3f4f2;
  }
  .cp-tg-day-hdr {
    background: #f9f9f7;
    padding: 8px 6px;
    text-align: center;
  }
  .cp-tg-day-hdr.today-col { background: #fef2f2; }
  .cp-tg-day-name {
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.07em;
  }
  .cp-tg-day-date {
    font-size: 13px; font-family: 'DM Serif Display', serif;
    color: var(--text); margin-top: 2px;
  }
  .cp-tg-day-hdr.today-col .cp-tg-day-name { color: var(--navy-dark); }
  .cp-tg-band-label {
    background: #f9f9f7;
    padding: 6px 8px;
    font-size: 10px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.06em;
    display: flex; align-items: center;
    border-right: 0.5px solid var(--border);
    line-height: 1.3;
  }
  .cp-tg-cell {
    background: var(--surface);
    padding: 5px;
    display: flex; flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start; align-content: flex-start;
    min-height: 90px;
    position: relative;
  }
  .cp-tg-cell:hover { background: #fafaf8; }
  .cp-tg-add {
    position: absolute; bottom: 4px; right: 4px;
    font-size: 10px; color: var(--text-tertiary);
    opacity: 0;
    background: none;
    border: 0.5px dashed var(--border-strong); border-radius: 5px;
    padding: 2px 7px; cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
    font-family: inherit; z-index: 1;
  }
  .cp-tg-cell:hover .cp-tg-add { opacity: 1; }
  .cp-tg-add:hover {
    background: var(--navy-light); color: var(--navy-dark);
    border-color: var(--navy-mid); border-style: solid;
  }
  /* Tiles inside timegrid: fixed-width, don't expand */
  .cp-timegrid .cp-sess {
    flex: none;
    min-width: 82px; max-width: 116px;
  }
  /* Status dot on tile */
  .cp-tile-dot {
    width: 6px; height: 6px; border-radius: 50%;
    display: inline-block; margin-bottom: 3px; flex-shrink: 0;
  }
  .cp-tile-dot.draft { background: #9ca3af; }
  .cp-tile-dot.pub   { background: #16a34a; }

  /* ── COACH PRIORITY IN PANEL ───────────────────────────────────────────────── */
  .cp-coach-p-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  }
  .cp-coach-p-lbl {
    font-size: 11px; color: var(--text-secondary); font-weight: 500;
    min-width: 70px; flex-shrink: 0;
  }
  .cp-coach-p-rm {
    font-size: 13px; color: var(--text-tertiary); background: none;
    border: none; cursor: pointer; padding: 2px 5px;
    border-radius: 50%; transition: all 0.1s; flex-shrink: 0;
  }
  .cp-coach-p-rm:hover { background: #fee2e2; color: #dc2626; }
  .cp-add-coach-btn {
    font-size: 11px; color: var(--navy-mid); background: none;
    border: 0.5px solid var(--border-strong); border-radius: 20px;
    padding: 3px 12px; cursor: pointer; font-family: inherit;
    transition: all 0.12s; margin-top: 2px; display: inline-block;
  }
  .cp-add-coach-btn:hover { background: var(--navy-light); border-color: var(--navy-mid); }
  /* Boat custom input (revealed when "Add new…" selected) */
  .cp-boat-custom-wrap { margin-top: 6px; display: none; }
  .cp-boat-custom-wrap.shown { display: block; }

  /* ── TIME PICKER COMPONENT ────────────────────────────────────────────────── */
  .cp-timepick { display: flex; flex-direction: column; gap: 4px; }
  .cp-timepick-row { display: flex; align-items: center; gap: 4px; }
  .cp-timepick-input { flex: 1; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
  .cp-timepick-arrow {
    width: 28px; height: 34px; border-radius: var(--radius-sm);
    border: 0.5px solid var(--border-strong); background: var(--bg);
    color: var(--text); cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; flex-shrink: 0; transition: background 0.12s;
  }
  .cp-timepick-arrow:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); }
  @media (max-width: 640px) { .cp-timepick-arrow { display: none; } }

  /* ── BOAT MANAGEMENT ────────────────────────────────────────────────────────── */
  .cp-bm-row {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; border-bottom: 0.5px solid var(--border);
    font-size: 13px;
  }
  .cp-bm-row:last-child { border-bottom: none; }
  .cp-bm-name { flex: 1; font-weight: 500; }
  .cp-bm-type { font-size: 11px; color: var(--text-secondary); min-width: 30px; }
  .cp-bm-seats { font-size: 11px; color: var(--text-tertiary); min-width: 50px; }
  .cp-bm-del {
    font-size: 11px; color: var(--text-tertiary); background: none;
    border: none; cursor: pointer; padding: 2px 6px; border-radius: 50%;
    transition: all 0.1s;
  }
  .cp-bm-del:hover { background: #fee2e2; color: #dc2626; }

  /* ── COACH CHIPS ─────────────────────────────────────────────────────────────── */
  .cp-coach-chips {
    display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px;
  }
  .cp-coach-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--navy-light); color: var(--navy-dark);
    border: 0.5px solid var(--border-strong); border-radius: 20px;
    padding: 3px 6px 3px 10px; font-size: 12px; font-weight: 500;
  }
  .cp-coach-chip-rm {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: none; border: none; cursor: pointer;
    color: var(--navy-dark); font-size: 11px; padding: 0; flex-shrink: 0;
    transition: background 0.1s;
  }
  .cp-coach-chip-rm:hover { background: rgba(220,38,38,0.15); color: #dc2626; }

  /* Captain page day sessions — no wrap (fix 1 for captain grid too) */
  .cp-day-sessions {
    flex: 1; display: flex; align-items: stretch;
    gap: 6px; padding: 6px 8px;
    overflow-x: auto; min-height: 72px;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  }
  .cp-day-sessions::-webkit-scrollbar { height: 3px; }
  .cp-day-sessions::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
  .cp-fairness {
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px;
    display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  }
  .cp-fairness-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0; }
  .cp-fair-item { display: flex; align-items: center; gap: 6px; }
  .cp-fair-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .cp-fair-text { font-size: 12px; color: var(--text-secondary); }
  .cp-fair-count { font-size: 13px; font-weight: 600; color: var(--text); font-family: 'DM Serif Display', serif; }

  /* ── ROSTER ───────────────────────────────────────────────────────────────── */
  .roster-toolbar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 14px;
  }
  .roster-search {
    flex: 1; min-width: 160px; padding: 7px 12px;
    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;
  }
  .roster-search:focus { border-color: var(--navy-mid); }
  .roster-filter-group { display: flex; gap: 4px; flex-wrap: wrap; }
  .roster-filter-btn {
    padding: 5px 11px; 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; white-space: nowrap;
  }
  .roster-filter-btn:hover { background: var(--bg); }
  .roster-filter-btn.active { background: var(--navy-dark); color: white; border-color: transparent; }
  .roster-filter-btn.warn { background: #fef9c3; color: #713f12; border-color: #d97706; }
  .roster-actions { display: flex; gap: 6px; margin-left: auto; }
  .roster-action-btn {
    padding: 6px 14px; border-radius: var(--radius-sm); 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; white-space: nowrap;
  }
  .roster-action-btn:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); }
  .roster-add-btn {
    padding: 6px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500;
    border: none; background: var(--navy-dark); color: white;
    cursor: pointer; font-family: inherit; transition: background 0.12s;
  }
  .roster-add-btn:hover { background: var(--navy-mid); }

  /* Stats bar */
  .roster-stats {
    display: flex; gap: 16px; flex-wrap: wrap;
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); padding: 10px 16px; margin-bottom: 14px;
  }
  .roster-stat { display: flex; flex-direction: column; gap: 1px; }
  .roster-stat-val { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); }
  .roster-stat-lbl { font-size: 10px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }
  .roster-stat-divider { width: 0.5px; background: var(--border); align-self: stretch; }

  /* Section header */
  .roster-section-hdr {
    font-size: 11px; font-weight: 600; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: 0.07em;
    padding: 10px 0 6px; margin-top: 4px;
    display: flex; align-items: center; gap: 8px;
  }
  .roster-section-hdr::after { content: ''; flex: 1; height: 0.5px; background: var(--border); }
  .roster-section-count {
    font-size: 10px; font-weight: 600; padding: 1px 7px;
    border-radius: 20px; background: var(--bg);
    color: var(--text-tertiary); border: 0.5px solid var(--border);
  }

  /* Table */
  .roster-table { width: 100%; border-collapse: collapse; }
  .roster-table th {
    text-align: left; font-size: 10px; font-weight: 600;
    color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em;
    padding: 6px 10px; border-bottom: 0.5px solid var(--border-strong);
    cursor: pointer; user-select: none; white-space: nowrap;
    background: #fafaf8;
  }
  .roster-table th:hover { color: var(--text); }
  .roster-table th.sort-asc::after { content: ' ↑'; }
  .roster-table th.sort-desc::after { content: ' ↓'; }
  .roster-table td {
    padding: 8px 10px; font-size: 13px; border-bottom: 0.5px solid var(--border);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
  }
  .roster-row { cursor: pointer; transition: background 0.1s; }
  .roster-row:hover { background: var(--navy-light); }
  .roster-row:last-child td { border-bottom: none; }
  .roster-table-wrap {
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 6px;
  }

  /* Chips in table */
  .r-chip {
    display: inline-block; padding: 2px 8px; border-radius: 20px;
    font-size: 11px; font-weight: 500; white-space: nowrap;
  }
  .r-chip.swim-pass  { background: #dcfce7; color: #14532d; }
  .r-chip.swim-none  { background: #fee2e2; color: #991b1b; }
  .r-chip.swim-due   { background: #fef9c3; color: #713f12; }
  .r-chip.cap-done   { background: #dcfce7; color: #14532d; }
  .r-chip.cap-none   { background: #f3f4f6; color: #6b7280; }
  .r-chip.subs-full  { background: #dcfce7; color: #14532d; }
  .r-chip.subs-term  { background: #dbeafe; color: #1e3a5f; }
  .r-chip.subs-none  { background: #fee2e2; color: #991b1b; }
  .r-chip.ourc-nov   { background: #fef9c3; color: #713f12; }
  .r-chip.ourc-sen   { background: #ede9fe; color: #3b1c6e; }

  /* Mailing list copy bar */
  .roster-mail-bar {
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  }
  .roster-mail-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-right: 4px; }
  .roster-mail-btn {
    padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 500;
    border: 0.5px solid var(--border-strong); background: var(--bg);
    color: var(--text-secondary); cursor: pointer; font-family: inherit;
    transition: all 0.12s;
  }
  .roster-mail-btn:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); }
  .roster-mail-btn.copied { background: #dcfce7; color: #14532d; border-color: #86efac; }
  .roster-mail-divider { width: 0.5px; height: 20px; background: var(--border); }

  /* 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);
  }
  .roster-panel-overlay.open { display: block; }
  .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; transition: right 0.25s ease;
    box-shadow: -8px 0 30px rgba(0,0,0,0.1);
    display: flex; flex-direction: column;
  }
  .roster-panel.open { right: 0; }
  .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); }
  .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(--navy-dark); color: white; border-color: transparent; }
  .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(--navy-dark); 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; }

  /* ── RIVER & RESTRICTIONS ─────────────────────────────────────────────────── */
  .river-flag-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px;
  }
  .river-flag-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 4px; }
  .flag-btn {
    padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
    border: 2px solid transparent; cursor: pointer; font-family: inherit;
    transition: all 0.15s; display: flex; align-items: center; gap: 6px;
  }
  .flag-btn.green    { background: #dcfce7; color: #14532d; border-color: #86efac; }
  .flag-btn.lightblue{ background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
  .flag-btn.darkblue { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
  .flag-btn.amber    { background: #fef9c3; color: #713f12; border-color: #fde047; }
  .flag-btn.red      { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
  .flag-btn.active.green    { background: #16a34a; color: white; border-color: #15803d; }
  .flag-btn.active.lightblue{ background: #0ea5e9; color: white; border-color: #0284c7; }
  .flag-btn.active.darkblue { background: #1e3a8a; color: white; border-color: #1e40af; }
  .flag-btn.active.amber    { background: #d97706; color: white; border-color: #b45309; }
  .flag-btn.active.red      { background: #dc2626; color: white; border-color: #b91c1c; }
  .flag-btn:not(.active):hover { opacity: 0.8; }
  .river-banner.lightblue { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
  .river-banner.darkblue  { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
  .river-banner.amber     { background: #fef9c3; color: #713f12; border-color: #fde047; }
  .river-flag-rules {
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px;
  }
  .river-rules-title { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
  .river-rule-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; font-size: 13px; }
  .river-rule-icon { font-size: 14px; flex-shrink: 0; }
  .river-rule-text { flex: 1; color: var(--text); }
  .river-rule-text strong { font-weight: 600; }
  .river-slots-card {
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px;
  }
  .river-slots-title { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
  .slot-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
  .slot-day { font-size: 12px; font-weight: 600; color: var(--text); width: 32px; flex-shrink: 0; }
  .slot-input {
    width: 78px; padding: 5px 8px; border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-sm); font-size: 12px; font-family: inherit;
    color: var(--text); background: var(--surface); outline: none; text-align: center;
  }
  .slot-input:focus { border-color: var(--navy-mid); }
  .slot-sep { font-size: 11px; color: var(--text-tertiary); }
  .slot-save-btn {
    padding: 5px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500;
    background: var(--navy-dark); color: white; border: none; cursor: pointer;
    font-family: inherit; transition: background 0.15s;
  }
  .slot-save-btn:hover { background: var(--navy-mid); }
  .river-check-card {
    background: var(--surface); border: 0.5px solid var(--border-strong);
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px;
  }
  .river-check-title { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
  .river-check-row { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 0.5px solid var(--border); font-size: 13px; }
  .river-check-row:last-child { border-bottom: none; }
  .river-check-pass { color: #16a34a; font-size: 14px; flex-shrink: 0; }
  .river-check-fail { color: #dc2626; font-size: 14px; flex-shrink: 0; }
  .river-check-warn { color: #ca8a04; font-size: 14px; flex-shrink: 0; }
  /* River flag banner on sessions page */
  .river-banner {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-radius: var(--radius);
    margin-bottom: 12px; font-size: 13px; font-weight: 500;
    border: 0.5px solid;
  }
  .river-banner.green  { background: #dcfce7; color: #14532d; border-color: #86efac; }
  .river-banner.yellow { background: #fef9c3; color: #713f12; border-color: #fde047; }
  .river-banner.red    { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
  .river-banner.black  { background: #1f2937; color: #f9fafb; border-color: #374151; }

  /* ── PENDING APPROVALS ─────────────────────────────────────────────────────── */
  .pending-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; background: var(--surface);
    border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm);
    margin-bottom: 6px;
  }
  .pending-av {
    width: 32px; height: 32px; border-radius: 50%; background: #e2e8f0;
    color: #374151; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .pending-info { flex: 1; min-width: 0; }
  .pending-name { font-size: 13px; font-weight: 600; color: var(--text); }
  .pending-meta { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
  .pending-btns { display: flex; gap: 6px; flex-shrink: 0; }
  .pending-approve-btn {
    padding: 5px 12px; background: #dcfce7; color: #14532d;
    border: 0.5px solid #86efac; border-radius: 6px;
    font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer;
  }
  .pending-approve-btn:hover { background: #bbf7d0; }
  .pending-approve-btn:disabled { opacity: 0.5; cursor: default; }
  .pending-reject-btn {
    padding: 5px 12px; background: #fee2e2; color: #991b1b;
    border: 0.5px solid #fca5a5; border-radius: 6px;
    font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer;
  }
  .pending-reject-btn:hover { background: #fecaca; }
  .pa-form {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 8px 12px; background: #f8fafc;
    border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm);
    margin-bottom: 6px; margin-top: -2px;
  }

  /* ── SESSIONS VIEW TOGGLE & GRID ────────────────────────────────────────────── */
  .sv-tab-header {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-bottom: 16px;
  }
  .sv-view-btns { margin-left: auto; display: flex; gap: 3px; flex-shrink: 0; }
  .sv-vbtn {
    padding: 5px 11px; background: var(--surface);
    border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm);
    font-size: 15px; cursor: pointer; font-family: inherit;
    color: var(--text-secondary); line-height: 1; transition: all 0.12s;
  }
  .sv-vbtn.active { background: var(--navy-dark); color: #fff; border-color: var(--navy-dark); }
  .sv-vbtn:hover:not(.active) { background: var(--navy-light); color: var(--navy-dark); }

  .sv-ics-btn {
    padding: 5px 10px; background: var(--surface);
    border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm);
    font-size: 12px; cursor: pointer; font-family: inherit;
    color: var(--text-secondary); font-weight: 500; transition: all 0.12s; white-space: nowrap;
  }
  .sv-ics-btn:hover { background: var(--navy-light); color: var(--navy-dark); border-color: var(--navy-mid); }

  /* Session grid layout */
  .sv-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .sv-grid-scroll::-webkit-scrollbar { display: none; }
  .sv-grid {
    display: grid;
    grid-template-columns: 64px repeat(7, minmax(168px, 1fr));
    min-width: calc(64px + 7 * 168px);
    border: 0.5px solid var(--border-strong); border-radius: var(--radius);
    overflow: hidden; background: var(--border); gap: 0.5px; margin-bottom: 16px;
  }
  .sv-corner { background: #f3f4f2; }
  .sv-day-hdr { background: #f9f9f7; padding: 8px 6px; text-align: center; }
  .sv-day-hdr.sv-today { background: #fef2f2; }
  .sv-day-name {
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.07em;
  }
  .sv-day-date {
    font-size: 13px; font-family: 'DM Serif Display', serif; color: var(--text); margin-top: 2px;
  }
  .sv-day-hdr.sv-today .sv-day-name { color: var(--navy-dark); }
  .sv-band-label {
    background: #f9f9f7; padding: 5px 7px;
    font-size: 10px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.06em;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    border-right: 0.5px solid var(--border); line-height: 1.3; text-align: center;
  }
  .sv-cell {
    background: var(--surface); padding: 5px;
    display: flex; flex-wrap: wrap; gap: 4px;
    align-items: flex-start; align-content: flex-start; min-height: 72px;
  }

  /* Session chip */
  .sv-chip {
    display: flex; flex-direction: column; justify-content: space-between;
    border-left: 3px solid #6b7280;
    border-top: 0.5px solid rgba(0,0,0,0.06);
    border-right: 0.5px solid rgba(0,0,0,0.06);
    border-bottom: 0.5px solid rgba(0,0,0,0.06);
    border-radius: 5px; padding: 5px 7px; cursor: pointer;
    min-width: 90px; max-width: 150px; min-height: 50px;
    transition: box-shadow 0.12s, opacity 0.12s; user-select: none;
  }
  .sv-chip:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.13); }
  .sv-chip-blocked { opacity: 0.45; }
  .sv-chip-me { outline: 2px solid #16a34a; outline-offset: -1px; }
  .sv-chip-top { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }
  .sv-chip-grp { font-size: 11px; font-weight: 700; flex-shrink: 0; }
  .sv-chip-time { font-size: 10px; opacity: 0.7; font-variant-numeric: tabular-nums; flex: 1; min-width: 0; }
  .sv-chip-tick {
    font-size: 9px; font-weight: 700; color: #166534; background: #dcfce7;
    border-radius: 3px; padding: 1px 3px; flex-shrink: 0;
  }
  .sv-chip-lock { font-size: 10px; flex-shrink: 0; line-height: 1; }
  .sv-chip-type { font-size: 10px; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ── MOBILE (≤768px) ─────────────────────────────────────────────────────────── */
  @media (max-width: 768px) {

    /* Nav — hide desktop chrome, show hamburger */
    .nav-links        { display: none; }
    #nav-av           { display: none; }
    #nav-profile-name { display: none; }
    #nav-captain-badge { display: none !important; }
    #nav-signout-btn  { display: none; }
    #nav-hamburger    { display: flex; }

    /* Sessions — tabs scrollable horizontally */
    .tabs {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      flex-wrap: nowrap;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tab {
      white-space: nowrap;
      flex-shrink: 0;
      min-height: 44px;
      display: flex;
      align-items: center;
    }

    /* Gender filter pills + squad legend can wrap */
    .gender-tabs { flex-wrap: wrap; }
    .gtab { min-height: 44px; }
    .legend { flex-wrap: wrap; }

    /* Session cards — near-full-width, one visible at a time */
    .session-card {
      flex: 0 0 calc(100vw - 88px);
      min-width: calc(100vw - 88px);
    }

    /* Modal — bottom sheet */
    .modal-bg { align-items: flex-end; }
    .modal {
      width: 100%;
      max-width: 100%;
      border-radius: 20px 20px 0 0;
      max-height: 88vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      animation: slide-up 0.2s ease;
    }
    @keyframes slide-up {
      from { transform: translateY(24px); opacity: 0; }
      to   { transform: translateY(0);    opacity: 1; }
    }
    .user-list { flex: 1; max-height: none; }

    /* Minimum 44px tap targets */
    .btn-nav { min-height: 44px; min-width: 44px; }
    .b-ok, .b-no { min-height: 44px; }

    /* Prevent iOS auto-zoom on input focus */
    input, select, textarea { font-size: 16px; }
  }

/* ── Roster inner tabs ───────────────────────────────────────────────────── */
.roster-inner-tabs {
  display: flex; gap: 0; margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.roster-inner-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 7px 14px; margin-bottom: -1px;
  font-size: 13px; font-weight: 500; font-family: inherit;
  color: var(--text-secondary); cursor: pointer;
  transition: color 0.15s;
}
.roster-inner-tab:hover { color: var(--text); }
.roster-inner-tab.active { color: var(--navy-dark); border-bottom-color: var(--navy-dark); }

/* ── Boat cards ──────────────────────────────────────────────────────────── */
.boat-cards { display: flex; flex-direction: column; gap: 8px; }
.boat-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius);
}
.boat-card-main { flex: 1; min-width: 0; }
.boat-card-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.boat-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.r-chip.boat-rigged   { background: #dcfce7; color: #14532d; }
.r-chip.boat-unrigged { background: #fef9c3; color: #713f12; }
