/* Lesson Studio extends the existing classroom visual system. */
.studio-launch{background:#eaf5f0;border:1px solid #c5e0d7;border-radius:16px;padding:25px;margin-bottom:24px}.studio-launch .card-head{align-items:flex-start}.studio-launch h2{font-size:21px}.studio-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-top:20px}.studio-choice{display:flex;align-items:flex-start;flex-direction:column;text-align:left;gap:9px;padding:20px 17px;background:white;border:1px solid #c6dfd6;border-radius:12px;min-height:161px}.studio-icon{background:#e7f4ef;border-radius:9px;width:34px;height:34px;display:grid;place-items:center;color:#087f75;font-size:21px}.studio-choice strong{font-size:14px}.studio-choice small{font-size:12px;color:var(--muted);font-weight:400;line-height:1.6}.studio-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.studio-card{border:1px solid var(--line);border-radius:12px;overflow:hidden;display:flex;flex-direction:column}.studio-art{display:flex;justify-content:space-between;align-items:flex-start;height:112px;padding:18px;background:linear-gradient(125deg,#173d42,#33796b)}.studio-art.live{background:linear-gradient(125deg,#243f66,#517ba1)}.studio-art>span:first-child{font-size:35px;color:#d9ede7;align-self:center}.studio-art .pill{font-size:10px}.studio-card-body{padding:18px;display:flex;flex-direction:column;flex:1}.studio-card-body small{font-size:11px;color:var(--teal);margin-bottom:10px}.studio-card-body h3{font-size:15px;line-height:1.5}.studio-card-body p{font-size:12px;margin-bottom:18px}.studio-card-body button{margin-top:auto;width:100%}.studio-top{display:flex;gap:12px;align-items:center;margin-bottom:22px;flex-wrap:wrap}.studio-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(270px,1fr);gap:22px}.studio-steps{display:flex;gap:8px;flex-wrap:wrap;padding:15px 0 21px;margin:15px 0;border-block:1px solid var(--line);font-size:12px;color:var(--muted)}.studio-steps span{background:#f0f6f3;border-radius:6px;padding:6px 9px}.studio-source{background:#f5f9f7;border:1px dashed #b5cfc5;border-radius:11px;padding:20px;margin:20px 0}.studio-source video{width:100%;max-height:290px;background:#13383e;border-radius:9px;margin:14px 0}.studio-selected{background:white;border:1px solid var(--line);border-radius:9px;padding:12px;margin-top:12px;overflow-wrap:anywhere}.studio-selected small{display:block;font-size:11px;color:var(--muted);margin-top:7px}.studio-tags{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.studio-tags span{background:white;border:1px solid #d5e2dd;border-radius:6px;padding:6px 8px;font-size:11px}.studio-check{display:flex;gap:10px;align-items:flex-start;font-size:12px;font-weight:500;line-height:1.65}.studio-check input{margin-top:5px;flex-shrink:0}.studio-actions{display:flex;gap:12px;margin-top:25px;flex-wrap:wrap}.studio-question{padding:16px 0;border-bottom:1px solid var(--line)}.studio-question>small{font-size:11px;color:var(--teal);display:block;margin-bottom:8px}.studio-question p{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.studio-question button{font-size:12px;padding:7px 10px;margin-top:7px;margin-right:5px}.studio-question h3{margin-top:10px}.studio-live,.studio-locked{text-align:center;padding:37px 24px;background:#eff5f6;border:1px solid #cfdee1;border-radius:13px;margin:22px 0}.studio-live h2{max-width:430px;margin:19px auto 15px;font-size:26px}.studio-live>button{margin:18px 4px 8px}.studio-live .tiny{max-width:500px;margin:12px auto}.studio-video{background:#123239;border-radius:12px;overflow:hidden;margin:20px 0}.studio-video video{width:100%;max-height:490px;display:block}.studio-demo{padding:48px 35px;text-align:center}.studio-demo h2{color:white;font-size:32px;margin:22px 0}.studio-demo p,.studio-demo small{color:#c9ded9}.studio-demo small{font-size:10px;letter-spacing:1.5px}.studio-external{background:#eef3f1;border:1px solid var(--line);border-radius:12px;padding:20px;margin:20px 0;min-height:280px;display:grid;align-content:center;text-align:center}.studio-external iframe{width:100%;aspect-ratio:16/9;min-height:260px;border:0;border-radius:9px}#studio-dialog{max-width:700px}#studio-dialog video{width:100%;max-height:340px;border-radius:10px;background:#143238}#st-record-status{font-variant-numeric:tabular-nums}#st-upload-status progress{width:100%;margin:12px 0;height:14px;accent-color:#087f75}.studio-join-link{display:inline-block;padding:12px 18px;border-radius:9px;background:#087f75;color:white;text-decoration:none;font-weight:650;margin:16px 0}.studio-transcript{white-space:pre-wrap;line-height:1.8;font-size:14px}.studio-create-button{white-space:nowrap}
@media(max-width:1250px){.studio-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-grid{grid-template-columns:1fr}.studio-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.studio-launch{padding:18px}.studio-choice{min-height:160px;padding:16px 12px}.studio-cards{grid-template-columns:1fr}.studio-steps{font-size:10px;gap:5px}.studio-source{padding:14px}.studio-create-button{width:100%}.studio-live{padding:24px 15px}.studio-live h2{font-size:22px}.studio-demo{padding:35px 20px}.studio-demo h2{font-size:26px}}
/* Long friendly location labels must not set a grid item's minimum width. */
.studio-grid > *, .field-grid > * { min-width: 0; }
#studio-edit select { width: 100%; min-width: 0; }

/* A clear primary creation route, with existing sources kept one click away. */
.class-theme-root .studio-launch button.studio-choice-main{background:var(--class-accent,#123e40);border-color:var(--class-accent,#123e40);color:#fff}.class-theme-root .studio-launch button.studio-choice-main:hover{background:var(--class-hover,#1b514e);border-color:var(--class-hover,#1b514e);color:#fff}.class-theme-root .studio-launch .studio-choice-main :is(strong,small,.studio-start-label){color:#fff}
.studio-launch{background:linear-gradient(135deg,#edf7f2,#f8fbf8);border-color:#c8ded5;padding:28px}.studio-launch h2{font-size:clamp(21px,2vw,28px);letter-spacing:-.6px}.studio-launch .card-head p{margin:8px 0 0}.studio-start{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:26px;margin-top:24px;align-items:stretch}.studio-choice-main{background:#123e40;color:white;min-height:220px;padding:25px;gap:13px;border:1px solid #123e40;box-shadow:0 8px 22px #163c3b14}.studio-choice-main .studio-icon{background:#315b59;color:#def2e8;width:42px;height:42px}.studio-choice-main strong{font-size:21px;line-height:1.3}.studio-choice-main small{color:#d1e6dd;font-size:13px;max-width:340px}.studio-start-label{display:inline-block;margin-top:auto;font-weight:700;font-size:13px;color:#fff}.studio-lifecycle{list-style:none;padding:4px 0;margin:0;display:grid;gap:20px;align-content:center}.studio-lifecycle li{display:flex;gap:14px;align-items:flex-start}.studio-lifecycle li>span{display:grid;place-items:center;background:#fff;border:1px solid #bed8ca;color:#256251;border-radius:50%;width:30px;height:30px;font-weight:700;font-size:12px;flex-shrink:0}.studio-lifecycle strong{display:block;font-size:14px;color:#183b38;margin:2px 0 5px}.studio-lifecycle small{display:block;font-size:12px;line-height:1.6;color:#5c7169}.studio-alternatives{border-top:1px solid #d0e2d8;padding-top:20px;margin-top:25px}.studio-alternatives h3{font-size:13px;font-weight:600;color:#526b60;margin:0}.studio-alternatives .studio-choices{gap:10px;margin-top:12px}.studio-alternatives .studio-choice{min-height:145px;padding:15px;gap:8px}.studio-alternatives .studio-icon{width:27px;height:27px;font-size:18px}.studio-alternatives .studio-choice strong{font-size:13px}.studio-alternatives .studio-choice small{font-size:11px;line-height:1.5}.studio-card{background:#fff;border-radius:15px;box-shadow:0 3px 12px #1a3d3206}.studio-card-state{color:#49695c!important;font-size:11px!important;margin-bottom:14px!important}.studio-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}.studio-card-actions button{width:auto;margin:0;flex:1 1 auto;font-size:12px;padding:10px 12px}.studio-card-actions .primary{flex-basis:100%}.studio-save-state{color:#42675a;font-size:12px;line-height:1.5;margin:9px 0 0}.studio-release-list{padding-left:19px;margin:12px 0;line-height:1.75;font-size:12px;color:var(--muted)}.studio-release-list li{padding-left:4px;margin-bottom:7px}.studio-empty{text-align:center;padding:40px 24px}.studio-empty p{max-width:430px;margin:10px auto 0}.studio-optional-recording{border:1px solid #cdded5;border-radius:11px;padding:14px 17px;margin:20px 0}.studio-optional-recording>summary{font-size:14px;font-weight:650;cursor:pointer;color:#294e43}.studio-optional-recording .studio-source{border:0;margin:12px 0 0;padding:12px;background:#f8faf8}.studio-choice:hover{border-color:#588e77;box-shadow:0 3px 10px #20433410}.studio-choice-main:hover{background:#1b514e;border-color:#1b514e}.studio-choice:focus-visible,.studio-card-actions button:focus-visible{outline:3px solid #4fa883;outline-offset:3px}
@media(max-width:1250px){.studio-alternatives .studio-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.studio-launch{padding:18px}.studio-start{grid-template-columns:1fr;gap:21px;margin-top:18px}.studio-choice-main{min-height:205px;padding:21px}.studio-choice-main strong{font-size:20px}.studio-lifecycle{gap:15px}.studio-alternatives{margin-top:20px;padding-top:17px}.studio-alternatives .studio-choice{padding:12px;min-height:157px}.studio-optional-recording{padding:12px}.studio-top{gap:8px}.studio-top button{font-size:12px;padding:9px 10px}.studio-card-actions button{min-height:40px}}

/* Recoverable lesson lifecycle. Deletion stays explicit, reversible and separate from archiving. */
button.danger{border-color:#d9a8a8;color:#8a2020;background:#fffafa}
button.danger:hover:not(:disabled){background:#fff0f0;border-color:#b96464;color:#6f1717}
.studio-lifecycle-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.studio-delete-blockers{margin:14px 0;padding-left:22px;color:#6f2525;line-height:1.75}
.studio-trash{margin-top:22px;overflow:hidden}
.studio-trash>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer;font-weight:750;color:var(--ink);padding:18px 20px;list-style:none}
.studio-trash>summary::-webkit-details-marker{display:none}
.studio-trash>summary:before{content:'›';font-size:24px;color:var(--muted);transform:rotate(0);transition:transform .15s ease}
.studio-trash[open]>summary:before{transform:rotate(90deg)}
.studio-trash-intro{padding:0 20px 14px;border-bottom:1px solid var(--line)}
.studio-trash-list{display:grid}
.studio-trash-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 20px;border-bottom:1px solid var(--line)}
.studio-trash-row:last-child{border-bottom:0}
.studio-trash-row h3{margin-bottom:4px}
.studio-trash-row p{margin:3px 0}
.studio-trash-row .actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:260px}
@media(max-width:760px){.studio-trash-row{align-items:flex-start;flex-direction:column}.studio-trash-row .actions{min-width:0;width:100%;justify-content:stretch}.studio-trash-row .actions button{flex:1}.studio-lifecycle-actions button{flex:1}}

/* Shared preparation, readiness and finish-class controls. */
.lesson-workflow-dialog{width:min(720px,calc(100vw - 24px));max-height:90dvh;overflow:auto;border:1px solid #c8d9e2;border-radius:20px;padding:24px;color:#173a4b;background:#fff}.lesson-workflow-dialog::backdrop{background:#102c42aa}.lesson-workflow-dialog .actions{display:flex;gap:10px;flex-wrap:wrap}.lesson-workflow-dialog button,.lesson-workflow-dialog select{min-height:44px}.lesson-workflow-dialog fieldset{border:1px solid #d4e0e8;border-radius:12px;padding:16px;margin:18px 0}.lesson-workflow-dialog legend{font-weight:700}.lesson-workflow-dialog label{display:block;margin:12px 0}.lesson-workflow-dialog input[type=checkbox]{margin-right:8px;width:18px;height:18px}.lesson-workflow-dialog textarea,.lesson-workflow-dialog select{width:100%;font:inherit;padding:10px;border:1px solid #a8bdca;border-radius:8px}.lesson-readiness{padding:0;list-style:none;display:grid;gap:12px}.lesson-readiness li{display:flex;gap:12px;align-items:flex-start;padding:12px;background:#f4f8fb;border-radius:10px}.lesson-readiness [data-state=blocked]{background:#fff2e6}.lesson-readiness [data-state=ready]{background:#eaf7f0}.lesson-history article{border-bottom:1px solid #d4e0e8;padding:14px 0}.studio-prepare-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.studio-prepare-choices .studio-choice{min-height:154px;text-align:left}.studio-save-state{padding:10px 12px;background:#eef6fa;border-radius:8px}.studio-save-state[data-state=error]{background:#fff0df;color:#744012}@media(max-width:600px){.studio-prepare-choices{grid-template-columns:1fr}.studio-prepare-choices .studio-choice{min-height:108px}.lesson-workflow-dialog{padding:16px}.lesson-readiness li{display:block}.lesson-readiness .pill{display:inline-block;margin-bottom:6px}.lesson-workflow-dialog .actions>*{flex:1 1 180px}.studio-top{flex-wrap:wrap}}
