/* Full-bleed portrait, no decorative frame, colour wash or pretend background removal. */
.tm-teacher-avatar.tm-teacher-portrait{position:relative;overflow:hidden;padding:0;border:0;box-shadow:none;background:none}
.tm-teacher-portrait img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border:0;border-radius:inherit;box-shadow:none;display:block}
.tm-teacher-photo-dialog{box-sizing:border-box;width:min(540px,calc(100% - 32px));max-height:90dvh;overflow:auto;background:var(--tm-paper,#fff);color:var(--tm-ink,#253438);border:0;border-radius:12px;padding:32px}
.tm-teacher-photo-dialog::backdrop{background:#17232b88}
.tm-teacher-photo-dialog h2{font-size:30px;margin:10px 0 20px}
.tm-teacher-photo-dialog p{font-size:15px}
.tm-teacher-photo-dialog label{display:block;margin:20px 0}
.tm-teacher-photo-dialog input[type=checkbox]{margin-right:10px}
.tm-teacher-photo-dialog img{display:block;width:160px;height:160px;object-fit:cover;margin:16px 0;border:0;box-shadow:none}
.tm-teacher-photo-actions{display:flex;gap:16px;flex-wrap:wrap;margin-top:20px}

.tm-teacher-photo-dialog img[hidden]{display:none}
/* Owner-only review stays inside the ordinary Manage workspace. */
.tm-teacher-review-list{display:flex;gap:18px;flex-wrap:wrap;margin:22px 0}
.tm-teacher-review-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;max-width:640px;margin:24px 0}
.tm-teacher-review-pair figure{margin:0}.tm-teacher-review-pair img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border:0;box-shadow:none;display:block}.tm-teacher-review-pair img[hidden]{display:none}
.tm-teacher-review-pair figcaption{font-size:13px;margin-top:10px}.tm-teacher-review label{display:block;max-width:720px;margin:20px 0}.tm-teacher-review input[type=checkbox]{margin-right:10px}
@media(max-width:520px){.tm-teacher-review-pair{gap:12px}.tm-teacher-review .tm-teacher-photo-actions{flex-direction:column;align-items:flex-start}}

.tm-teacher-photo-crop[hidden]{display:none}.tm-teacher-photo-crop{border:0;padding:0;margin:20px 0}.tm-teacher-photo-crop input[type=range]{display:block;width:100%;min-height:32px}.tm-teacher-photo-dialog .tm-teacher-photo-crop label{margin:12px 0}.tm-teacher-photo-dialog img{width:256px;height:256px;max-width:100%}

/* Friendly public Learn portraits; never resize private account avatars. */
.tm-site #teachers .tm-teacher-row{--tm-directory-portrait-size:220px;grid-template-columns:var(--tm-directory-portrait-size) minmax(0,1fr) auto;gap:32px;padding:32px 0}
.tm-site #teachers .tm-teacher-row>.tm-teacher-avatar{width:var(--tm-directory-portrait-size);height:var(--tm-directory-portrait-size);max-width:100%;border-radius:20px;font-size:64px}
.tm-site #teachers .tm-teacher-row>div:not(.tm-teacher-avatar){min-width:0}
@media(max-width:1000px){
 .tm-site #teachers .tm-teacher-row{--tm-directory-portrait-size:180px;grid-template-columns:var(--tm-directory-portrait-size) minmax(0,1fr);gap:20px 28px}
 .tm-site #teachers .tm-teacher-row>.tm-teacher-avatar{grid-row:1 / span 2}
 .tm-site #teachers .tm-teacher-row>.tm-button{grid-column:2;justify-self:start}
}
@media(max-width:600px){
 .tm-site #teachers .tm-teacher-row{--tm-directory-portrait-size:220px;grid-template-columns:minmax(0,1fr);gap:20px}
 .tm-site #teachers .tm-teacher-row>.tm-teacher-avatar{grid-row:auto;justify-self:start}
 .tm-site #teachers .tm-teacher-row>.tm-button{grid-column:1;max-width:100%;white-space:normal}
}
/* The inline biography remains in the card text column with a comfortable tap target. */
.tm-site #teachers .tm-teacher-bio-more>summary{cursor:pointer;min-height:44px;padding:8px 0;font-weight:550}

/* Keep Close at the upper right, with a real 44px keyboard/touch target. */
.tm-teacher-photo-dialog .tm-teacher-photo-close{display:block;margin:0 0 12px auto;min-width:44px;min-height:44px;padding:8px 12px;color:inherit;background:transparent;border:1px solid currentColor;border-radius:8px;font:inherit;cursor:pointer}
.tm-teacher-photo-dialog .tm-teacher-photo-close:focus-visible{outline:3px solid var(--tm-ink,#253438);outline-offset:3px}
.tm-teacher-photo-notice,.tm-site .tm-teacher-photo-notice{box-sizing:border-box;max-width:880px;margin:20px auto;padding:16px 20px;border-left:4px solid #8574a8;border-radius:4px;background:#ede8f6;color:#253438;font:inherit;line-height:1.6}
.tm-teacher-photo-notice[hidden]{display:none}
@media(max-width:520px){.tm-teacher-photo-dialog{padding:20px}.tm-teacher-photo-dialog h2{font-size:26px}}

.tm-teacher-photo-dialog .tm-teacher-photo-close.tm-x{display:flex;position:sticky;top:0;z-index:2;margin:-16px -16px 0 auto;background:var(--tm-paper,#fff)}
