.teacher-switch-entry{margin-left:auto;display:flex;align-items:center;gap:8px;padding:5px 12px;border:1px solid #cbd8b9;border-radius:999px;background:#f9fcef;font-size:12px;white-space:nowrap}.teacher-switch-entry img{width:34px;height:34px;object-fit:contain}.teacher-avatar-dialog{width:min(780px,94vw);max-height:88dvh;border:1px solid #d4ddc8;border-radius:24px;padding:28px;color:#24331f;background:#fafcf5}.teacher-avatar-dialog::backdrop{background:#111d17a6;backdrop-filter:blur(4px)}.teacher-avatar-dialog h2{font-size:25px;margin:0 0 8px}.teacher-avatar-dialog p{font-size:13px;color:#6e7b61;line-height:1.7}.teacher-avatar-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:18px 0}.teacher-avatar-card{padding:9px 7px;border:2px solid #e1e7d6;border-radius:16px;background:#fff;font-size:12px;line-height:1.5}.teacher-avatar-card img{display:block;width:100%;height:145px;object-fit:contain;margin-bottom:7px}.teacher-avatar-card[aria-pressed=true]{border-color:#678537;background:#eef9d6;box-shadow:0 0 0 2px #d9ecb0}.teacher-avatar-dialog details{margin:15px 0}.teacher-avatar-dialog summary{cursor:pointer;font-size:13px}.teacher-companion{width:100%;text-align:center;margin-bottom:18px;border-bottom:1px solid #53634a;padding-bottom:18px}.teacher-portrait{display:block;width:100%;height:190px;object-fit:contain;filter:drop-shadow(0 9px 14px #0b130d30)}.teacher-companion-speech{display:block!important;color:#e3eddb;font-size:12px!important;line-height:1.7;margin:5px 0 10px}.teacher-change{border:1px solid #738267;border-radius:999px;padding:7px 9px;color:#e5f0d7;font-size:11px}.teacher-hero{position:absolute;right:25px;bottom:-10px;width:230px;height:250px;pointer-events:none}.teacher-hero img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 12px 16px #28421a16)}.learning-hero:has(.teacher-hero)::after{display:none}.learning-hero:has(.teacher-hero){padding-right:260px;overflow:hidden}.teacher-quick-style{padding:6px 10px;border:1px solid #ccd6bd;border-radius:20px;font-size:12px;margin-left:auto}.avatar-featured-buttons{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:15px 0}.avatar-featured-buttons button{padding:6px;border:1px solid #cbd5bd;border-radius:10px;font-size:10px}.avatar-featured-buttons img{width:100%;height:90px;object-fit:contain}.avatar-featured-buttons button[aria-pressed=true]{background:#ebf6d7;border-color:#6f8b42}
@media(max-width:1000px){.is-practicing .practice-sidebar{gap:16px;align-items:center}.is-practicing .teacher-companion{width:auto;display:flex;align-items:center;gap:12px;max-width:55%;padding:0;margin:0;border:0;text-align:left}.is-practicing .teacher-portrait{width:82px;height:102px;flex:none}.is-practicing .teacher-companion-speech{display:none!important}.is-practicing .teacher-change{font-size:10px}.teacher-avatar-card img{height:120px}}
@media(max-width:600px){.learner-bar{flex-wrap:wrap;gap:8px}.teacher-switch-entry{margin-left:auto;padding:3px 8px;font-size:11px}.teacher-switch-entry img{width:27px;height:27px}.teacher-avatar-dialog{padding:20px}.teacher-avatar-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.teacher-avatar-card img{height:105px}.teacher-avatar-dialog h2{font-size:21px}.learning-hero:has(.teacher-hero){padding-right:80px}.teacher-hero{right:-40px;width:160px;height:185px;opacity:.6;z-index:0}.learning-hero h1,.learning-hero p,.learning-hero>.eyebrow{position:relative;z-index:1}.is-practicing .teacher-companion{display:block;max-width:35%;width:90px;text-align:center}.is-practicing .teacher-portrait{height:90px;width:80px}.is-practicing .teacher-change{font-size:9px;padding:4px 5px}.is-practicing .practice-sidebar{gap:8px;padding:10px 14px}.is-practicing .practice-sidebar b{font-size:22px}.is-practicing .practice-sidebar>div:not(.teacher-companion){display:flex;flex-direction:column;gap:4px}.is-practicing .practice-sidebar>div:not(.teacher-companion) span{font-size:10px}.avatar-featured-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}}

.teacher-avatar-dialog{max-width:min(850px,94vw);width:min(850px,94vw)}.teacher-avatar-card img{object-fit:cover;object-position:center;height:175px}.teacher-portrait,.teacher-hero img{object-fit:cover;object-position:center}.avatar-featured-buttons img{object-fit:cover;object-position:center}.teacher-avatar-dialog .teacher-avatar-cards{align-items:stretch}@media(max-width:600px){.teacher-avatar-card img{height:130px}}

@media(min-width:1001px){.is-practicing .practice-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px 16px}.is-practicing .teacher-companion{grid-column:1/-1;padding-bottom:14px;margin:0}.is-practicing .teacher-portrait{height:170px}.is-practicing .practice-sidebar>p,.is-practicing .practice-sidebar .eyebrow{display:none}.is-practicing .practice-sidebar>div:not(.teacher-companion){text-align:center}.is-practicing .practice-sidebar b{font-size:31px;margin:3px 0}.is-practicing .practice-sidebar>div:not(.teacher-companion)>span{font-size:11px}}

/* The pose stays visible while its short entry motion runs. */
.teacher-companion{position:relative;isolation:isolate}
.teacher-portrait,#pet-image{transform-origin:50% 85%}
.teacher-companion[data-state="correct"]{border-bottom-color:#d9ff65;background:radial-gradient(ellipse at 50% 35%,#d9ff652b,transparent 70%);border-radius:18px}
.teacher-reaction-badge{display:inline-block!important;position:absolute;top:6px;right:0;padding:5px 9px;border-radius:999px;background:#d9ff65;color:#223419!important;font-size:13px!important;font-weight:800;line-height:1.4;box-shadow:0 3px 14px #12200d25;pointer-events:none}
.teacher-companion[data-state="incorrect"] .teacher-reaction-badge{background:#f5dfaa;color:#5b411d!important}
#pet[data-state="correct"] #pet-image{filter:drop-shadow(0 0 18px #d9ff6570)}
@media(max-width:600px){.teacher-reaction-badge{top:-6px;right:-8px;font-size:10px!important;padding:3px 6px}}

/* Shared local video reaction: the MP4 includes silence for 0--2s, praise for 2--4s. */
.teacher-reaction-video{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:16px;background:#f4f1ed;position:relative;z-index:2}
.teacher-portrait[hidden],#pet-image[hidden]{display:none!important}
.reaction-playing .teacher-reaction-badge{display:none!important}
.teacher-companion:has(.teacher-reaction-video){min-width:0}
.teacher-companion:has(.teacher-portrait[src*="idle-mature"]){background:#f5f2ed;border-radius:16px;padding:10px}
.teacher-companion:has(.teacher-portrait[src*="idle-mature"]) .teacher-companion-speech{color:#364531}
.teacher-companion:has(.teacher-portrait[src*="idle-mature"]) .teacher-change{color:#364531}
#pet.pet-inline{position:relative!important;inset:auto!important;width:100%;margin:0 0 20px;z-index:auto;transform:none}
#pet.pet-inline .pet-drag{width:100%;cursor:default;background:#f5f2ed;border-radius:16px;overflow:hidden}
#pet.pet-inline #pet-image{height:200px;width:100%;object-fit:contain}
#pet.pet-inline .pet-hint{display:none}
#pet.pet-inline .teacher-reaction-video{width:100%;height:auto}
@media(min-width:1001px){.is-practicing .practice-grid{grid-template-columns:240px minmax(0,1fr)}}
@media(max-width:1000px){#pet.pet-inline{max-width:260px;margin:0 auto 16px}.is-practicing .teacher-companion{width:150px;max-width:48%;display:block;text-align:center}.is-practicing .teacher-portrait{width:100%;height:115px}.is-practicing .teacher-reaction-video{width:100%;height:auto}}
/* Inline classroom media owns its height instead of the old draggable pet box. */
#pet.pet-inline .pet-drag{height:auto;touch-action:auto}
#pet.pet-inline #pet-image{display:block}
/* Fit every outfit inside the stage, including tall full-body portraits. */
.teacher-portrait,.teacher-hero img,.teacher-avatar-card img,.avatar-featured-buttons img{object-fit:contain;object-position:center center}
.teacher-portrait{box-sizing:border-box;padding:7px 3px}
.teacher-companion[data-state="idle"] .teacher-portrait,#pet[data-state="idle"] #pet-image{animation:teacher-idle-breathe 5.8s ease-in-out infinite;transform-origin:50% 90%}
@keyframes teacher-idle-breathe{0%,100%{transform:translateY(0) rotate(-.35deg) scale(.98)}50%{transform:translateY(-2px) rotate(.35deg) scale(.99)}}
.motion-paused .teacher-portrait,.motion-paused #pet-image{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.teacher-portrait,#pet-image{animation:none!important}}
.teacher-idle-video{display:block;width:100%;height:170px;object-fit:contain;object-position:center;border-radius:12px}
#pet.pet-inline .teacher-idle-video{height:200px}
.teacher-motion-toggle{display:block;margin:7px auto 0;padding:4px 7px;border:1px solid #738267;border-radius:999px;font-size:10px;color:inherit;background:transparent;cursor:pointer}
@media(max-width:1000px){.teacher-idle-video{height:115px}}
