/* The photoreal teacher (GURVA_TEACHER_BANK on): loaded by teacher.js only while the bank is switched on.
   The teacher is a still photo, never warped. While she speaks, a soft ring glows inside the frame and grows with how
   loud her voice is (--voice, 0 to 1, set by teacher.js; held at 0 for reduced motion, so the ring is then steady). */
.teacher-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.tile:has(.teacher-photo-img) { background: #D9DDE2; }
.teacher-photo::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 0 rgba(244, 211, 94, 0);
  transition: box-shadow 220ms ease;
}
.teacher-photo.is-speaking::before {
  box-shadow: inset 0 0 0 calc(3px + var(--voice, 0) * 6px) rgba(244, 211, 94, 0.9),
              inset 0 0 calc(14px + var(--voice, 0) * 24px) rgba(244, 211, 94, 0.5);
  transition: box-shadow 90ms linear;
}
/* the designer shows the whole still (1136 x 1408) */
.designer-tile:has(.teacher-photo-full) { aspect-ratio: 1136 / 1408; }
/* a picture that can't be loaded: the tile stays, plain */
.teacher-photo.no-portrait .teacher-photo-img { visibility: hidden; }

@media (max-width: 760px) {
  .teacher-photo.is-speaking::before {
    box-shadow: inset 0 0 0 calc(2px + var(--voice, 0) * 3px) rgba(244, 211, 94, 0.9),
                inset 0 0 calc(8px + var(--voice, 0) * 10px) rgba(244, 211, 94, 0.5);
  }
}
@media (prefers-reduced-motion: reduce) {
  .teacher-photo::before, .teacher-photo.is-speaking::before { transition: none; }
}

/* the motion loops (make_motion.py): over the photo, in its framing; only the one that fits the moment shows */
.teacher-motion { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block;
  opacity: 0; transition: opacity 180ms ease; pointer-events: none; }
.teacher-motion.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .teacher-motion { display: none; } }
/* her mouth from the voice's visemes, over the closed-mouth talking loop (make_motion.py --lips) */
.teacher-lips { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .teacher-lips { display: none; } }

/* The live face (live-face.js, GURVA_LIVE_FACE): her face drawn on the phone over the still, which shows again if the
   face can't run (no WebGL, no rig, too slow). */
.teacher-live { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.teacher-photo.is-live .teacher-photo-img { visibility: hidden; }
