/* Allow the monitor to yield space to the editor and controls at the actual viewport height. */
html:has(#app .studio-paper) {scrollbar-gutter:auto}
.studio-paper.site-shell {
  height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;
}
.studio-paper .school-bar {--student-bar-height:clamp(46px,7dvh,68px);z-index:12}
.studio-paper.site-shell main:is(.page-studio,.page-result) {
  flex:1;min-height:0;display:flex;flex-direction:column;padding:4px 0 14px;
}
.studio-paper.site-shell:has(.page-result)::after {display:none}
.studio-sr-only {position:absolute;width:1px;height:1px;margin:-1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.studio-paper .studio-desk {flex:1;min-height:0}
.studio-paper .studio-desk .creation-layout {
  box-sizing:border-box;height:100%;min-height:0;padding:24px 8px 0;
  grid-template-columns:minmax(0,1fr) clamp(258px,27vw,392px);
  grid-template-areas:"monitor controls" "roll controls";
  grid-template-rows:minmax(0,1fr) auto;
  column-gap:clamp(13px,2vw,30px);row-gap:0;align-items:stretch;
  --studio-dial-size:clamp(85px,16dvh,164px);
  --studio-wheel-height:clamp(30px,5.4dvh,50px);
}
.studio-paper .student-preview.studio-monitor {height:100%;min-height:0;align-self:stretch}
.studio-paper .studio-desk .creation-layout > .console {margin:0;min-height:0}
.studio-paper .studio-desk .creation-panel.roll-area {margin:28px 0 0}
.studio-paper .studio-monitor .monitor-extras {
  flex:none;min-width:0;margin:5px 0 -4px;padding:4px 0 0;
  border:0;border-top:1px dashed #9f7c54;border-radius:0;background:none;box-shadow:none;
}
.studio-paper .studio-monitor .monitor-extras .version-strip {margin:0;padding:0}
.studio-paper .studio-desk .studio-screen {min-height:0;aspect-ratio:auto}
.studio-desk .strip textarea {resize:none}
.studio-desk .compact-camera-settings {display:none}
.studio-desk .studio-reading {display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;z-index:6}
.studio-desk .studio-reading > .reference-fold,.studio-desk .studio-reading #score-panel:not(:empty) {margin:2px 0 0;padding:0}
.studio-desk .studio-reading .assessment-fold summary {display:inline-block;padding:3px 7px;border:1px solid #bea782;border-radius:4px;background:#f8ecd8;font-size:12px;cursor:pointer}
.studio-desk .studio-reading .reading-leaf {z-index:7}
.studio-desk .roll-area > .assessment-error {margin:3px 0;font-size:12px;max-height:3.6em;overflow:auto}
.studio-paper #save-state:empty {display:none}
.studio-paper .class-timer-bar {flex:none;margin-block:0}
.studio-paper .studio-monitor .viewer-head {flex-wrap:nowrap;align-items:center}
.studio-desk .monitor-label .monitor-tools {min-width:0;margin-inline-start:auto;gap:6px}
.studio-desk .monitor-tools > .shot-preview-button {flex:none;width:32px;height:30px;padding:0}
.studio-desk .monitor-tools > .shot-preview-button .icon {width:19px;height:19px}
.studio-desk .monitor-tools .shot-nav {
  position:static;display:block;direction:rtl;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:none;
  margin:0;padding:3px 2px 4px;transform:none;
}
.studio-desk .shot-nav-list {direction:ltr;display:flex;align-items:center;gap:5px;width:max-content}
.studio-desk .shot-nav .shot-link {
  display:inline-flex;align-items:center;justify-content:center;gap:3px;flex:none;min-height:25px;position:relative;
  border:1px solid #aa9880;border-radius:6px;padding:3px 7px;background:#eae6da;color:#645e54;
  box-shadow:inset 0 1px #fff9ed,0 2px #9b8162,0 3px 4px #573d244a;
  font:700 12px/1.2 var(--font-cn);white-space:nowrap;cursor:pointer;
}
.studio-desk .shot-nav .shot-link.complete {background:#e8efdb;color:#38563c;border-color:#82927b}
.studio-desk .shot-nav .shot-link[aria-current] {
  transform:translateY(2px);background:#d4c9b4;border-color:#836e55;color:#493c2e;
  box-shadow:inset 1px 2px 4px #59432d70,inset 0 -1px #fcf0d5,0 1px #fff1da;
}
.studio-desk .shot-nav .shot-link.complete[aria-current] {background:#ccd9be;color:#304b32}
.studio-desk .shot-nav .shot-link:focus-visible {outline:2px solid #8d392b;outline-offset:0}
.shot-draft-mark {width:5px;height:5px;border-radius:50%;background:#a74b31}
.studio-desk .studio-screen .take-prints {inset:0}
.shot-detail h3 {margin:0 0 5px;font-size:15px;color:#69462d}
.shot-detail p {line-height:1.65;margin:0 0 13px;overflow-wrap:anywhere}
.take-edit-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.take-edit-actions .take-action {width:100%;min-width:0}
.take-actions > .primary {width:100%}

/* Tabs travel on their own edge. Their papers open over the monitor, within reach on a short screen. */
.studio-monitor camera-pocket {z-index:5;--template-limit:clamp(72px,28dvh,190px)}
.drawer-rail {position:absolute;left:8px;right:8px;height:23px;pointer-events:none}
.drawer-rail[data-edge=top] {bottom:100%}
.drawer-rail[data-edge=bottom] {top:calc(100% + 3px)}
.studio-drawer {
  --edge:#b99d73;--tab:#f0d293;--tab-edge:#ab8a55;
  position:absolute;top:0;width:max-content;height:100%;pointer-events:none;
}
.studio-drawer[data-pocket=requirements] {--tab:#d8debc;--tab-edge:#8b9875}
.studio-drawer[data-pocket=script] {--tab:#c9d9da;--tab-edge:#859da2}
.studio-drawer[data-pocket=feedback] {--tab:#edbfa5;--tab-edge:#ac735c}
.studio-drawer[data-pocket=rubric] {--tab:#cadaC8;--tab-edge:#809780}
.studio-drawer[data-pocket=templates] {--tab:#edc5ad;--tab-edge:#ad876e}
.studio-drawer[data-ready] {height:31px;--tab:#ad4a32;--tab-edge:#7f3221;z-index:2}
.drawer-rail[data-edge=top] .studio-drawer[data-ready] {top:auto;bottom:0}
.studio-drawer[data-ready] .pocket-tab {
  gap:6px;padding:3px 13px 4px 11px;color:#fff6e6;font-size:14px;letter-spacing:.02em;
  background:linear-gradient(180deg,#c35e43,#a3432c);box-shadow:inset 0 1px #e39a7c,0 3px 8px #6b2a1a4d;
}
.studio-drawer[data-ready] .pocket-tab:hover {filter:brightness(1.07)}
.studio-drawer[data-ready] .pocket-tab[aria-expanded=true] {background:#93391f}
.studio-drawer[data-ready] .pocket-tab .icon {color:#ffd98c}
.studio-drawer[data-ready] .pocket-tab i {width:6px;height:6px;border-width:1.8px 0 0 1.8px}
.template-count {
  min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ffd98c;color:#7a2e1b;
  font:800 11.5px/18px var(--font-cn);text-align:center;
}
@media(prefers-reduced-motion:no-preference) {
  .studio-drawer[data-ready] .pocket-tab[aria-expanded=false] {animation:template-glow 2.4s ease-in-out 3}
}
@keyframes template-glow {
  0%,100% {box-shadow:inset 0 1px #e39a7c,0 3px 8px #6b2a1a4d}
  50% {box-shadow:inset 0 1px #e39a7c,0 0 0 4px #f2b84b8c,0 3px 10px #6b2a1a66}
}
/* The open template is read and used in class, so it is set larger than the other papers. */
.studio-drawer[data-ready] .pocket-insert {--paper-width:min(380px,var(--rail-width));border-color:#a3432c;border-width:2px}
.studio-drawer[data-ready] .insert-templates {gap:6px;padding:9px 12px 10px}
.studio-drawer[data-ready] .insert-templates h3 {font-size:14px;padding-bottom:4px}
.studio-drawer[data-ready] :is(.template-preview p,.insert-notice p) {font-size:14px;line-height:1.65}
.studio-drawer[data-ready] .insert-notice {padding:9px 12px 10px}
.studio-drawer[data-ready] .insert-notice h3 {font-size:14px;color:#874631}
.studio-drawer[data-ready] .writing-use-hint {min-height:32px;margin:6px 0 4px;font-size:13.5px}
.studio-drawer[data-ready] .template-footer [data-apply-template] {min-height:32px;padding:4px 16px;font-size:13.5px}
.studio-drawer .pocket-tab {height:100%;margin:0;cursor:grab}
.studio-drawer[data-dragging] .pocket-tab {cursor:grabbing}
.drawer-rail[data-edge=bottom] .pocket-tab {border:1px solid var(--tab-edge);border-top:0;border-radius:0 0 6px 6px}
.studio-drawer .pocket-insert {
  --paper-width:min(306px,var(--rail-width));position:absolute;top:100%;
  left:clamp(calc(0px - var(--tab-left)),calc((var(--tab-width) - var(--paper-width)) / 2),calc(var(--rail-width) - var(--tab-left) - var(--paper-width)));
  width:var(--paper-width);max-height:min(38dvh,240px);box-sizing:border-box;pointer-events:auto;
  border:1px solid var(--tab-edge);border-radius:5px;overflow:auto;box-shadow:0 4px 12px #5c452a47;
}
.studio-drawer[data-open] .pocket-insert {visibility:visible;transition:none}
.studio-drawer .pocket-insert[hidden] {display:none}
.drawer-rail[data-edge=bottom] .pocket-insert {top:auto;bottom:100%}
.studio-drawer .insert-notice,.studio-drawer .insert-script,.drawer-notes {padding:8px 10px}
.insert-notice h4 {font-size:12px;margin:5px 0 2px}
.insert-notice .lesson-task {margin-top:6px;padding-top:5px;border-top:1px dashed #c5a78b}
.lesson-task summary {font:700 13px/1.5 var(--font-cn);overflow-wrap:anywhere;cursor:pointer}
@container monitor (max-width: 390px) {
  .drawer-rail[data-edge=top] .pocket-tab {gap:3px;padding-inline:4px;font-size:11px}
}
.drawer-notes p {margin:0;padding:4px 0;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.drawer-notes p+p {border-top:1px dashed #c5a78b}
.feedback-dot,.studio-drawer .pocket-tab .paper-unread {
  width:8px;height:8px;flex:none;border-radius:50%;background:#be312b;border:1px solid #fff8e8;
}
.feedback-dot[hidden] {display:none}
[data-feedback-unread] .support-unread {background:#bd302c}
@keyframes feedback-nudge {
  0%,9%,18%,100% {translate:0 0} 3%,14% {translate:-2px 0} 6%,11% {translate:2px 0}
}
@media(prefers-reduced-motion:no-preference) {
  .support-bubble[data-feedback-unread],.pocket-tab[data-feedback-unread],.wk-message[data-feedback-unread] {animation:feedback-nudge 3.4s ease-in-out infinite}
}
@media (max-height:740px) {
  .studio-desk .lens-dial {height:calc(var(--studio-dial-size) + 48px)}
  .studio-desk .console {gap:4px;padding-block:8px}
}
@media (max-width:760px),(max-height:610px) {
  .studio-desk .console > :is(.knob-block,.wheels) {display:none}
  .studio-desk .compact-camera-settings {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .compact-camera-settings label {display:grid;gap:1px;color:#684d34;font:650 11px/1.25 var(--font-cn)}
  .compact-camera-settings label[hidden] {display:none}
  .compact-camera-settings select {min-width:0;width:100%;padding:2px;min-height:27px;border:1px solid #c6ae88;background:#fff5e5;color:#4e3929;border-radius:4px;font:600 12px var(--font-cn)}
  .studio-paper .studio-desk .creation-layout {grid-template-columns:minmax(0,1fr) clamp(178px,27vw,258px);column-gap:12px}
  .studio-desk .console:not(.take-record) {justify-content:space-evenly}
  .studio-desk .film-roll,.studio-desk .strip {min-height:0}
  .studio-desk .strip {padding-block:16px 13px}
  .studio-desk .strip .edge.edge-top {top:8px}
  .studio-desk .strip textarea {height:50px;min-height:0}
  .studio-desk .canister {width:clamp(44px,8vw,70px)}
  .studio-desk .reel-cue {min-height:16px;font-size:11px}
}
@media (max-width:575px) and (min-height:491px) {
  .studio-paper.site-shell {--desk-edge:9px}
  .studio-paper.site-shell main:is(.page-studio,.page-result) {padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .studio-paper .studio-desk .creation-layout {
    grid-template-columns:minmax(0,1fr);grid-template-areas:"monitor" "controls" "roll";
    grid-template-rows:minmax(0,1fr) auto auto;column-gap:0;padding-inline:1px;
  }
  .studio-paper .studio-desk .creation-layout > .console {margin:28px 0 0}
  .studio-paper .studio-desk .monitor-extras + .console {margin-top:6px}
  .studio-paper .studio-desk .creation-panel.roll-area {margin-top:10px}
  .studio-desk .console:not(.take-record) {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:6px 8px}
  .studio-desk .console:not(.take-record) > .console-head {grid-column:1/-1;flex-wrap:nowrap;justify-content:space-between}
  .studio-desk .compact-camera-settings {grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
  .studio-desk .console:not(.take-record) .rec-block {padding:1px 4px;align-self:end;min-height:30px}
  .studio-desk .rec-text small {display:none}
  .studio-desk .console .image-service-note {grid-column:1/-1;margin:0}
  .studio-desk .console.take-record {display:grid;grid-template-columns:auto 1fr;gap:4px 8px;contain:none;padding:6px 8px}
  .studio-desk .take-record .take-record-head {padding:0;border:0}
  .studio-desk .take-meta {justify-content:end}
  .studio-desk .take-versions,.studio-desk .take-actions {grid-column:1/-1}
  .studio-desk .take-strip {display:flex;gap:4px;padding:3px}
  .studio-desk .take-thumb {flex:0 0 auto;grid-template-columns:36px auto auto;margin:0}
  .studio-desk .take-actions {margin:0}
  .studio-desk .take-switch {margin:0}
  .studio-desk .studio-screen {aspect-ratio:auto}
}
@media (max-height:490px) {
  .studio-paper .school-bar {--student-bar-height:40px}
  .studio-paper .school-brand img {width:31px;height:31px}
  .studio-paper .school-brand small,.studio-desk .rec-text small {display:none}
  .studio-paper .studio-desk .creation-layout {padding-top:21px;grid-template-columns:minmax(0,1fr) clamp(145px,27vw,236px)}
  .studio-paper .studio-desk .roll-area .strip {padding-block:10px}
  .studio-desk .strip .edge {display:none}
  .studio-desk .rec-block {min-height:31px;padding:1px 4px}
  .studio-paper .page-studio .creation-foot .camera-shutter {min-height:30px;gap:5px}
  .studio-desk .camera-shutter .rec-btn {width:30px}
  .studio-desk .rec-text b {font-size:15px}
  .studio-desk .compact-camera-settings {gap:3px}
  .studio-desk .shot-nav .shot-link {min-height:23px;font-size:11px;padding:2px 5px}
}

.school-paper .shot-submit {
  width:100%;min-width:0;min-height:clamp(44px,6dvh,57px);display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding:6px 12px;border:1px solid #833323;border-radius:7px;background:#ad4130;color:#fff9ed;
  box-shadow:inset 0 1px #de8872,0 2px #763022;font:750 16px/1.2 var(--font-cn);
}
.school-paper .shot-submit:enabled:hover {background:#983423}
.school-paper .shot-submit:disabled {background:#b98272;color:#fffaf2;box-shadow:inset 0 1px #e4c2b3;opacity:1}
.shot-preview > .preview-decision {display:flex;margin:5px auto 0;min-height:36px}
@media(max-width:575px) and (min-height:491px) {
  .studio-desk .monitor-label .monitor-tools {gap:3px}
  .studio-desk .shot-nav-list {gap:3px}
  .studio-desk .shot-nav .shot-link {font-size:11px;padding:3px 4px}
  .studio-desk .monitor-tools > .shot-preview-button {width:27px;height:27px}
  .studio-desk .take-edit-actions .take-action {min-height:30px}
  .studio-desk .take-actions .shot-submit {min-height:40px}
}
@media(max-height:490px) {
  .studio-desk .take-actions {gap:4px}
  .studio-desk .take-edit-actions .take-action {min-height:25px;padding:3px 2px;gap:3px;font-size:12px;white-space:nowrap}
  .studio-desk .take-edit-actions .icon {width:13px;height:13px}
  .studio-desk .take-actions .shot-submit {min-height:39px}
  .shot-preview > .preview-decision {min-height:29px;margin-top:0}
}
@media(max-width:575px) and (max-height:710px) {
  .studio-paper .studio-desk .creation-panel.roll-area {margin-top:6px}
  .studio-desk .roll-area .film-roll {height:auto;min-height:0}
  .studio-desk .roll-area .film-roll .strip {min-height:0;padding:10px 4px}
  .studio-desk .roll-area .film-roll .edge {display:none}
  .studio-desk .roll-area .film-roll textarea {height:38px;min-height:0}
  .studio-desk .roll-area .film-roll .canister {height:65px;min-height:0}
  .studio-desk .take-actions,.studio-desk .take-record {row-gap:2px}
}
