/* Coach filter: one capsule grows rightward from its original left edge. */
.cal-filter__row[data-frow="teacher"] .cal-filter__opts { flex: 1; min-width: 0; }
.cal-coach {
  position: relative; flex: 0 1 auto; min-width: 0;
  width: var(--coach-closed, 156px); max-width: 100%; height: 48px;
  border: 1px solid transparent; border-radius: 999px;
  background: transparent; overflow: hidden; isolation: isolate;
  transition: width .46s cubic-bezier(.22,.8,.25,1);
}
.cal-coach::before {
  content: ''; position: absolute; inset: -1px; z-index: -1;
  border: 1px solid var(--glass-border); border-radius: inherit;
  background: rgba(var(--surface-rgb), .045); pointer-events: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.cal-coach.is-open { width: var(--coach-open, 580px); }
.cal-coach.is-open::before {
  border-color: rgba(var(--accent-rgb), .38);
  background: rgba(var(--surface-rgb), .065);
  box-shadow: 0 5px 22px rgba(0,0,0,.08), inset 0 1px rgba(var(--surface-rgb), .06);
}
.cal-coach.is-picked:not(.is-open)::before { border-color: rgba(var(--accent-rgb), .4); background: var(--orange-soft); }
.cal-coach button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
.cal-coach__summary {
  position: absolute; left: 0; top: 0; height: 46px; width: max-content;
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px;
  border: 0; border-radius: inherit; background: transparent; color: var(--ink-dim);
  font-size: 14px; line-height: 1; cursor: pointer;
  opacity: 1; visibility: visible;
  transition: opacity .15s ease, visibility 0s;
}
.cal-coach__summary:hover { color: var(--ink); }
.cal-coach.is-picked .cal-coach__summary { color: var(--accent-text); }
.cal-coach.is-open .cal-coach__summary { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease, visibility 0s .15s; }
.cal-coach__expanded {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; padding: 6px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .15s ease, visibility 0s .15s;
}
.cal-coach.is-open .cal-coach__expanded { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.cal-coach__all, .cal-coach__close {
  display: grid; place-items: center; flex: none; width: 40px; height: 34px; padding: 0;
  border: 0; border-radius: 999px; color: var(--ink-faint); background: transparent; cursor: pointer;
  font-size: 11px; font-weight: 600; transition: color .18s, background .18s;
}
.cal-coach__all.is-on { color: var(--accent-text); background: var(--orange-soft); }
.cal-coach__close { width: 32px; }
.cal-coach__close .tl-ico { width: 16px; height: 16px; transform: rotate(90deg); }
.cal-coach__all:hover, .cal-coach__close:hover { color: var(--ink); background: rgba(var(--surface-rgb), .1); }
.cal-coach__viewport {
  flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  cursor: grab; scroll-padding-inline: 10px;
}
.cal-coach__viewport::-webkit-scrollbar { display: none; }
.cal-coach.has-after .cal-coach__viewport { mask-image: linear-gradient(to right, #000 calc(100% - 15px), transparent); }
.cal-coach.has-before .cal-coach__viewport { mask-image: linear-gradient(to right, transparent, #000 15px); }
.cal-coach.has-before.has-after .cal-coach__viewport { mask-image: linear-gradient(to right, transparent, #000 15px, #000 calc(100% - 15px), transparent); }
.cal-coach__rail { display: flex; align-items: center; width: max-content; }
.cal-coach__item {
  position: relative; display: flex; align-items: center; flex: 0 0 auto;
  width: max-content; height: 34px; gap: 5px; padding: 3px 6px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-dim);
  text-align: left; font-size: 13px; font-weight: 500; line-height: 1.3; cursor: pointer;
  transition: color .18s, background .18s;
}
.cal-coach__item:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 9px; bottom: 9px; width: 1px; background: rgba(var(--surface-rgb), .18); }
.cal-coach__name { min-width: 0; max-width: 13em; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.cal-coach__item .cal-fdrop__pic { width: 28px; height: 28px; border: 2px solid var(--bg-2); box-sizing: border-box; font-size: 12px; pointer-events: none; }
.cal-coach__item:hover { color: var(--ink); background: rgba(var(--surface-rgb), .07); }
.cal-coach__item.is-on { color: var(--accent-text); font-weight: 700; background: var(--orange-soft); }
.cal-coach__item.is-on .cal-fdrop__pic { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .7); }
.cal-coach.is-dragging .cal-coach__viewport { cursor: grabbing; user-select: none; }
.cal-coach.is-dragging .cal-coach__item { pointer-events: none; }
.cal-coach button:focus-visible, .cal-coach__viewport:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -3px; }
.cal-coach__name, .cal-coach__item::after, .cal-coach__all, .cal-coach__close { transition: opacity .14s ease, color .18s, background .18s; }
.cal-coach.is-opening, .cal-coach.is-measuring { transition: none; }
.cal-coach.is-opening .cal-coach__summary { opacity: 0; visibility: hidden; transition: none; }
.cal-coach.is-opening .cal-coach__item .cal-fdrop__pic,
.cal-coach.is-opening .cal-coach__name,
.cal-coach.is-opening .cal-coach__item::after,
.cal-coach.is-opening .cal-coach__all,
.cal-coach.is-opening .cal-coach__close { opacity: 0; transition: none; }
.cal-coach.is-opening .cal-coach__item { background: transparent; }
.cal-coach__flight { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.cal-coach__flight .cal-fdrop__pic {
  position: absolute; width: 28px; height: 28px; box-sizing: border-box;
  margin: 0; border: 2px solid var(--bg-2); box-shadow: 0 1px 4px #0003;
  font-size: 12px; transform-origin: center; will-change: transform;
}
.cal-coach.is-restoring, .cal-coach.is-restoring * { transition: none; }
@media (max-width: 720px) {
  .cal-toolbar .cal-filter__row[data-frow="teacher"] { max-width: 100%; }
  .cal-toolbar .cal-filter__row[data-frow="teacher"]:has(.cal-coach.is-open) { flex: 1 1 100%; }
  .cal-coach { height: 50px; }
  .cal-coach__summary { height: 48px; }
  .cal-coach__expanded { padding-block: 2px; }
  .cal-coach__all, .cal-coach__close, .cal-coach__item { height: 44px; }
  .cal-coach__item:not(:last-child)::after { top: 13px; bottom: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-coach, .cal-coach::before, .cal-coach * { transition: none !important; animation: none !important; }
}
