/* The fixed viewport reveals four rows while the two identical groups loop. */
.company-panel #service-list.rolling-viewport,
.teacher-panel #teacher-list.rolling-viewport {
  display:block; flex:1 1 auto; min-height:0; overflow:hidden;
  position:relative; scrollbar-width:none;
  -webkit-mask-image:linear-gradient(to bottom,transparent,black 5%,black 95%,transparent);
  mask-image:linear-gradient(to bottom,transparent,black 5%,black 95%,transparent);
}
.rolling-viewport::-webkit-scrollbar { display:none; }
.rolling-viewport:focus-visible { outline:2px solid #8ff1ff; outline-offset:-2px; }
.rolling-track { animation:roll-up var(--rolling-duration,120s) linear infinite; will-change:transform; }
.rolling-group { display:block; }
.company-panel .rolling-group .list-line,
.teacher-panel .rolling-group .teacher-row {
  box-sizing:border-box; height:var(--rolling-row-height,35px); min-height:0;
  margin:0; border-bottom:2px solid #031c32;
}
@keyframes roll-up { to { transform:translateY(-50%); } }
.rolling-footer { display:flex; align-items:center; justify-content:space-between; gap:5px; flex:none; min-height:22px; margin-top:4px; color:#91b8cb; font-size:clamp(9px,.6vw,18px); }
.rolling-footer>span:first-child { min-width:0; }
.rolling-hint { flex:none; color:#5bb9d2; white-space:nowrap; }
.rolling-hint::before { content:'↑ 持续滚动'; }
@media (prefers-reduced-motion:reduce) {
  .company-panel #service-list.rolling-viewport,.teacher-panel #teacher-list.rolling-viewport { overflow-y:auto; scrollbar-width:thin; mask-image:none; -webkit-mask-image:none; }
  .rolling-track { animation:none; will-change:auto; }
  .rolling-group[aria-hidden="true"] { display:none; }
  .rolling-hint::before { content:'可滚动查看'; }
}
