/* The teacher profile is a destination with its own full-width book shelf. */
#teacher-app.td-shell[data-td-view=profile] {
  background:radial-gradient(ellipse at 80% 9%,#def5f3 0,transparent 48%),#f1f8f7;
}
#teacher-app[data-td-view=profile] .teacher-main {display:block}
#teacher-app[data-td-view=profile] :is(.td-sidebar,.teacher-scope,.teacher-illustration,#teacher-subtitle,#teacher-crumb,.teacher-heading .overline) {display:none}
#teacher-app[data-td-view=profile] .teacher-topbar :is(.td-search,.profile-toggle,.menu-toggle) {display:none}
#teacher-app[data-td-view=profile] .teacher-topbar {
  gap:clamp(.85rem,2.5vw,2.7rem);
  padding-inline:max(clamp(1.2rem,3.25vw,3.5rem),calc((100% - 85rem)/2));
}
#teacher-app[data-td-view=profile] .header-brand {flex:0 1 auto;margin:0}
#teacher-app[data-td-view=profile] .header-brand strong {font-size:clamp(1.25rem,2.25vw,2.05rem);line-height:1.14}
#teacher-app[data-td-view=profile] .td-language {margin-inline-start:auto}
#teacher-app[data-td-view=profile] .teacher-area {
  width:100%;max-width:85rem;margin-inline:auto;padding:clamp(1.2rem,2.4vw,2.6rem) clamp(1.2rem,3vw,3.1rem) 3.25rem;
}
#teacher-app[data-td-view=profile] .teacher-heading {
  display:block;min-height:0;padding:0;margin:0 0 clamp(1rem,1.55vw,1.65rem);
  background:none;border:0;border-radius:0;box-shadow:none;
}
#teacher-app[data-td-view=profile] #teacher-title {
  margin:0;color:#122e4c;font:850 clamp(2rem,3.7vw,3rem)/1.12 var(--desk-heading);letter-spacing:-.045em;overflow-wrap:anywhere;
}
#teacher-app .tp-top-nav:not([hidden]) {display:flex;gap:clamp(.25rem,1vw,1rem);margin-inline:auto 0;align-items:center}
#teacher-app .tp-top-nav .td-nav-item {
  display:inline-flex;justify-content:center;width:auto;min-height:2.65rem;
  padding:.45rem clamp(.65rem,1.18vw,1.25rem);border-radius:.68rem;
  color:#fff;background:transparent;white-space:nowrap;
}
#teacher-app .tp-top-nav .td-nav-item[aria-current=page] {color:#143b50;background:#f1fcf9;box-shadow:0 2px 6px #00434a22}
#teacher-app .tp-top-nav .td-nav-item:hover:not([aria-current=page]) {background:#ffffff1f;color:#fff}
#teacher-app .tp-profile {
  --tp-ink:#15344b;--tp-muted:#45616b;--tp-teal:#006d73;--tp-line:#c8dedb;--tp-round:1rem;
  display:grid;grid-template-columns:minmax(13.5rem,.31fr) minmax(0,.69fr);
  grid-template-rows:auto 1fr;grid-template-areas:"identity shelf" "account shelf";align-items:start;
  gap:clamp(.85rem,1.6vw,1.5rem);min-width:0;color:var(--tp-ink);font-family:var(--desk-heading);
}
.tp-profile,.tp-profile *, .tp-profile *::before,.tp-profile *::after {box-sizing:border-box}
.tp-profile [hidden] {display:none!important}
#teacher-app .tp-profile :is(h2,h3,p){margin:0;overflow-wrap:anywhere}
#teacher-app .tp-profile :is(button,select,a):focus-visible{outline:3px solid #066c75;outline-offset:3px;box-shadow:0 0 0 3px white}
#teacher-app .tp-profile button {cursor:pointer;font-family:inherit}
#teacher-app .tp-profile :is(.tp-identity,.tp-registers,.tp-account,.tp-person,.tp-shelf) {min-width:0}
#teacher-app .tp-profile :is(.tp-identity,.tp-registers,.tp-actions) {
  border:1px solid var(--tp-line);border-radius:var(--tp-round);
  background:linear-gradient(145deg,#fffefa,#fcfbf7);box-shadow:0 3px 8px #244f5010;
}
.tp-identity {
  grid-area:identity;display:flex;flex-direction:column;align-items:center;gap:1.25rem;
  padding:clamp(1.4rem,2.8vw,3.1rem) clamp(.95rem,1.55vw,1.75rem) clamp(1.3rem,2vw,2rem);text-align:center;
}
.tp-avatar {
  position:relative;isolation:isolate;flex:none;display:grid;place-items:center;
  width:clamp(5.7rem,10.5vw,9.2rem);aspect-ratio:1;border-radius:50%;
  color:#00666c;background:radial-gradient(circle at 30% 30%,#d5f7e9 0,#b6e8df 47%,#8bd5d1 100%);
  border:3px solid #f8fffa;box-shadow:0 0 0 1px #b3dad3,0 3px 6px #2d656520,inset 0 0 0 2px #e6fcf33d;
}
.tp-initial {
  font:italic 500 clamp(3.45rem,7.25vw,6.2rem)/1 Georgia,'Times New Roman',serif;
  color:#006970;text-shadow:0 1px 0 #f8fff8;transform:translate(-.045em,-.015em);
}
.tp-avatar .tp-pencil {position:absolute;width:29%;height:29%;right:7%;bottom:10%;overflow:visible}
.tp-avatar::after {
  content:"";position:absolute;top:20%;right:15%;width:16%;height:17%;
  background:linear-gradient(90deg,transparent 37%,#157e82 38% 60%,transparent 61%) 24% 0/28% 40% no-repeat,
    linear-gradient(143deg,transparent 42%,#157e82 43% 54%,transparent 55%) 95% 31%/45% 45% no-repeat,
    linear-gradient(173deg,transparent 40%,#157e82 41% 60%,transparent 61%) 100% 95%/35% 33% no-repeat;
}
.tp-person {width:100%}
#teacher-app .tp-name {font:850 clamp(1.6rem,2.65vw,2.6rem)/1.15 var(--desk-heading);letter-spacing:-.035em;color:var(--tp-ink)}
#teacher-app .tp-role {margin-top:.25rem;color:var(--tp-muted);font-size:clamp(.96rem,1.35vw,1.2rem);line-height:1.38}
#teacher-app .tp-school {
  display:flex;gap:.48rem;align-items:center;justify-content:center;margin-top:1.1rem;padding-top:1rem;
  border-top:1px solid #cbd5d2;font-size:clamp(.95rem,1.38vw,1.2rem);font-weight:650;line-height:1.35;color:#294655;
}
.tp-school svg,.tp-row svg,.tp-logout svg,.tp-create svg {flex:none}
.tp-school svg {width:1.26em;height:1.26em}
.tp-account {grid-area:account;display:grid;gap:1.25rem}
.tp-actions {display:grid;overflow:hidden}
#teacher-app .tp-row,#teacher-app .tp-logout {
  display:flex;align-items:center;gap:.75rem;width:100%;min-width:0;
  border:0;border-radius:0;background:transparent;color:#1b3e50;text-align:start;
  min-height:3.25rem;padding:.72rem clamp(.85rem,1.4vw,1.4rem);font:680 clamp(.95rem,1.25vw,1.1rem)/1.26 var(--desk-heading);
  box-shadow:none;overflow-wrap:anywhere;
}
#teacher-app .tp-row+.tp-row {border-top:1px solid #dce3de}
.tp-row>svg:first-child,.tp-logout>svg:first-child{width:1.4rem;height:1.4rem;color:#10747b}
.tp-row .tp-chevron {margin-inline-start:auto;flex:none;color:#3c6b73}
#teacher-app button.tp-row:focus-visible{outline-offset:-4px;box-shadow:none}
#teacher-app .tp-logout {color:#4b626b;border-top:1px solid var(--tp-line);min-height:3rem}
#teacher-app .tp-logout svg {color:inherit}
#teacher-app .tp-registers {
  grid-area:shelf;padding:clamp(1rem,2vw,2rem);background:linear-gradient(145deg,#fffefa,#f7fbfa);
}
.tp-shelf-head {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.6rem 1rem;margin-bottom:clamp(1rem,1.75vw,1.7rem)}
#teacher-app .tp-shelf-head h2 {font:850 clamp(1.55rem,2.5vw,2.25rem)/1.15 var(--desk-heading);letter-spacing:-.04em;color:var(--tp-ink)}
.tp-controls {display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;max-width:100%}
#teacher-app .tp-controls select {
  min-height:2.65rem;min-width:0;max-width:100%;width:auto;margin:0;padding:.45rem 1.9rem .45rem .75rem;
  appearance:none;border:1px solid #a4bdbb;border-radius:.6rem;background-color:#fffefa;
  background-image:linear-gradient(45deg,transparent 48%,#41656a 49% 70%,transparent 71%),linear-gradient(135deg,transparent 28%,#41656a 29% 50%,transparent 51%);
  background-position:calc(100% - 14px) 51%,calc(100% - 10px) 51%;background-size:5px 6px;background-repeat:no-repeat;
  font:720 1rem/1.25 var(--desk-heading);color:var(--tp-ink);
}
#teacher-app .tp-create {
  display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-height:2.7rem;max-width:100%;min-width:0;
  padding:.5rem .92rem;border:1px solid #007b80;border-radius:.65rem;
  background:linear-gradient(135deg,#008b91,#007079);color:#fff;font:760 1rem/1.2 var(--desk-heading);text-align:center;box-shadow:0 1px 2px #065b6220;
}
.tp-shelf {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(.7rem,1.3vw,1.25rem);align-items:stretch}
#teacher-app .tp-cover {
  --tp-cloth:#28596b;--tp-cloth-dark:#194456;
  position:relative;isolation:isolate;display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;gap:.35rem;
  width:100%;min-width:0;aspect-ratio:.88;min-height:11.2rem;margin:0;padding:clamp(1.8rem,2.95vw,3rem) clamp(.8rem,1.3vw,1.45rem) clamp(.8rem,1.25vw,1.4rem) clamp(1.05rem,1.85vw,1.85rem);
  border:1px solid #173b4a38;border-radius:.36rem .88rem .8rem .32rem;
  background:linear-gradient(90deg,#0003 0 4px,#ffffff16 5px,transparent 7px 9px,#0003 10px,#ffffff22 11px,transparent 12px),
    repeating-linear-gradient(90deg,#ffffff0b 0 1px,transparent 1px 3px),
    repeating-linear-gradient(0deg,#001a2114 0 1px,transparent 1px 4px),
    linear-gradient(125deg,var(--tp-cloth),var(--tp-cloth-dark));
  box-shadow:1px 2px 0 #fff2cb,2px 4px 0 #ccbfa0,3px 6px 0 #b8c3b5,1px 9px 12px #284d4d22;
  color:#fffaf0;text-align:start;text-decoration:none;cursor:pointer;transition:transform .16s ease-out,box-shadow .16s ease-out;
}
#teacher-app .tp-cover.cb-ink-0 {--tp-cloth:#367057;--tp-cloth-dark:#225441}
#teacher-app .tp-cover.cb-ink-2 {--tp-cloth:#785c77;--tp-cloth-dark:#59435f}
#teacher-app .tp-cover.cb-ink-3 {--tp-cloth:#70637f;--tp-cloth-dark:#534860}
#teacher-app .tp-cover.cb-ink-4 {--tp-cloth:#88653d;--tp-cloth-dark:#65482e}
#teacher-app .tp-cover::before {
  content:"";position:absolute;inset:.45rem .42rem .45rem .85rem;border:1px solid #fff7de42;border-radius:.16rem .55rem .55rem .16rem;z-index:-1;pointer-events:none;
  box-shadow:inset 0 0 0 2px #122a2e17;
}
.tp-cover .cb-ribbon {
  top:-1px;right:10%;width:10%;max-width:1.5rem;height:15%;max-height:2.5rem;
  background:linear-gradient(90deg,#e1bd6c,#ffe1a1 25%,#edcc86 85%,#cda457);
}
.tp-cover .cb-cover-label {color:#ffe4a0;font:800 clamp(.69rem,.85vw,.85rem)/1.25 var(--desk-heading);letter-spacing:.095em}
.tp-cover .cb-cover-class {margin:0;color:#fffaf1;font:820 clamp(2.25rem,4.7vw,4.6rem)/1.08 var(--desk-heading);letter-spacing:-.04em;overflow-wrap:anywhere}
.tp-cover .cb-cover-bottom {
  display:flex;align-items:center;justify-content:flex-end;gap:.32rem;width:100%;margin-top:auto;padding-top:.65rem;
  border:0;border-top:3px double #fff8e07a;font:640 clamp(.78rem,1.03vw,1.01rem)/1.15 var(--desk-heading);color:#fffaf1;
}
/* Draw the open-book arrow with strokes so it also works in fonts without ↗. */
.tp-cover .cb-cover-bottom b {
  flex:0 0 .84rem;position:relative;display:inline-block;width:.84rem;height:.84rem;
  font-size:0;line-height:0;
}
.tp-cover .cb-cover-bottom b::before {
  content:"";position:absolute;left:42%;top:1%;width:52%;height:52%;
  border-top:1.6px solid currentColor;border-right:1.6px solid currentColor;
}
.tp-cover .cb-cover-bottom b::after {
  content:"";position:absolute;right:10%;top:12%;width:90%;height:1.6px;
  background:currentColor;transform:rotate(-45deg);transform-origin:right center;
}
#teacher-app .tp-all {display:none}
.tp-cover-school {font-size:.85rem;line-height:1.18;color:#f6f2de;overflow-wrap:anywhere}
.tp-school span {min-width:0;overflow-wrap:anywhere}
.tp-status:empty {display:none}
.tp-empty,.tp-status {color:var(--tp-muted);line-height:1.45}
#teacher-app .tp-empty {
  grid-column:1/-1;display:grid;justify-items:center;gap:.65rem;width:100%;margin:0;padding:clamp(1.65rem,3.3vw,3.75rem) .85rem;
  border:1px dashed #80b6af;border-radius:.82rem;background:#eaf6f2;color:#135e64;text-align:center;
  font:750 clamp(1rem,1.45vw,1.22rem)/1.3 var(--desk-heading);box-shadow:none;
}
.tp-empty>span {display:grid;place-items:center;width:2.6rem;height:2.6rem;border-radius:50%;background:#007b80;color:white;font-size:1.8rem}
.tp-status:not(:empty) {padding-block:.75rem}
.tp-profile .tp-status button {border:1px solid #a8cbc7;border-radius:.55rem;padding:.35rem .7rem;color:var(--tp-teal);background:#fff;min-height:2.65rem}
@media(hover:hover){
  #teacher-app .tp-row:hover,#teacher-app .tp-logout:hover {background:#e9f5f1}
  #teacher-app .tp-create:hover {background:#00656e}
  #teacher-app .tp-empty:hover {background:#def2ec}
  #teacher-app .tp-cover:hover {transform:translateY(-2px);box-shadow:1px 2px 0 #fff2cb,2px 4px 0 #ccbfa0,3px 6px 0 #b8c3b5,1px 11px 15px #284d4d2b}
}
@media(min-width:761px) and (max-width:950px){
  .tp-shelf {grid-template-columns:repeat(2,minmax(0,1fr))}
  #teacher-app .tp-registers {padding:.95rem}
}
@media(max-width:760px) {
  #teacher-app[data-td-view=profile] .tp-top-nav:not([hidden]) {display:none}
  #teacher-app[data-td-view=profile] .teacher-topbar {min-height:3.6rem;padding:.55rem max(.7rem,env(safe-area-inset-right)) .55rem max(.7rem,env(safe-area-inset-left));gap:.4rem}
  #teacher-app[data-td-view=profile] .header-brand strong {font-size:clamp(1.04rem,4.8vw,1.5rem)}
  #teacher-app[data-td-view=profile] .teacher-area {
    max-width:38rem;padding:.95rem clamp(.68rem,3.5vw,1.2rem) calc(5.5rem + env(safe-area-inset-bottom));
  }
  #teacher-app[data-td-view=profile] .teacher-heading {margin-bottom:.72rem}
  #teacher-app[data-td-view=profile] #teacher-title {font-size:clamp(1.65rem,6.9vw,2.25rem)}
  #teacher-app .tp-profile {grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:"identity" "shelf" "account";gap:1rem}
  #teacher-app .tp-identity {flex-direction:row;gap:.85rem;align-items:center;text-align:start;padding:.77rem .88rem;--tp-round:.8rem}
  #teacher-app .tp-avatar {width:clamp(3.75rem,16.5vw,5.5rem);border-width:2px}
  .tp-initial {font-size:clamp(2.45rem,11.15vw,3.8rem)}
  #teacher-app .tp-name {font-size:clamp(1.2rem,5.2vw,1.6rem);line-height:1.12}
  #teacher-app .tp-role {margin-top:.16rem;font-size:.92rem}
  #teacher-app .tp-school {justify-content:flex-start;gap:.35rem;margin-top:.34rem;padding-top:.33rem;font-size:.9rem}
  #teacher-app .tp-identity:has(.tp-status:not(:empty)) {display:grid;grid-template-columns:auto minmax(0,1fr)}
  .tp-status:not(:empty) {grid-column:1/-1}
  #teacher-app .tp-registers {padding:.2rem 0 0;border:0;background:none;box-shadow:none}
  .tp-shelf-head {gap:.35rem .5rem;margin-bottom:.65rem}
  #teacher-app .tp-shelf-head h2 {font-size:clamp(1.35rem,5.5vw,1.75rem)}
  .tp-controls {gap:.32rem}
  #teacher-app .tp-controls select {min-height:2.55rem;padding-inline:.42rem 1.45rem;font-size:.88rem}
  #teacher-app .tp-create {min-height:2.55rem;padding:.4rem .55rem;font-size:.9rem}
  .tp-shelf {grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
  #teacher-app .tp-shelf:not(.tp-expanded)>.tp-cover:nth-child(n+3){display:none}
  #teacher-app .tp-cover {padding:clamp(1.45rem,6vw,2rem) .72rem .8rem 1.12rem;min-height:9.25rem;aspect-ratio:.92}
  .tp-cover .cb-cover-label {font-size:clamp(.64rem,2.5vw,.83rem);letter-spacing:.065em}
  .tp-cover .cb-cover-class {font-size:clamp(2.1rem,9.1vw,3.25rem)}
  .tp-cover .cb-cover-bottom {flex-direction:row;align-items:center;font-size:.8rem;padding-top:.4rem}
  #teacher-app .tp-all {display:flex;gap:.35rem;align-items:center;justify-content:center;min-height:2.75rem;margin:.3rem auto -.4rem;padding:.35rem .8rem;border:0;background:transparent;color:#07696e;font-size:.97rem;font-weight:750;box-shadow:none}
  #teacher-app .tp-all svg {width:1.1rem;height:1.1rem}
  .tp-account {gap:.55rem}
  #teacher-app .tp-actions {--tp-round:.76rem}
  #teacher-app .tp-row,#teacher-app .tp-logout {min-height:2.85rem;padding:.55rem .85rem;font-size:.98rem}
  #teacher-app[data-td-view=profile] .td-bottom .td-nav-item[aria-current=page] {color:#006d77;background:#c9eeea}
}
@media(prefers-reduced-motion:reduce){#teacher-app .tp-cover {transition:none}}

.tp-sound-settings{padding:.85rem 1rem;background:#f2f9f8;color:#194d50;border-radius:12px}
.tp-sound-settings summary{font-weight:700;cursor:pointer}
.tp-sound-settings label{display:grid;gap:.25rem;margin-top:.7rem}
.tp-sound-settings select{padding:.5rem;color:inherit;border:1px solid #adcbca;background:white;border-radius:8px;font:inherit}
.tp-sound-settings audio{display:block;width:100%;max-width:25rem;margin:.8rem 0}
