
/* Classroom shell: a restrained reading and working surface. */
/* R1: put navigation and the first action in one screen, align both to one measure. */
:root{
  --paper:#f8f7f3;--cream:#fffefa;--ink:#252729;--muted:#555b60;
  --accent:#552a68;--line:#d8d3ca;--dark:#252331;
  --class-reading:69ch;--class-section:72rem;
  --class-sans:"Microsoft YaHei UI","Noto Sans CJK SC","Microsoft YaHei",system-ui,sans-serif;
  --class-display:"STKaiti","KaiTi","Noto Serif SC","Songti SC",serif;
}
body{font-family:var(--class-sans);line-height:1.66;border-top:0!important}
.shell{max-width:var(--class-section);padding-inline:clamp(18px,4vw,40px)}
body>.bar,.shell>.bar,#classroom-student>.bar{
  width:100%;max-width:var(--class-section);margin-inline:auto;
  min-height:62px;gap:14px;padding:8px clamp(18px,4vw,40px);
  justify-content:flex-start;align-items:center;box-sizing:border-box;
  background:var(--paper);box-shadow:none;border-bottom:1px solid var(--line);
}
.bar>img{width:119px!important;max-height:38px;object-fit:contain;object-position:left center;flex:0 0 auto}
.bar .name{font-weight:500;color:#45484e;font-size:.83rem;line-height:1.38;min-width:0}
.bar .class-nav{display:flex;align-items:center;gap:10px 20px;flex-wrap:wrap;width:auto;min-width:0}
.bar .class-nav a{white-space:normal;font-size:.89rem;color:#424046;padding:8px 2px!important;line-height:1.16;min-height:38px;display:inline-flex;align-items:center}
.bar .class-nav a.class-nav-current{background:none;border-radius:0;box-shadow:inset 0 -2px #552a68;color:#552a68!important}
#classroom-student{--read-width:var(--class-section)}
#classroom-student :is(.hero,.section,.unit){box-sizing:border-box}
#classroom-student .eyebrow{letter-spacing:.1em;color:var(--accent);font-size:.76rem}
#home-title,#studio-title,#classroom-student .class-masthead h1{
  font-family:var(--class-display);font-size:clamp(2.35rem,5.1vw,4.6rem);
  font-weight:600;letter-spacing:-.035em;line-height:1.03;color:#27212c;margin:.15em 0 .25em
}
#classroom-student :is(.hero .lede,.class-masthead p,.unit-lead){max-width:var(--class-reading)}
#classroom-student :is(.unit h2,.section h2){letter-spacing:-.028em;text-wrap:balance;line-height:1.29}
#classroom-student :is(.btn,button.opt,input,select,textarea):focus-visible,.class-nav a:focus-visible{
  outline:2px solid #674277;outline-offset:3px
}
#classroom-student .btn{border-radius:6px;line-height:1.25}
#classroom-student .btn.prime{background:#552a68;color:#fffefa;border-color:#552a68}
#classroom-student .btn.sec{background:#fffefa;color:#302938;border-color:#bdb4c3}
#home-view .hero{gap:clamp(24px,4.5vw,58px);padding-top:clamp(22px,4vw,48px)!important;padding-bottom:clamp(20px,4vw,42px)!important}
#home-view .hero aside{box-shadow:none;border:1px solid var(--line)}
#home-view .home-route{background:#fffefa;border:1px solid var(--line);border-radius:7px;box-shadow:none}
#home-view .home-route b{line-height:1.33;margin-bottom:6px}
#studio.section{padding-top:18px}
#studio .class-masthead{padding:8px 0 12px;margin-bottom:0;border-bottom:0}
#studio-title{font-size:clamp(2.15rem,4.4vw,3.95rem)}
#studio-intro{margin:0;color:#515057;font-size:clamp(.98rem,1.6vw,1.08rem)}
#studio .studio-stepbar{
  display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;
  border:1px solid var(--line);border-radius:8px;background:var(--cream);
  padding:0;margin:8px 0 24px;overflow:visible
}
#studio .studio-stepbar a{min-width:0;display:flex;align-items:center;justify-content:center;text-align:center;color:#49444d;text-decoration:none;font-size:.84rem;font-weight:600;line-height:1.26;padding:11px 6px;min-height:42px;border-radius:0}
#studio .studio-stepbar a+a{border-left:1px solid #e9e5df}
#studio .studio-stepbar a:is(:hover,:focus-visible,[aria-current]){color:var(--accent);background:#f1edf3}
#studio :is(.studio-stage-intro,.studio-page-card,.studio-music,.studio-extras,.studio-look){
  border:1px solid var(--line);background:var(--cream);border-radius:9px;
  padding:clamp(16px,3vw,25px);box-shadow:none;min-width:0
}
#studio .studio-stage-intro h2{margin:0 0 14px}
#studio .studio-stage-intro .fields{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(10rem,.60fr);gap:13px;max-width:none}
#studio .studio-stage-intro .fields label{min-width:0;margin:0;font-weight:650;color:#33303b;font-size:.91rem}
#studio .fields :is(input,select,textarea){width:100%;min-width:0;max-width:100%;min-height:43px;border:1px solid #c7becd;border-radius:6px;background:#fcfbf8;color:#232129;font-weight:500;margin-top:4px}
#studio .fields select{padding-right:1.6em}
#studio :is(.fine,#studio-outcome){color:#57565e;font-size:.88rem}
#studio .studio-stage-intro p.fine{margin:.55rem 0}
#studio .studio-page-grid{gap:clamp(14px,3vw,30px)}
#studio .studio-preview{border:1px solid var(--line);border-radius:5px;overflow:hidden}
#studio .work-references{margin:15px 0}
#studio details summary{cursor:pointer}
@media(max-width:960px){
  .bar .name{display:none}
  .bar .class-nav{margin-left:auto}
  #studio .studio-stage-intro .fields{grid-template-columns:1fr 1fr}
  #studio .studio-stage-intro .fields label[for=page-locale]{grid-column:1/-1;max-width:19rem}
}
@media(max-width:610px){
 .bar .class-nav{width:100%;margin-left:0;justify-content:flex-start;gap:3px 15px}
 body>.bar,.shell>.bar,#classroom-student>.bar{flex-wrap:wrap;padding-top:8px;padding-bottom:6px;gap:1px}
 .bar .class-nav a{font-size:.77rem;min-height:34px}
 .bar>img{width:96px!important}
 #studio .studio-stepbar{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:14px}
 #studio .studio-stepbar a{font-size:.78rem;padding:7px 3px}
 #studio .studio-stepbar a:nth-child(n+4){border-top:1px solid #e9e5df}
 #studio .studio-stepbar a:nth-child(4){border-left:0}
 #studio .studio-stage-intro .fields{grid-template-columns:minmax(0,1fr);gap:10px}
 #studio .studio-stage-intro .fields label[for=page-locale]{grid-column:auto;max-width:none}
 #studio .studio-page-grid{grid-template-columns:minmax(0,1fr)}
 #home-title{max-width:100%;overflow-wrap:normal;line-height:1.12}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}

/* R2: compare the desktop and phone captures, then sharpen the working states. */
#classroom-student>.bar,.shell>.bar{padding-inline:0}
#studio .studio-stepbar a[aria-current="step"]{color:#421b55;background:#eee7f1;box-shadow:inset 0 -2px #592b6d}
#studio .studio-stepbar a:focus-visible{z-index:1;outline-offset:-3px}
#studio .studio-stage-intro .actions .btn{color:#fffefa;border-color:#552a68;background:#552a68;min-height:44px;font-weight:650}
#studio .studio-stage-intro .actions .btn:hover{background:#452253}
#studio .reference-showcase,#studio .work-references{border-top:1px solid var(--line);padding-top:8px}
#studio .studio-preview-card{border-top:2px solid #6e507a}
#studio .studio-preview-card #page-preview-title{font-size:1.35rem}
#language :is(.round-question,.learn-card,#formality-inline .rank-card){border-radius:7px;background:#fffefa}
#language .round-question .round-choice{min-height:43px}
#language .round-question legend{font-weight:650}
#language .class-model-cols{gap:13px}
#language #original-quiz .taskgrid .gbtn{padding:12px}
@media(max-width:610px){#studio .studio-stage-intro p.fine{line-height:1.46}}

#studio .main-prompt{padding:.9rem 0 0;border-block-start:1px solid #d7c8da}#studio .main-prompt textarea{display:block;width:100%;margin:.35rem 0;color:#27212d;border:1px solid #8a728c;background:#fffcf5;padding:.72rem;line-height:1.55;min-height:6.1em;border-radius:7px;font:inherit;box-sizing:border-box}#studio .main-prompt label{font-weight:670}#studio #page-copy-fields{margin:.75rem 0}#studio #page-copy-fields .fields{padding-top:.6rem}#studio .main-prompt p:empty{display:none}#studio .studio-preview-card{align-self:start}

/* Keep the audience label legible independently of the page accent. */
#page-preview #preview-audience{color:#30413a}
#page-preview[data-style="night"] #preview-audience{color:#fde68a}
#page-preview[data-style="mint"] #preview-audience{color:#14533b}

/* The removed home introduction stays hidden even with saved classroom copy. */
#classroom-student #home-intro{display:none!important}

#original-stage .question-advance,#bank .question-advance{color:#382446;background:#fff;border:1px solid #6a5573;min-height:44px}
#original-stage .opts .opt{display:flex;gap:.6em;align-items:center;min-height:40px;text-align:left}
.red-chamber-visuals,.red-chamber-studies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-block:12px}
.red-chamber-visuals figure{margin:0;padding:8px;border:1px solid #ddd9d0}
.red-chamber-visuals img{display:block;width:100%;height:clamp(145px,23vw,250px);object-fit:contain;background:#f1eee8}
.red-chamber-visuals figcaption{font-size:.85rem;margin:6px 0 0}
.red-chamber-studies article{padding:14px;border:1px solid #ddd9d0;background:#fff}
.red-chamber-studies h4{margin:0 0 .4em}
.study-table table{border-collapse:collapse;width:100%;font-size:.9rem}
.study-table caption{text-align:left;font-size:.83rem;color:#4e4b45}
.study-table :is(th,td){padding:.35em .4em;border-bottom:1px solid #e9e4da;text-align:left}
.red-chamber-think{border-inline-start:3px solid #715b74;padding-inline-start:.65em}
@media(max-width:640px){.red-chamber-studies{grid-template-columns:1fr}.red-chamber-visuals{gap:7px}}

#classroom-student #quiz-route-intro{max-width:none;width:100%;text-wrap:wrap}
@media(min-width:1000px){#classroom-student #quiz-route-intro{font-size:1rem;white-space:nowrap;overflow-wrap:normal}}
#studio #creation-view .studio-stepbar{grid-template-columns:repeat(3,minmax(0,1fr))}
#creation-view #workflow{display:block}
#creation-view #workflow>.studio-page-card+.studio-page-card{margin-top:18px}
#creation-view #page-copy-fields .fields{display:grid;grid-template-columns:minmax(140px,.3fr) minmax(0,.7fr);gap:12px}
#creation-view #page-copy-fields textarea{width:100%;resize:vertical}
#creation-view #device-viewport{position:relative;overflow:hidden;border:1px solid #cbd2ce;background:#edf1ee;width:100%;min-height:125px}
#creation-view #device-frame{display:block;border:0;transform-origin:top left;max-width:none}
#creation-view .device-actions{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
#creation-view .device-actions [aria-pressed="true"]{background:#244a3d;color:white;border-color:#244a3d}
#creation-view #workshop-methods{margin:16px 0;padding:10px 0}
@media(max-width:640px){#creation-view #page-copy-fields .fields{grid-template-columns:1fr}}

body[data-cloud] :is(#class-submit,#wk-layout-image,#seed-submit,#seed-refresh,#page-generate-image,#illustrate){display:none!important}
body[data-cloud] #cloud-work-note{display:block!important}
