.academy-owner-profile { display:grid; grid-template-columns:minmax(220px,.76fr) minmax(0,1.34fr); align-items:start; --tp-anchor-ratio:.18; --tp-wine:#570e26; --tp-border:#d8c9b6; color:#372a26; width:100%; margin:0 auto 28px; font-family:var(--sans,Arial,sans-serif); }
.academy-owner-profile *, .academy-owner-profile *::after, .academy-owner-profile *::before { box-sizing:border-box; }
.tp-intro { grid-area:1/2; z-index:1; display:grid; grid-template-columns:minmax(0,1fr); min-width:0; background:#fff9f0; border:1px solid var(--tp-border); overflow:hidden; border-radius:17px; }
.tp-lanyard { --slide:0px; --pull:0px; --lean:0deg; --turn:0deg; position:relative; display:grid; justify-items:center; align-content:start; min-width:0; grid-area:1/1/2/-1; z-index:0; height:calc(320px + var(--tp-page-top,0px)); margin-top:calc(-1 * var(--tp-page-top,0px)); isolation:isolate; pointer-events:none; }
.tp-weave { position:absolute; left:calc(var(--tp-anchor-ratio) * 100%); top:0; width:320px; height:128px; transform:translateX(-50%); overflow:visible; pointer-events:none; }
.tp-badge { appearance:none; position:absolute; top:108px; left:calc(var(--tp-anchor-ratio) * 100% - 77px); width:154px; height:216px; padding:0; border:0; border-radius:10px; background:transparent; color:#fff5e4; transform-origin:50% -30px; transform:translate(var(--slide),var(--pull)) perspective(700px) rotateZ(var(--lean)) rotateY(var(--turn)); cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; }
.tp-rig { position:fixed; inset:0; pointer-events:none; }
.tp-rig canvas { width:100%; height:100%; display:block; }
.tp-lanyard .tp-badge { pointer-events:auto; }
.tp-webgl .tp-weave,.tp-webgl .tp-badge > * { visibility:hidden; }
.tp-webgl .tp-badge { left:0; top:0; z-index:1; box-shadow:none; }
.tp-webgl .tp-badge:not(:focus-visible) { clip-path:var(--tp-hit-shape); }
.tp-badge img { pointer-events:none; -webkit-user-drag:none; }
.tp-badge.dragging { cursor:grabbing; }
.tp-tab { position:absolute; top:-31px; left:calc(50% - 15px); width:30px; height:43px; z-index:2; pointer-events:none; filter:drop-shadow(0 1px 1px #4d3c3629); }
.tp-face,.tp-back { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; border:1px solid #b7a28d; border-radius:10px; box-shadow:inset 0 0 0 1px #ffffff70,1px 2px 0 #8b7565,3px 8px 15px #4d352223; backface-visibility:hidden; transition:transform .48s ease; overflow:hidden; }
.tp-face,.tp-back { background:#3f0e11; color:#f2e4c9; }
.tp-face::before,.tp-back::before { content:""; position:absolute; top:6px; width:29px; height:5px; border-radius:5px; background:#715f50; box-shadow:inset 0 1px 2px #3c2927,0 1px 1px #fff8ee; }
.tp-face { justify-content:flex-end; padding-bottom:13px; isolation:isolate; }
.tp-face::before { z-index:2; }
.tp-face::after { content:""; position:absolute; inset:0; background:linear-gradient(to bottom,transparent 42%,rgba(34,7,10,.61) 70%,rgba(34,7,10,.72) 100%); pointer-events:none; }
.tp-portrait { position:absolute; inset:0; display:grid; place-items:center; overflow:hidden; background:#3f0e11; }
.tp-portrait img { width:100%; height:100%; object-fit:cover; }
.tp-portrait span { font:500 34px/1 var(--serif,Georgia,serif); }
.tp-face strong,.tp-face small { position:relative; z-index:1; color:#f2e4c9; text-shadow:0 1px 2px #20070b; }
.tp-face strong { max-width:90%; overflow-wrap:anywhere; font:600 18px/1.05 var(--serif,Georgia,serif); }
.tp-face small { margin-top:5px; font-size:11px; }
.tp-back { transform:perspective(500px) rotateY(-180deg); }
.tp-back img { width:54%; }
.tp-badge[aria-pressed=true] .tp-back { transform:perspective(500px) rotateY(0deg); }
.tp-badge[aria-pressed=true] .tp-face { transform:perspective(500px) rotateY(180deg); }
.tp-settings .tp-photo-setting { display:flex; align-items:center; flex-wrap:wrap; gap:5px 10px; margin:0; }
.tp-settings .tp-upload { position:relative; border-radius:99px; color:#62192e; border:1px solid #baa697; background:#fffaf2; min-height:42px; display:grid; place-items:center; padding:0 18px; cursor:pointer; font-size:13px; font-weight:600; }
.tp-upload:hover { background:#f2e4d5; }
.tp-settings .tp-upload input { padding:0; border:0; min-width:0; clip-path:inset(50%); height:1px; width:1px; position:absolute; overflow:hidden; }
.tp-upload:focus-within,.academy-owner-profile :is(button,input,select,summary):focus-visible { outline:3px solid #a37a3d; outline-offset:3px; }
.tp-upload-status { color:#65374b; font-size:11px; text-align:center; }
.tp-facts { padding:clamp(20px,3.5vw,45px); min-width:0; align-self:center; }
.tp-facts h1 { margin:0 0 19px; font:500 clamp(30px,4vw,52px)/1.04 var(--serif,Georgia,serif); color:#4a1020; overflow-wrap:anywhere; }
.tp-facts dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px 18px; margin:0; }
.tp-facts dl>div { min-width:0; }
.academy-owner-profile .tp-portrait-disclosure { margin:-9px 0 15px; color:var(--student-muted); font:400 12px/1.4 var(--sans,Arial,sans-serif); }
.tp-facts dt { font-size:12px; color:#715d50; }
.tp-facts dt small { display:inline-block; font-size:10px; color:#714b58; }
.tp-facts dd { margin:3px 0 0; font-weight:600; font-size:15px; overflow-wrap:anywhere; }
.tp-count { display:flex; align-items:center; gap:12px; margin-top:19px; padding-top:12px; }
.tp-count span { font-size:13px; font-weight:650; }
.tp-count small { display:block; font-weight:400; color:#715d50; margin-top:2px; }
.tp-intro { position:relative; margin-bottom:24px; }
.academy-owner-profile { --tp-count-size:56px; }
@media(max-width:580px) { .academy-owner-profile { --tp-count-size:34px; } }
@media(max-width:400px) { .academy-owner-profile { --tp-count-size:28px; } }
.academy-owner-profile .tp-counter { position:relative; display:inline-block; width:max-content; color:#fff6eb; font:600 var(--tp-count-size)/1 var(--sans,Arial,sans-serif); font-variant-numeric:lining-nums tabular-nums; direction:ltr; unicode-bidi:isolate; }
.tp-counter i { font:inherit; }
.tp-counter-value { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.tp-counter-wheels { display:flex; gap:6px; user-select:none; }
.tp-counter-digit { position:relative; display:grid; place-items:center; box-sizing:content-box; width:1ch; height:1em; padding:.18em .14em; border-radius:.18em; text-align:center; background:linear-gradient(180deg,#722b41,#4c182a); box-shadow:inset 0 0 0 1px rgb(53 13 29 / 20%),inset 0 1px 0 rgb(255 246 235 / 20%); }
.tp-counter-digit::before { content:attr(data-digit); }
.tp-counter-window { display:none; }
@media (prefers-reduced-motion:no-preference) {
  .tp-counter-digit:has(.tp-counter-window)::before { visibility:hidden; }
  .tp-counter-window { display:block; position:absolute; inset:.18em 0; overflow:hidden; }
  .tp-counter-window::after { content:attr(data-frames); display:block; white-space:pre; line-height:1; animation:tp-counter-roll 700ms cubic-bezier(.18,.86,.3,1.04) var(--delay) both; }
}
@keyframes tp-counter-roll { from { transform:translateY(var(--from)); filter:blur(0); } 28% { filter:blur(.6px); } to { transform:translateY(var(--to)); filter:blur(0); } }
@media(forced-colors:active) { .tp-counter-digit { color:CanvasText; outline:1px solid CanvasText; } }
.tp-edit {
  position:absolute; inset:12px 12px auto auto; z-index:3; display:grid; place-items:center;
  width:44px; height:44px; padding:0; border:0; border-radius:50%;
  background:transparent; color:var(--tp-wine); cursor:pointer; transition:background-color .18s ease,color .18s ease;
}
@media (hover:hover) { .tp-edit:hover { color:#fff9f0; background:var(--tp-wine); } }
.stage-participant .academy-owner-profile .tp-edit:focus-visible { outline:none; color:#fff9f0; background:var(--tp-wine); }
@media (forced-colors:active) { .stage-participant .academy-owner-profile .tp-edit:focus-visible { outline:2px solid Highlight; } }
.tp-facts h1 { padding-inline-end:42px; }
.tp-settings { display:grid; gap:12px; margin:0; min-width:0; }
.tp-editor-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:clamp(6px,1.7vw,18px); }
.tp-editor-row label { display:block; min-width:0; color:#665147; font:600 12px/1.35 var(--sans,Arial,sans-serif); }
.tp-editor-row label small { font:500 10px/1.35 var(--sans,Arial,sans-serif); }
.tp-editor-row input,.tp-editor-row select { display:block; min-width:0; width:100%; min-height:40px; margin-top:3px; padding:6px 7px; color:#372a26; border:1px solid #baa697; border-radius:6px; background:#fffaf1; font:500 16px/1.2 var(--sans,Arial,sans-serif); }
.tp-editor-time>div { display:grid; gap:7px; }
.tp-study-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(6px,1.7vw,18px); }
.tp-study-fields fieldset { min-width:0; border:0; padding:0; margin:0; }
.tp-study-fields legend { padding:0; margin-bottom:5px; color:#665147; font:600 12px/1.35 var(--sans,Arial,sans-serif); }
.tp-study-choices { display:flex; gap:4px; flex-wrap:wrap; }
.tp-study-choice { display:inline-flex; position:relative; align-items:center; cursor:pointer; }
.tp-study-choice input { position:absolute; width:1px; height:1px; clip-path:inset(50%); }
.tp-study-choice span { display:grid; place-items:center; min-width:30px; min-height:32px; padding:3px 7px; border:1px solid #baa697; border-radius:6px; color:#49332f; background:#fffaf1; font:600 13px/1.25 var(--sans,Arial,sans-serif); }
.tp-study-choice input:checked + span { background:var(--tp-wine); color:#fffaf1; border-color:var(--tp-wine); }
.tp-study-choice input:focus-visible + span { outline:2px solid #875421; outline-offset:2px; }
@media(forced-colors:active){ .tp-study-choice input:checked + span { border:3px double Highlight; } }
.tp-editor-actions { display:flex; gap:8px; align-items:flex-start; flex-wrap:wrap; }
.tp-catalogue-fields { display:grid; gap:12px; }
.tp-catalogue-fields label { color:var(--student-muted,#665147); font:600 12px/1.35 var(--sans,Arial,sans-serif); }
.tp-catalogue-fields textarea {
  display:block; box-sizing:border-box; width:100%; margin-top:4px; padding:8px 10px; resize:vertical;
  border:1px solid var(--student-border,#baa697); border-radius:6px; background:var(--student-surface,#fffaf1);
  color:var(--student-ink,#372a26); font:400 16px/1.4 var(--sans,Arial,sans-serif);
}
.tp-catalogue-fields textarea:focus-visible, .tp-video-dialog :is(button,video):focus-visible,
.tp-video-dialog .tp-upload:focus-within { outline:2px solid var(--student-accent,#62192e); outline-offset:2px; }
.tp-video-dialog {
  position:fixed; inset:0; box-sizing:border-box; width:min(960px,calc(100% - 24px)); max-width:100%;
  max-height:calc(100dvh - 24px); padding:0; margin:auto; overflow:hidden;
  border:1px solid var(--student-border,#baa697); border-radius:18px;
  color:var(--student-ink,#372a26); background:var(--student-surface,#fffaf1); box-shadow:0 22px 70px #24151b50;
}
.tp-video-dialog[open] { display:flex; flex-direction:column; }
.tp-video-dialog::backdrop { background:#201418bd; }
html:has(.tp-video-dialog[open]) { overflow:hidden; }
.tp-video-dialog > header, .tp-video-dialog > footer { flex:none; padding:12px clamp(12px,2.5vw,24px); }
.tp-video-dialog > header h2 { margin:0; font:500 clamp(20px,2.8vw,30px)/1.15 var(--serif,Georgia,serif); }
.tp-video-body {
  display:grid; grid-template-columns:minmax(235px,.72fr) minmax(0,1.28fr); align-items:start;
  gap:clamp(14px,2vw,24px); min-height:0; padding:4px clamp(12px,2.5vw,24px) 16px; overflow:auto; overscroll-behavior:contain;
}
.tp-showcase-form { display:grid; align-content:start; gap:12px; margin:0; }
.tp-showcase-form .tp-upload { justify-self:start; }
.tp-showcase-preview { min-width:0; }
.tp-showcase-preview > h3 { margin:0 0 8px; color:var(--student-muted,#665147); font:600 13px/1.4 var(--sans,Arial,sans-serif); }
@media(max-width:720px) { .tp-video-body { grid-template-columns:minmax(0,1fr); } }
.tp-video-dialog .cat-directory { border-radius:0; border-inline:0; }
.tp-video-dialog > footer { border-top:1px solid var(--student-border,#baa697); }
.tp-video-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.tp-video-dialog .tp-upload,.tp-video-actions .tp-video-cancel {
  position:relative; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; min-height:42px;
  padding:5px 14px; border:1px solid var(--student-border,#baa697); border-radius:99px;
  background:transparent; color:var(--student-accent,#62192e); font:600 13px/1.3 var(--sans,Arial,sans-serif);
}
.tp-video-actions .tp-video-cancel { border-color:transparent; }
.tp-video-dialog .tp-upload input { position:absolute; width:1px; height:1px; clip-path:inset(50%); }
.tp-video-actions button:disabled { opacity:.5; cursor:default; }
.tp-video-status:not(:empty) { display:block; margin-top:6px; overflow-wrap:anywhere; font-size:13px; }
.tp-save-status:empty,.tp-upload-status:empty { display:none; }
.tp-save-status { font-size:13px; color:#701b39; }
.stage-participant:has(.academy-owner-profile) #mast { background:transparent; }
@media(max-width:680px) {
  .academy-owner-profile { grid-template-columns:minmax(0,1fr); --tp-anchor-ratio:.5; }
  .tp-intro { grid-area:2/1; }
  .tp-lanyard { height:calc(287px + var(--tp-page-top,0px)); }
  .tp-facts { padding:22px 18px; }
}
@media(max-width:400px){ .tp-facts dl { column-gap:8px; } .tp-contact dd { font-size:13px; } .tp-editor-row input[type=date] { font-size:14px; } }
@media(prefers-reduced-motion:reduce){
  .tp-weave,.tp-badge,.tp-face,.tp-back { transition:none; }
}

.tp-student-balance { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,180px) minmax(0,340px); align-items:center; justify-content:center; gap:clamp(16px,3vw,38px); width:100%; margin:0 0 clamp(20px,3vw,36px); }
.academy-owner-profile .tp-intro { color:var(--student-ink); background:var(--student-surface); border-color:var(--student-border); }
.academy-owner-profile .tp-facts h1 { color:var(--student-ink); }
.academy-owner-profile .tp-facts :is(dt,dt small,legend,label) { color:var(--student-muted); }
.academy-owner-profile .tp-facts :where(input,select,.tp-study-choice span,.tp-upload) { color:var(--student-ink); background:var(--student-surface); border-color:var(--student-border); }
.academy-owner-profile .tp-facts .tp-upload { color:var(--student-accent); }
.academy-owner-profile .tp-facts .tp-upload:hover { background:var(--student-tint); }
.academy-owner-profile .tp-intro :is(.tp-upload-status,.tp-save-status,.tp-edit) { color:var(--student-accent); }
.academy-owner-profile .tp-intro :is(.btn,.tp-study-choice input:checked + span),
.stage-participant .academy-owner-profile .tp-edit:focus-visible { background:var(--student-accent); color:var(--student-surface); border-color:var(--student-accent); }
@media(hover:hover) { .academy-owner-profile .tp-intro .tp-edit:hover { background:var(--student-accent); color:var(--student-surface); } }
.stage-participant .academy-owner-profile .tp-intro :is(button,input,select,summary):focus-visible,
.stage-participant .academy-owner-profile .tp-upload:focus-within,
.stage-participant .academy-owner-profile .tp-study-choice input:focus-visible + span,
.stage-participant .academy-owner-profile .tp-teacher-actions a:focus-visible { outline-color:var(--student-accent); }
@media(forced-colors:active) {
  .academy-owner-profile .tp-intro .tp-study-choice input:checked + span { border-color:Highlight; }
  .stage-participant .academy-owner-profile .tp-edit:focus-visible { outline-color:Highlight; }
}

/* Assigned teacher, presented as a single landscape profile card. */
.tp-teacher-card { width:100%; min-width:0; perspective:1600px; touch-action:pan-y; }
.tp-teacher-frame { padding:5px; border:1px solid var(--student-border); border-radius:18px; background:var(--student-surface); }
.tp-teacher-tile { position:relative; isolation:isolate; overflow:hidden; display:grid; grid-template-columns:clamp(142px,18%,204px) minmax(0,1fr) auto; align-items:center; gap:clamp(12px,2.7vw,38px); min-height:156px; padding-right:clamp(16px,2.5vw,36px); border-radius:12px; color:var(--student-ink); background:var(--student-surface); }
.tp-teacher-tile::before,.tp-teacher-tile::after { content:""; position:absolute; z-index:-1; inset:0; pointer-events:none; border-radius:inherit; }
.tp-teacher-tile::before { opacity:.2; background:repeating-linear-gradient(129deg,transparent 0 8px,var(--student-tint) 9px,transparent 11px 20px); mask-image:linear-gradient(98deg,transparent 12%,#000 68%,transparent); }
.tp-teacher-tile::after { box-shadow:inset 0 0 0 1px var(--student-border); }
.tp-teacher-portrait { align-self:stretch; position:relative; display:grid; place-items:center; overflow:hidden; min-height:156px; background:var(--student-tint); mask-image:linear-gradient(90deg,#000 0 75%,transparent); }
.tp-teacher-photo { position:absolute; inset:-3px; width:calc(100% + 6px); height:calc(100% + 6px); max-width:none; object-fit:cover; object-position:50% 30%; }
.tp-teacher-monogram { display:grid; place-items:center; width:min(58%,82px); aspect-ratio:1; border:1px solid var(--student-border); border-radius:50%; outline:1px solid var(--student-border); outline-offset:4px; font:italic 500 clamp(30px,3vw,43px)/1 var(--serif,Georgia,serif); color:var(--student-accent); }
.tp-teacher-portrait:has(.tp-teacher-photo) .tp-teacher-monogram { visibility:hidden; }
.tp-teacher-caption { min-width:0; padding:12px 0; }
.student-profile .tp-teacher-caption p { margin:4px 0 0; color:var(--student-muted); font:500 13px/1.3 var(--sans,Arial,sans-serif); }
.student-profile .tp-teacher-name { margin:0; color:var(--student-ink); font:600 clamp(23px,2.7vw,38px)/1.12 var(--serif,Georgia,serif); overflow-wrap:anywhere; }
.tp-teacher-demo { display:none; }
.tp-teacher-tile:has([data-portrait-source=demo]) .tp-teacher-demo { display:block; position:absolute; bottom:5px; left:4px; padding:2px 4px; border-radius:4px; color:var(--student-muted); background:var(--student-surface); font:500 10px/1.2 var(--sans,Arial,sans-serif); pointer-events:none; }
.tp-teacher-actions { display:flex; align-items:center; gap:8px; }
.tp-teacher-actions a { display:flex; align-items:center; justify-content:center; min-height:44px; padding:8px 14px; border:1px solid var(--student-border); border-radius:9px; font:600 14px/1.25 var(--sans,Arial,sans-serif); color:var(--student-accent); background:var(--student-tint); text-align:center; text-decoration:none; }
.tp-teacher-actions [data-tp-book-teacher] { color:var(--student-surface); background:var(--student-accent); border-color:var(--student-accent); }
.tp-teacher-actions [data-tp-message-teacher] { flex:0 0 44px; width:44px; padding:0; }
.tp-teacher-actions [data-tp-message-teacher] svg { display:block; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linejoin:round; stroke-linecap:round; }
.tp-teacher-actions a:focus-visible { outline:2px solid var(--student-accent); outline-offset:2px; }
@media(hover:hover) { .tp-teacher-actions a:hover { text-decoration:underline; text-underline-offset:3px; } }
.tp-teacher-unassigned { text-align:center; padding:20px 8px; color:var(--student-muted); }
.tp-teacher-unassigned p { margin:6px 0 0; font-size:13px; }
@media(max-width:700px) {
  .tp-teacher-tile { grid-template-columns:clamp(82px,30%,150px) minmax(0,1fr); gap:2px 12px; padding-right:12px; min-height:160px; }
  .tp-teacher-portrait { grid-row:1 / 3; min-height:160px; }
  .tp-teacher-caption { align-self:end; padding:12px 0 4px; }
  .tp-teacher-actions { flex-wrap:wrap; align-self:start; gap:5px; padding:0 0 10px; }
  .tp-teacher-actions a { padding:5px 9px; font-size:12px; }
}
.tp-student-counts { min-width:0; width:100%; }
.tp-student-totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:clamp(8px,2vw,24px); max-width:420px; margin:0 auto; padding:0; }
.tp-student-balance .tp-counter-digit { background:linear-gradient(180deg,#fff4e1,#e7d5bb); color:#43182a; box-shadow:inset 0 0 0 1px #cab499,inset 0 2px 0 #fffaf1; }
.tp-student-balance .tp-unknown-count { order:-1; position:relative; display:grid; place-items:center; min-height:1.36em; color:#43182a; font:600 var(--tp-count-size)/1 var(--sans,Arial,sans-serif); }
@media(max-width:580px) {
  .tp-student-balance { grid-template-columns:minmax(0,138px) minmax(0,145px); gap:12px; }
  .tp-student-totals { grid-template-columns:minmax(0,1fr); gap:16px; }
}
.tp-student-totals > div { container-type:inline-size; display:flex; flex-direction:column; align-items:center; gap:12px; min-width:0; text-align:center; }
.tp-student-totals dt { color:#624b43; font:550 13px/16px var(--sans,Arial,sans-serif); overflow-wrap:anywhere; }
.tp-student-totals dd { margin:0; }
.tp-student-totals dd:has(.tp-counter) { order:-1; }
.tp-workshop-note { color:#6b5347; font:400 12px/1.3 var(--sans,Arial,sans-serif); }
.tp-student-totals .tp-counter { font-size:min(var(--tp-count-size),calc((100cqw + 6px) / var(--places) - 6px)); }
.tp-balance-note { color:#6b5347; margin:10px 0 0; text-align:center; font-size:12px; line-height:1.4; }


/* The personal profile keeps its original first row and top-mounted lanyard. */
.tp-action-row {
  grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
}
.tp-action-row .tp-teacher-frame,.tp-gift-card,.tp-action-row .tp-teacher-unassigned {
  position:relative; height:100%; box-sizing:border-box; border:1px solid var(--student-border);
  border-radius:20px; background:var(--student-surface);
}
.tp-action-row .tp-teacher-tile {
  height:100%; grid-template-columns:clamp(82px,30%,150px) minmax(0,1fr);
  gap:clamp(24px,2.2vw,32px) clamp(24px,calc(16% - 20px),48px);
  padding-right:clamp(6px,calc(10% - 22px),12px);
}
.tp-action-row .tp-teacher-portrait { grid-row:1/3; }
.tp-action-row .tp-teacher-caption { align-self:end; padding-bottom:0; }
.tp-action-row .tp-teacher-actions {
  align-self:start; flex-wrap:wrap; gap:12px clamp(14px,1.4vw,20px); padding-bottom:12px;
}
.tp-action-row [data-tp-book-teacher] { min-width:44px; padding-inline:clamp(6px,1vw,14px); }
.tp-teacher-tile::before,.tp-teacher-tile::after { content:none; }
.tp-gift-card {
  --sop-accent:#97502f;
  display:flex; align-items:center; min-height:100px; padding:9px clamp(16px,2.4vw,32px);
  overflow:hidden; isolation:isolate; container-type:inline-size;
  color:#4e1526; background:linear-gradient(110deg,#fffaf0 18%,#fbf2e2 70%,#f4e7cf);
  border-color:#d9c7aa; text-decoration:none;
}
.tp-gift-card::before {
  content:""; position:absolute; z-index:1; inset:0 auto 0 0; width:4px; pointer-events:none;
  background:repeating-linear-gradient(145deg,#8a2835 0 9px,#f6e9cd 9px 17px,#425747 17px 26px,#f6e9cd 26px 34px);
}
.tp-gift-copy {
  position:relative; z-index:1; align-self:stretch; display:flex; flex-direction:column;
  align-items:flex-start; justify-content:center; width:60%; margin-inline-start:clamp(8px,2.4cqw,15px);
  gap:clamp(12px,3cqw,18px);
}
.tp-gift-title { font:600 clamp(20px,6.1cqw,35px)/1.01 var(--serif,Georgia,serif); text-wrap:balance; }
.tp-gift-wish { color:#644638; font:400 clamp(12px,2.6cqw,15px)/1.2 var(--serif,Georgia,serif); }
.tp-gift-cta {
  color:#641d31; font:650 clamp(11px,2.4cqw,14px)/1.2 var(--sans,Arial,sans-serif);
  text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.2em;
}
.tp-gift-art {
  position:absolute; inset:0 0 0 auto; height:100%; aspect-ratio:240/184; max-width:49%;
  container-type:inline-size; pointer-events:none;
  background:url("assets/new-year-gift-engraving.webp") center/100% 100% no-repeat;
}
.tp-gift-tag {
  position:absolute; left:32%; top:23%; width:43%; height:67%; display:flex;
  flex-direction:column; justify-content:center; align-items:center; gap:4%; padding-top:8%; box-sizing:border-box;
  background:#fff6dc; color:#5b1928; border:1px solid #bea177; border-radius:16% 16% 4% 4% / 12% 12% 3% 3%;
  box-shadow:inset 0 0 0 2px #fff9e9,inset 0 0 0 3px #dcc5a0,1px 2px 2px #61391b2b;
  transform-origin:50% 3%; transform:rotate(8deg);
}
.tp-gift-tag::before {
  content:""; position:absolute; top:5%; left:50%; transform:translateX(-50%);
  width:clamp(2px,2.5cqw,5px); aspect-ratio:1; border-radius:50%;
  background:#7a4930; box-shadow:0 0 0 1px #d6b77d;
}
.tp-gift-brand { font:600 clamp(7px,4.9cqw,11px)/1 var(--serif,Georgia,serif); letter-spacing:.11em; }
.tp-gift-tag i { font:italic 500 clamp(13px,11.8cqw,28px)/.87 var(--serif,Georgia,serif); text-align:center; }
@media (hover:hover) {
  .tp-gift-card:hover .tp-gift-cta { color:#4d1525; text-decoration-thickness:2px; }
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .tp-gift-card:is(:hover,:focus-visible) .tp-gift-tag { animation:tp-gift-swing .75s ease-out; }
  @keyframes tp-gift-swing { 30% {transform:rotate(4deg)} 60% {transform:rotate(10deg)} }
}
@media (forced-colors:active) {
  .tp-gift-art,.tp-gift-card::before { display:none; }
  .tp-gift-cta { color:LinkText; }
}
.tp-gift-card:focus-visible { outline:2px solid var(--student-accent); outline-offset:2px; }
.sheet.student-winter { isolation:isolate; }
.sheet.student-winter > academy-pixel-snow { position:fixed; inset:0; z-index:-1; pointer-events:none; }
@media(max-width:720px) {
  .tp-action-row { grid-template-columns:minmax(0,1fr); }
  .tp-gift-card { padding-block:5px 7px; }
  .tp-gift-copy { gap:12px; }
}
.student-profile .tp-overview {
  --overview-gap:clamp(8px,1vw,16px);
  grid-column:1 / -1;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;
  gap:var(--overview-gap);
  width:100%;
  margin:var(--overview-gap) 0 24px;
}
:is(.student-profile,.role-view-teacher) .soc-calendar {
  display:flex;
  flex-direction:column;
  align-self:start;
  gap:0;
  border-radius:16px;
}
@media(max-width:720px) {
  .student-profile .tp-overview { grid-template-columns:1fr; }
}

@media(min-width:721px){.tp-overview > .sop-progress {grid-template-rows:auto minmax(min-content,1fr); align-content:stretch;}}

.tp-calendar-column { --calendar-inline-inset:clamp(16px,7.5%,48px); min-width:0; align-self:start; display:grid; gap:var(--overview-gap); }

.tp-calendar-column > :is(.soc-calendar,.sde-card) { padding-inline:var(--calendar-inline-inset); }

/* The badge, profile, actions and overview share the same dashboard frame. */
.academy-owner-profile:is(.student-profile,.teacher-profile),
.teacher-dashboard > :is(.teacher-overview,.teacher-assessments,.teacher-roster) {
  width:min(1200px,calc(100% - clamp(8px,calc(26vw - 155px),16%)));
  margin-inline:auto;
}
@media(min-width:721px) {
  .tp-calendar-column { align-self:stretch; grid-template-rows:auto minmax(min-content,1fr); }
}

@media(min-width:1024px) {
  .student-profile .tp-overview {
    grid-template-areas:"skills calendar" "exercise exercise" "progress progress";
    reading-flow:grid-rows;
  }
  .student-profile .tp-overview > :is(.sop-progress,.tp-calendar-column) { display:contents; }
  .student-profile .tp-overview .sop-dials { grid-area:skills; }
  .student-profile .tp-overview .sop-skill { aspect-ratio:auto; }
  .student-profile .tp-overview .soc-calendar { grid-area:calendar; align-self:stretch; }
  .student-profile .tp-overview .sde-card { grid-area:exercise; }
  .student-profile .tp-overview .sop-summary { grid-area:progress; }
}

/* Teacher dashboard uses the same frame, card surfaces and action scale as the student's. */
.role-view-teacher .teacher-profile { margin-bottom:0; }
@media (min-width:680.01px) {
  .teacher-profile > .tp-lanyard { --tp-aligned-card-top:var(--tp-page-top); }
  .teacher-profile > .tp-lanyard:not(.tp-webgl) .tp-badge { top:var(--tp-aligned-card-top); }
}
.teacher-dashboard {
  --teacher-gap:12px;
  --teacher-inset:clamp(16px,2.2vw,28px);
  display:grid; gap:var(--teacher-gap); margin:0 auto 24px; min-width:0;
  color:var(--student-ink); font-family:var(--sans,Arial,sans-serif);
}
.teacher-dashboard :is(.teacher-overview,.teacher-assessments) {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--teacher-gap); min-width:0;
}
.teacher-dashboard .teacher-assessments { align-items:start; }
.teacher-assessments > :only-child { grid-column:1/-1; }
.teacher-dashboard :is(.teacher-card,.role-speaking,.lf-dashboard) {
  position:relative; min-width:0; margin:0; padding:var(--teacher-inset);
  border:1px solid var(--student-border); border-radius:20px; background:var(--student-surface);
  overflow-wrap:anywhere;
}
.teacher-dashboard :where(.teacher-overview,.teacher-assessments) h2,.teacher-dashboard .role-speaking > summary {
  color:var(--student-accent); font:600 clamp(22px,2vw,29px)/1.1 var(--serif,Georgia,serif);
  letter-spacing:-.02em; margin:0;
}
.teacher-dashboard :where(.teacher-overview,.teacher-assessments) h3 {
  color:var(--student-ink); font:600 clamp(17px,1.5vw,22px)/1.18 var(--serif,Georgia,serif); margin:0;
}
.teacher-dashboard :is(.teacher-card,.role-speaking,.lf-dashboard) > p { font-size:14px; line-height:1.45; }
.teacher-actions,.teacher-agenda-head { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; }
.teacher-dashboard .teacher-actions .role-text,.teacher-dashboard :is(.teacher-agenda-head,.teacher-day-detail) > .role-text {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  max-width:100%; min-height:44px; padding:5px 0; border:0; color:var(--student-accent);
  background:transparent; text-decoration:underline; text-underline-offset:3px; font:600 13px/1.3 var(--sans,Arial,sans-serif);
}
.teacher-dashboard .teacher-assessments button {
  padding:8px 14px; min-height:44px; border:1px solid var(--student-accent); border-radius:9px;
  background:var(--student-accent); color:var(--student-surface); font:600 14px/1.25 var(--sans,Arial,sans-serif);
  text-decoration:none;
}
.teacher-lessons,.teacher-slots { list-style:none; padding:0; margin:0; }
.teacher-lessons li + li { border-top:1px solid var(--student-border); }
.teacher-stats { container:teacher-metrics / inline-size; }
.teacher-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:16px 0; }
.teacher-totals > div { display:flex; flex-direction:column; align-items:center; gap:7px; padding:12px 4px; background:var(--student-tint); border-radius:12px; }
.teacher-totals dt { color:var(--student-muted); font:550 12px/1.25 var(--sans,Arial,sans-serif); text-align:center; }
.teacher-totals dd { order:-1; margin:0; color:var(--student-accent); font:600 clamp(27px,3.2vw,44px)/1 var(--serif,Georgia,serif); font-variant-numeric:lining-nums tabular-nums; }
.teacher-stats .member-activity {
  grid-template-columns:1fr; gap:12px; margin:0; padding:16px 0 0; border:0; border-top:1px solid var(--student-border);
  border-radius:0; background:transparent;
}
.teacher-stats .member-activity h3 { color:var(--student-accent); }
.teacher-agenda-head { justify-content:space-between; }
.teacher-agenda-head h2 { flex:1 1 10ch; }
.teacher-dashboard .teacher-agenda .role-switch { margin-block:8px 14px; gap:4px; }
.teacher-dashboard .teacher-agenda .role-choice {
  min-height:38px; padding:6px 10px; font:600 13px/1.2 var(--sans,Arial,sans-serif);
  border:1px solid var(--student-border); border-radius:9px; color:var(--student-accent); background:var(--student-surface);
}
.teacher-dashboard .teacher-agenda .role-choice[aria-pressed=true] { background:var(--student-accent); color:var(--student-surface); border-color:var(--student-accent); }
.teacher-week-nav { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.teacher-week-nav strong { font:600 clamp(18px,1.7vw,25px)/1.12 var(--serif,Georgia,serif); color:var(--student-accent); }
.teacher-week-nav strong::first-letter,.teacher-day small::first-letter { text-transform:uppercase; }
.teacher-week-nav button { display:grid; place-items:center; width:38px; height:38px; padding:0; border-radius:50%; color:var(--student-accent); }
.teacher-week-nav svg { width:16px; height:16px; }
.teacher-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; margin:4px 0 12px; }
.teacher-day { display:flex; position:relative; flex-direction:column; align-items:center; justify-content:center; min-width:0; min-height:48px; padding:3px 0 8px; gap:2px; border:1px solid transparent; border-radius:12px; }
.teacher-dashboard .teacher-day small { color:var(--student-muted); font:550 11px/1.2 var(--sans,Arial,sans-serif); }
.teacher-day b { font:600 15px/1.15 var(--sans,Arial,sans-serif); font-variant-numeric:tabular-nums; }
.teacher-day[data-has-items]::after { position:absolute; bottom:4px; left:calc(50% - 2px); width:4px; height:4px; content:""; border-radius:50%; background:currentColor; }
.teacher-dashboard .teacher-day[aria-pressed=true] { color:var(--student-surface); background:var(--student-accent); }
.teacher-dashboard .teacher-day[aria-pressed=true] small { color:inherit; }
.teacher-day[aria-current=date] { border-color:var(--student-accent); }
.teacher-day-detail { border-top:1px solid var(--student-border); padding-top:12px; }
.teacher-day-caption { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:4px 12px; margin-bottom:10px; }
.teacher-day-caption b { color:var(--student-accent); font:600 16px/1.25 var(--serif,Georgia,serif); }
.teacher-day-caption small { color:var(--student-muted); font:500 12px/1.3 var(--sans,Arial,sans-serif); }
.teacher-day-detail p,.teacher-dashboard .role-demo { margin:0; font:450 13px/1.45 var(--sans,Arial,sans-serif); color:var(--student-muted); }
.teacher-lessons li { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 12px; align-items:baseline; }
.teacher-lessons li + li { margin-top:8px; padding-top:10px; }
.teacher-day-detail time { font:650 13px/1.35 var(--sans,Arial,sans-serif); font-variant-numeric:tabular-nums; color:var(--student-accent); }
.teacher-day-detail h3 { margin:0 0 3px; }
.teacher-slots { display:flex; flex-wrap:wrap; gap:6px 12px; }
.teacher-assessments .role-speaking > summary { min-height:44px; padding:6px 0; }
.teacher-assessments .role-speaking[open] > summary,.teacher-assessments .lf-dashboard h2 { margin-bottom:12px; }
.teacher-assessments :is(.role-speaking label,.lf-dashboard label) { color:var(--student-muted); font:550 13px/1.35 var(--sans,Arial,sans-serif); }
.teacher-assessments :is(.role-speaking,.lf-dashboard) :is(input,select,textarea) {
  min-width:0; max-width:100%; min-height:44px; padding:6px 9px; border:1px solid var(--student-border); border-radius:8px;
  color:var(--student-ink); background:var(--student-surface); font:450 16px/1.3 var(--sans,Arial,sans-serif);
}
.teacher-assessments .role-speaking button:disabled { opacity:.6; }
@container teacher-metrics (max-width:300px) {
  .teacher-totals { grid-template-columns:minmax(0,1fr); }
  .teacher-totals > div { flex-direction:row; justify-content:space-between; padding:8px 12px; }
  .teacher-totals dt { text-align:start; }
  .teacher-totals dd { order:0; font-size:26px; }
}
@media (hover:hover) {
  .teacher-dashboard .teacher-actions .role-text:hover,.teacher-dashboard .teacher-agenda-head a:hover { text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:2px; }
  .teacher-dashboard :is(.teacher-week-nav button,.teacher-day:not([aria-pressed=true]),.role-choice:not([aria-pressed=true])):hover { background:var(--student-tint); }
}
@media (forced-colors:active) {
  .teacher-dashboard :is(.teacher-day,.role-choice)[aria-pressed=true] { outline:2px solid Highlight; outline-offset:-2px; }
}
@media (max-width:720px) {
  .teacher-dashboard :is(.teacher-overview,.teacher-assessments) { grid-template-columns:minmax(0,1fr); }
  .teacher-dashboard .teacher-agenda .role-choice { min-height:44px; }
}

/* The student library shares its 4:5 cards and overlay with the tutor directory. */
.teacher-roster .cat-all { max-width:none; margin:0; }
.teacher-pupil-monogram {
  display:grid; place-items:center; width:100%; height:100%; padding-bottom:13%;
  color:#f8ede0; background:linear-gradient(145deg,#693b46,#412631 70%);
  font:500 clamp(44px,6vw,82px)/1 var(--cat-serif); letter-spacing:-.045em;
}
.teacher-pupils li:nth-child(3n + 2) .teacher-pupil-monogram { background:linear-gradient(145deg,#85705e,#4b3c36 70%); }
.teacher-pupils li:nth-child(3n) .teacher-pupil-monogram { background:linear-gradient(145deg,#697569,#3d4b45 70%); }
.teacher-pupils .cat-card-photo { position:absolute; inset:0; }
.teacher-pupil-level + .teacher-pupil-level { margin-top:24px; }
.teacher-pupil-level > h3 { margin:0 0 10px; font:600 19px/1.2 var(--serif,Georgia,serif); color:var(--student-accent); }
.teacher-roster .cat-all .teacher-pupils { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:var(--teacher-gap); }
.teacher-pupils .cat-card-foot { inset:auto 5px 5px; padding:5px; border-radius:9px; }
.teacher-pupils .cat-card-person h3 { font-size:13px; }
.teacher-pupil-more { flex:none; padding:3px 4px; border:1px solid #f4e6db88; border-radius:5px; font:600 10px/1.2 var(--sans,Arial,sans-serif); }

.teacher-pupils .teacher-pupil-monogram { font-size:clamp(30px,3vw,44px); }
.teacher-pupil-opener { position:absolute; z-index:2; inset:0; width:100%; border:0; background:transparent; cursor:pointer; border-radius:inherit; }
.teacher-pupil-opener:focus-visible { outline:3px solid var(--student-surface); outline-offset:-4px; }
@container(max-width:820px) {
  .teacher-roster .cat-all .teacher-pupils { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@container(max-width:490px) {
  .teacher-roster .cat-all .teacher-pupils { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.teacher-library .teacher-pupil-dialog { width:min(640px,calc(100% - 24px)); }
.teacher-pupil-dialog .cat-dialog-close { border:0; background:transparent; width:44px; height:44px; }
@media(hover:hover) {
  .teacher-pupil-dialog .cat-dialog-close:hover { background:var(--student-accent); color:var(--student-surface); }
}
.teacher-pupil-dialog .cat-dialog-close:focus-visible { outline:2px solid var(--student-accent); outline-offset:-3px; }
.teacher-pupil-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--pupil-card-padding); margin-top:auto; }
.teacher-pupil-actions a { display:grid; place-items:center; min-width:0; height:44px; border-radius:12px; color:var(--student-accent); background:var(--student-tint); }
.teacher-pupil-actions a:is(:hover,:focus-visible) { color:#fff9f0; background:var(--student-accent); }
.teacher-pupil-actions svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.teacher-pupil-intro {
  display:grid; grid-template-columns:minmax(110px,.85fr) minmax(0,1.3fr);
  gap:clamp(8px,2vw,20px); align-items:end; margin:0 0 16px; --tp-border:var(--student-border);
  --pupil-card-padding:clamp(12px,2vw,22px); --pupil-badge-floor:2px;
}
.teacher-pupil-photo {
  grid-area:1/1; position:relative; align-self:stretch; display:grid; place-items:center; min-width:0; min-height:154px; overflow:hidden;
  background:var(--student-tint); color:var(--student-accent); border:1px solid var(--student-border); border-radius:16px;
}
.teacher-pupil-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 32%; }
.teacher-pupil-intro .teacher-pupil-heading {
  grid-area:1/2; display:flex; flex-direction:column; align-self:stretch; justify-content:center; min-width:0;
  gap:16px; padding:var(--pupil-card-padding); margin:0; border-color:var(--student-border);
}
.teacher-pupil-heading h2 { text-align:center; }
.teacher-pupil-heading .tp-facts dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:var(--pupil-card-padding); text-align:center; }
.teacher-pupil-heading .tp-facts dl div { min-width:0; }
.teacher-pupil-heading .tp-facts { padding:0; width:100%; }
.teacher-pupil-heading h2 { margin:0 0 12px; font:500 clamp(21px,3vw,32px)/1.12 var(--serif); overflow-wrap:anywhere; }
.teacher-pupil-heading .tp-facts dd { font-size:14px; }
.teacher-pupil-detail .sop-dials { align-items:stretch; gap:8px; }
.teacher-pupil-detail .sop-skill {
  display:grid; grid-row:span 2; grid-template-rows:subgrid; justify-items:center; justify-content:stretch;
  align-items:start; aspect-ratio:auto; padding:6px; row-gap:3px;
}
.teacher-pupil-detail .teacher-pupil-dial { position:relative; width:min(100%,138px); min-width:0; }
.teacher-pupil-dial .sop-caption:empty { display:none; }
.teacher-skill-footer { width:100%; min-width:0; color:var(--student-muted); font:500 12px/1.4 var(--sans,Arial,sans-serif); }
.teacher-pupil-detail .role-speaking { width:100%; margin:0; border:0; }
.teacher-pupil-detail .role-speaking summary { font:600 13px/1.3 var(--sans,Arial,sans-serif); min-height:32px; padding:7px 0; }
.teacher-pupil-detail .role-speaking form { text-align:start; }
@media(max-width:460px) {
  .teacher-pupil-intro { grid-template-columns:minmax(106px,.85fr) minmax(0,1.2fr); --pupil-card-padding:10px; }
  .teacher-pupil-intro .teacher-pupil-heading { gap:6px; }
  .teacher-pupil-heading .tp-facts dd { font-size:13px; }
}
.teacher-skill-late { position:absolute; right:2px; top:2px; border-radius:50%; background:var(--student-accent); color:#fff9f0; width:17px; height:17px; text-align:center; font:700 12px/17px var(--sans,Arial,sans-serif); }
@media(max-width:390px){
  .teacher-pupils .cat-card-foot { flex-wrap:wrap; gap:3px; }
}
.teacher-pupil-history .teacher-review-list li { position:relative; }
.teacher-pupil-history .teacher-lesson-label {
  display:flex; flex-direction:column; justify-content:center; min-height:44px;
  padding-inline-end:clamp(117px,30%,145px); overflow-wrap:anywhere;
}
.teacher-pupil-history .teacher-review-list [data-pupil-grade] { margin-top:0; }
.teacher-pupil-history .teacher-review-list [data-pupil-grade] [data-open-grade] {
  position:absolute; inset:10px 10px auto auto; display:inline-flex; align-items:center; justify-content:center;
  min-height:44px; max-width:42%; padding:4px 10px; border:1px solid var(--student-border); border-radius:10px;
  color:var(--student-accent); background:var(--student-surface); list-style:none; text-align:center; font:600 13px/1.2 var(--sans);
}
.teacher-grade-dialog {
  width:min(380px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); box-sizing:border-box; margin:auto; padding:20px;
  border:1px solid var(--student-border); border-radius:16px; background:var(--student-surface,#fff9f0); color:var(--student-ink,#302521);
}
.teacher-grade-dialog::backdrop { background:rgb(36 20 24 / .4); }
.teacher-grade-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.teacher-grade-dialog header button { min-width:40px; min-height:40px; border:0; background:transparent; font-size:24px; cursor:pointer; color:inherit; }
.teacher-pupil-history .teacher-grade-dialog [data-feedback-form] { padding:0; border:0; gap:12px; }

.teacher-pupil-history .teacher-review-list [data-pupil-grade] [data-open-grade]:is(:hover,:focus-visible) { background:var(--student-accent); color:#fff9f0; }
.teacher-pupil-history time { display:block; margin-top:4px; font-size:12px; color:var(--student-muted); }
.teacher-pupil-history .teacher-review-list { max-height:clamp(180px,35dvh,330px); }
.teacher-pupil-history form { scroll-margin-block:30px; }
.teacher-pupil-dialog .teacher-pupil-detail { padding:48px 6% clamp(16px,3vw,32px); }
.teacher-pupil-detail h3 { margin:16px 0 8px; font:600 20px/1.2 var(--cat-serif); }
.teacher-pupil-upcoming { display:grid; gap:8px; list-style:none; margin:0; padding:0; }
.teacher-pupil-upcoming li { display:grid; gap:2px; }
.teacher-pupil-detail :is(li,p) { font-size:14px; line-height:1.4; }
.teacher-pupil-upcoming time { color:var(--student-muted); font-size:12px; font-variant-numeric:tabular-nums; }
.teacher-pupil-detail .teacher-actions { border-top:1px solid var(--cat-rule); margin-top:16px; padding-top:4px; }
.teacher-overview > .soc-calendar { padding-inline:clamp(16px,3.75%,48px); }
.teacher-agenda .soc-balance { flex-shrink:1; }
.teacher-review-stars { color:var(--student-accent); }
.teacher-rating-stars { display:flex; justify-content:center; align-items:center; gap:4px; color:var(--student-accent); margin:0 0 18px; }
.teacher-rating-stars svg { width:clamp(38px,4.1vw,55px); min-width:0; height:auto; }
academy-review-list { display:block; }
.teacher-review-list {
  list-style:none; margin:0; padding:3px; max-height:220px; overflow:auto;
  --review-mask:linear-gradient(to bottom,transparent 0,#000 var(--review-fade-top,0px),#000 calc(100% - var(--review-fade-bottom,0px)),transparent 100%);
  -webkit-mask-image:var(--review-mask); mask-image:var(--review-mask);
}
@media(min-width:721px) {
  .teacher-overview > .teacher-agenda { align-self:stretch; }
  .teacher-overview > .teacher-stats { display:flex; flex-direction:column; }
  .teacher-stats > academy-review-list { position:relative; flex:1; }
  .teacher-stats .teacher-review-list { position:absolute; inset:0; max-height:none; }
}
.teacher-review-list li { padding:10px 12px; border-radius:12px; border:1px solid var(--student-border); }
.teacher-review-list li + li { margin-top:7px; }
.teacher-review-list li:is(:hover,:focus-visible) { background:var(--student-tint); outline:1px solid var(--student-accent); }
.teacher-review-list p { margin:4px 0 0; font-size:13px; line-height:1.45; }
.teacher-review-stars { letter-spacing:.09em; }
@media(prefers-reduced-motion:no-preference) {
  .teacher-review-list li { transition:background .2s ease,transform .32s cubic-bezier(.2,1.4,.4,1),opacity .22s; }
  .teacher-review-list li[data-outside] { opacity:.25; transform:translateY(6px) scale(.98); }
}
academy-tutor-rating [data-review-editor] { margin-top:6px; font:500 13px/1.4 var(--sans,Arial,sans-serif); text-align:start; }
academy-tutor-rating [data-review-editor] summary { cursor:pointer; }
academy-tutor-rating [data-anonymous-review] { display:grid; gap:6px; max-width:270px; }
academy-tutor-rating [data-anonymous-review] textarea { width:100%; box-sizing:border-box; margin-top:4px; }

academy-tutor-rating:has([data-review-editor]) { flex-direction:column; align-items:flex-end; }

.teacher-pupil-detail .teacher-pupil-dial { position:static; display:grid; align-items:center; justify-items:center; }
.teacher-pupil-dial > [data-pupil-skill],.teacher-pupil-dial > [data-speaking-grade] { grid-area:1/1; }
.teacher-pupil-dial > [data-pupil-skill] { width:100%; }
.teacher-pupil-detail .teacher-skill-late { inset:6px 6px auto auto; }
.teacher-pupil-dial > [data-pupil-skill][hidden],.teacher-skill-footer [hidden] { display:none; }
/* During assessment the form occupies the whole Speaking card. */
.teacher-pupil-detail .sop-skill:has([data-speaking-grade]:not([hidden])) {
  display:flex; flex-direction:column; align-items:stretch; min-height:156px;
  padding:10px clamp(8px,2vw,20px); box-sizing:border-box;
}
.teacher-pupil-detail .teacher-pupil-dial:has(form:not([hidden])) { width:100%; flex:1; align-items:stretch; }
.sop-skill:has([data-speaking-grade]:not([hidden])) [data-pupil-date=speaking],
.sop-skill:has([data-speaking-grade]:not([hidden])) .teacher-skill-footer:has(output:empty) { display:none; }
.teacher-skill-footer [data-assess-speaking] { cursor:pointer; padding:7px 14px; border:1px solid var(--student-border); border-radius:9px; color:var(--student-accent); background:var(--student-surface); font-weight:600; }
.teacher-lesson-score { position:absolute; top:10px; right:12px; min-height:44px; display:flex; align-items:center; color:var(--student-accent); }
.teacher-pupil-history .lf-comment { white-space:pre-wrap; overflow-wrap:anywhere; }
.teacher-pupil-history [data-pupil-grade] form { padding:10px; border:1px solid var(--student-border); border-radius:12px; background:var(--student-surface); }
.teacher-pupil-dial form:not([hidden]) { display:grid; grid-template-rows:minmax(12px,.45fr) auto minmax(60px,1fr); justify-items:center; width:100%; margin:0; }
.teacher-pupil-dial form[hidden] { display:none; }
.teacher-pupil-dial form label { grid-row:2; position:relative; align-self:center; width:min(100%,156px); font-size:14px; }
.teacher-pupil-dial form label span { position:absolute; inset-inline-end:9px; top:50%; transform:translateY(-50%); pointer-events:none; }
.teacher-pupil-dial form input { width:100%; min-width:0; min-height:40px; box-sizing:border-box; padding:4px 21px; text-align:center; font-size:16px; border:1px solid var(--student-border); border-radius:6px; background:var(--student-surface); color:var(--student-ink); appearance:textfield; }
.teacher-pupil-dial form input::-webkit-inner-spin-button { appearance:none; }
.teacher-pupil-dial form button { grid-row:3; align-self:end; width:min(72%,118px); min-height:40px; padding:3px 8px; font:600 12px/1.25 var(--sans); border:0; border-radius:6px; background:var(--student-accent); color:#fff9f0; cursor:pointer; }
.teacher-skill-footer output { display:block; }
