.roster-layer {
  --row-height: 60px;
  --child-height: 44px;
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  padding: 80px 0 82px clamp(14px, 2.8vw, 54px);
  pointer-events: none;
}
body:not([data-screen="plaza"]) .roster-layer,
.roster-backdrop, .roster-menu-icon, #close-roster { display: none; }
.plaza-roster {
  --wheel-space: 202px;
  --cycle-height: calc(var(--parent-count, 1) * var(--row-height) + var(--child-count, 0) * var(--child-height));
  --wheel-height: min(var(--cycle-height), 5 * var(--row-height), max(var(--row-height), 100svh - var(--wheel-space)));
  position: relative;
  isolation: isolate;
  width: clamp(202px, 19vw, 270px);
  padding: 10px 8px 12px;
  pointer-events: auto;
  color: #173846;
}
/* Separate surfaces let both filters sample the moving plaza underneath. */
.plaza-roster::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -23px -24px -23px -20px;
  background: #edf6f91c;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  mask-image: radial-gradient(ellipse closest-side, #000 43%, #000c 69%, transparent);
  pointer-events: none;
}
.roster-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding-inline: 10px 0;
}
.roster-heading h2 { color: #294954; font-size: .85rem; font-weight: 650; }
.roster-wheel { position: relative; height: var(--wheel-height); }
.roster-wheel::before {
  content: "";
  position: absolute;
  inset: 50% -14px auto;
  height: calc(var(--row-height) + 16px);
  transform: translateY(-50%);
  pointer-events: none;
  background: #f5fcfe48;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  mask-image: radial-gradient(ellipse closest-side, #000 26%, #000c 54%, transparent);
}
.roster-list {
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  list-style: none;
  overflow-anchor: none;
}
.roster-list::-webkit-scrollbar { display: none; }
.roster-entry { display: flex; align-items: center; height: var(--row-height); }
.roster-person {
  display: flex;
  flex: 1;
  align-items: center;
  height: 100%;
  min-width: 0;
  padding-inline: 8px 0;
}
.roster-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  opacity: var(--row-opacity, .8);
  transform: scale(var(--row-scale, .87));
  transform-origin: left center;
}
.roster-portrait {
  flex: none;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  background: #cfdee2;
}
.roster-name {
  overflow: hidden;
  color: #17353e;
  font-size: 1.13rem;
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.roster-child { height: var(--child-height); }
.roster-child .roster-person { padding-inline: 34px 8px; }
.roster-child .roster-identity { gap: 7px; }
.roster-child .roster-portrait { width: 28px; height: 28px; }
.roster-child .roster-name { font-size: .92rem; font-weight: 550; }
.roster-eye {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  color: #325760;
  background: transparent;
}
.roster-heading h2, .roster-name { text-shadow: 0 0 2px #f6fbfd, 0 1px 5px #f6fbfdce; }
.roster-eye .ui-icon { width: 18px; height: 18px; filter: drop-shadow(0 0 2px #f6fbfd); }
.roster-eye[aria-pressed="false"] { color: #843946; }
.roster-person:focus-visible, .roster-eye:focus-visible { outline-offset: -3px; }
@media (hover: hover) {
  .roster-person:hover .roster-name { text-decoration: underline; text-underline-offset: 3px; }
  .roster-eye:hover { background: radial-gradient(ellipse closest-side, #e8f5f8bf 30%, transparent); }
}
@media (min-width: 741px) {
  #directory:has(.roster-layer:not([hidden])) .fallback-people {
    left: max(calc(clamp(14px, 2.8vw, 54px) + clamp(202px, 19vw, 270px) + 18px), calc((100% - 700px)/2));
  }
}
@media (max-width: 740px) {
  .roster-people-icon { display: none; }
  .roster-menu-icon { display: block; width: 20px; }
  .roster-layer {
    z-index: 7;
    align-items: end;
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
  }
  .roster-backdrop { display: block; position: absolute; inset: 0; background: #19323d4d; pointer-events: auto; }
  .plaza-roster {
    --wheel-space: 132px;
    width: min(290px, 100%);
    padding: 0 7px 10px;
  }
  .plaza-roster::before {
    inset: -32px -38px -38px -42px;
    background: #edf6f9b3;
    mask-image: radial-gradient(ellipse closest-side, #000 54%, #000d 75%, transparent);
  }
  .roster-heading { min-height: 45px; }
  .roster-heading h2 { font-size: 1rem; }
  #close-roster { display: inline-flex; }
}
