/* ── SCHEDULE (#31) ──
   The Schedule pane (week strip + session list + editor) and the session-detail modal that both
   this pane and Home's schedule card open. Same restrained system as home.css: white cards,
   hairline borders, AJ green reserved for state rather than decoration. */

    /* ── week strip ── */
    .sch-wk__bar{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.9rem}
    .sch-wk__range{font-family:var(--fb);font-size:.76rem;font-weight:600;color:var(--t2);margin-right:auto}
    .sch-wk{display:grid;grid-template-columns:repeat(7,1fr);gap:.4rem}
    .sch-wk__col{background:var(--s2);border:1px solid var(--b1);border-radius:11px;padding:.5rem .4rem;min-height:92px;display:flex;flex-direction:column;gap:.3rem}
    .sch-wk__col--today{background:var(--lime-d);border-color:var(--lime)}
    .sch-wk__day{font-family:var(--fb);font-size:.66rem;font-weight:700;color:var(--t2);text-align:center;line-height:1.3}
    .sch-wk__day span{display:block;font-weight:500;font-size:.6rem;color:var(--t4)}
    .sch-wk__empty{font-family:var(--fb);font-size:.7rem;color:var(--t4);text-align:center;margin-top:.4rem}
    .sch-chip{display:flex;flex-direction:column;gap:.05rem;width:100%;text-align:left;padding:.34rem .4rem;border-radius:7px;background:var(--s1);border:1px solid var(--b1);border-left:3px solid var(--b3);cursor:pointer;transition:all var(--ease)}
    .sch-chip:hover{border-color:var(--b3);box-shadow:var(--sh)}
    .sch-chip__t{font-family:var(--fb);font-size:.6rem;font-weight:700;color:var(--t3)}
    .sch-chip__n{font-family:var(--fb);font-size:.66rem;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

    /* ── session list ── */
    .sch-list{display:flex;flex-direction:column;margin-top:.9rem}
    .sch-row{display:flex;align-items:center;gap:.5rem;padding:.4rem .25rem;border-bottom:1px solid var(--b1)}
    .sch-row:last-child{border-bottom:0}
    .sch-row__bar{width:3px;align-self:stretch;min-height:38px;border-radius:2px;background:var(--b3);flex-shrink:0}
    /* The whole time+name area opens the attendance detail. A button, not a click handler on the
       div, so it is keyboard-reachable and announces itself — the edit/delete controls stay
       outside it rather than nesting interactive elements. */
    .sch-row__open{display:flex;align-items:center;gap:.8rem;flex:1;min-width:0;padding:.35rem .35rem;border-radius:9px;background:transparent;text-align:left;cursor:pointer;transition:background var(--ease)}
    .sch-row__open:hover:not(:disabled){background:var(--s2)}
    .sch-row__open:disabled{cursor:default;opacity:.55}
    .sch-row__time{display:flex;flex-direction:column;flex-shrink:0;width:72px}
    .sch-row__start{font-family:var(--fb);font-size:.78rem;font-weight:700;color:var(--text);white-space:nowrap}
    .sch-row__dur{font-family:var(--fb);font-size:.64rem;color:var(--t4)}
    .sch-row__main{display:flex;flex-direction:column;min-width:0;flex:1}
    .sch-row__next{font-family:var(--fb);font-size:.64rem;font-weight:600;color:var(--t3);white-space:nowrap;flex-shrink:0;padding-left:.4rem}
    .sch-row__name{font-family:var(--fb);font-size:.82rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .sch-row__meta{font-family:var(--fb);font-size:.68rem;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .sch-row__note{font-family:var(--fb);font-size:.66rem;color:var(--t4);margin-top:.1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .sch-row__actions{display:flex;gap:.35rem;flex-shrink:0}

    /* ── editor ── */
    .sch-form{background:var(--s2);border:1px solid var(--b1);border-radius:12px;padding:1.1rem 1.1rem .95rem;margin-top:.9rem}
    .sch-form__btns{display:flex;gap:.5rem;margin-top:1rem}
    .sch-days{display:flex;gap:.35rem;flex-wrap:wrap}
    .sch-day{font-family:var(--fb);font-size:.7rem;font-weight:700;min-width:44px;padding:.45rem .3rem;border:1px solid var(--b2);border-radius:9px;background:var(--s1);color:var(--t3);cursor:pointer;transition:all var(--ease)}
    .sch-day:hover{border-color:var(--b3);color:var(--t2)}
    .sch-day--on{background:var(--lime);border-color:var(--lime);color:var(--on-accent)}

    /* ── session detail modal ── */
    .sd-head{display:flex;align-items:flex-start;gap:.8rem;padding-bottom:.9rem;border-bottom:1px solid var(--b1)}
    .sd-head__main{min-width:0;flex:1}
    .sd-head__title{font-family:var(--fb);font-size:1.08rem;font-weight:700;letter-spacing:-.01em;color:var(--text)}
    .sd-head__meta{font-family:var(--fb);font-size:.74rem;color:var(--t2);margin-top:.15rem}
    .sd-head__date{font-family:var(--fb);font-size:.66rem;color:var(--t4);margin-top:.1rem}
    .sd-head__right{display:flex;align-items:center;gap:.5rem;flex-shrink:0}
    .sd-count{font-family:var(--fb);font-size:.78rem;color:var(--t2);padding:.8rem 0 .2rem}
    .sd-count b{font-size:1.15rem;font-weight:700;color:var(--text)}
    .sd-sec{margin-top:.9rem}
    .sd-sec__head{display:flex;align-items:center;gap:.4rem;font-family:var(--fb);font-size:.66rem;font-weight:700;letter-spacing:0;color:var(--t3);padding-bottom:.35rem;border-bottom:1px solid var(--b1)}
    .sd-sec__head span{margin-left:auto;font-weight:700;color:var(--t2)}
    .sd-ath{display:flex;align-items:center;gap:.65rem;padding:.5rem .1rem;border-bottom:1px solid var(--b1)}
    .sd-ath:last-child{border-bottom:0}
    .sd-ath__name{font-family:var(--fb);font-size:.78rem;font-weight:600;color:var(--text);min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .sd-ath__when{font-family:var(--fb);font-size:.66rem;color:var(--t4);white-space:nowrap}
    .sd-ath__mark{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;flex-shrink:0}
    .sd-ath__mark--in{background:var(--lime-d);color:var(--lime)}
    .sd-ath__mark--in .ic{width:12px;height:12px}
    .sd-ath__mark--out{border:1.5px dashed var(--b3)}
    .sd-none{font-family:var(--fb);font-size:.72rem;color:var(--t4);padding:.7rem .1rem}
    #schedModalBody .hd-linkbtn{margin-top:1.1rem}

    /* ── responsive ──
       Seven columns stop being a week and start being seven slivers below ~880px, so the strip
       reflows to a scrolling row that keeps each day wide enough to read a session name in. */
    @media(max-width:880px){
      .sch-wk{grid-template-columns:repeat(7,minmax(112px,1fr));overflow-x:auto;padding-bottom:.4rem}
    }
    @media(max-width:560px){
      /* .btn--ghost's desktop padding makes each of these nearly full-width, and flex-wrap then
         stacks them into three rows that push the week itself below the fold. The range gets its
         own line and the three controls share one. */
      .sch-wk__bar{gap:.35rem}
      .sch-wk__range{flex-basis:100%;margin-right:0;order:-1}
      .sch-wk__bar .btn--ghost{flex:1;padding:.5rem .35rem;font-size:.62rem;letter-spacing:.04em;text-align:center}
      .sch-wk__bar .btn--ghost .ic{margin-right:2px}
      .sch-row__open{flex-wrap:wrap;gap:.5rem}
      .sch-row__time{width:auto}
      .sch-row__main{flex-basis:100%;order:3}
      .sch-row__next{order:2;margin-left:auto;padding-left:0}
      .sch-day{min-width:38px;font-size:.66rem}
    }

    /* ── SESSION DETAIL: INLINE CHECK-IN PICKER ──
       Search, tick, check in — all inside the session modal, replacing the old hand-off to the
       separate check-in pane.

       The list is capped and scrolls on its own so a forty-athlete roster doesn't push the button
       to the far end of the modal. The button then sits in normal flow directly under it.

       It was briefly sticky, to keep it on screen when a long "Checked in" list above scrolls the
       modal. That is a real case, but sticky-inside-a-scrolling-sibling made the button hover over
       the middle of the list on a phone — trading a scroll for a control that overlaps the rows it
       acts on. Capping the list is the fix that actually holds: the button is always within a short
       scroll of the names, and it never covers them. */
    .sd-pick__search{margin:.6rem 0 .5rem;padding:.55rem .8rem;font-size:.82rem}
    .sd-pick__list{max-height:min(46vh,320px);overflow-y:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--b1);border-radius:var(--r);background:var(--s2)}
    .sd-pick{display:flex;align-items:center;gap:.65rem;padding:.5rem .7rem;border-bottom:1px solid var(--b1);cursor:pointer;transition:background var(--ease)}
    .sd-pick:last-child{border-bottom:0}
    .sd-pick:hover{background:var(--s3)}
    .sd-pick.is-on{background:var(--lime-d)}
    .sd-pick__box{width:17px;height:17px;flex-shrink:0;accent-color:var(--lime);cursor:pointer}
    .sd-pick__name{font-family:var(--fb);font-size:.78rem;font-weight:600;color:var(--text);min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .sd-pick__count{font-family:var(--fb);font-size:.66rem;color:var(--t4);white-space:nowrap;flex-shrink:0}
    /* Marks where the most-frequent group ends. Sticky so it stays legible while the list scrolls
       past it, rather than being a label you only see if you happen to stop in the right place. */
    .sd-pick__sep{position:sticky;top:0;z-index:1;font-family:var(--fb);font-size:.62rem;font-weight:700;color:var(--t4);background:var(--s2);padding:.4rem .7rem .25rem;border-bottom:1px solid var(--b1)}
    /* The sticky element is this band, not the button itself: pinning a bare button leaves the
       list visible through the gap around it as the modal scrolls underneath. */
    .sd-pick__foot{padding:.7rem 0 .1rem}
    .sd-pick__go{width:100%}
    .sd-pick__go:disabled{opacity:.45;cursor:default}
