/* Only the two reasoning workshops use this HTML canvas. Other chapters keep their layout. */
body[data-mode=hands] #scene.rw-scene{display:block;overflow:auto;align-content:start;scrollbar-width:thin;padding:6px 12px;}
.rw-workshop{width:100%;max-width:820px;margin:0 auto;color:#514b61;display:flex;flex-direction:column;gap:9px;}
.rw-progress{display:flex;align-items:center;flex-wrap:wrap;gap:5px;font-size:12px;}
.rw-chip{display:inline-block;background:#f0e8d3;border-radius:9px;padding:3px 8px;line-height:1.35;}
.rw-chip:first-child{background:#e6eee1;color:#45765e;font-weight:650;}
.rw-relations{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.rw-relations>div{display:flex;align-items:center;gap:9px;background:#f2eddc;border:1px solid #e0d5bc;border-radius:12px;padding:10px;min-width:0;}
.rw-relations b{flex:none;color:#86693c;font-size:16px;}
.rw-relations span{font-size:18px;overflow-wrap:anywhere;line-height:1.5;}
.rw-equation{padding:10px 8px;border-radius:12px;background:#eeeaf5;color:#625b8a;text-align:center;font-size:23px;line-height:1.5;overflow-wrap:anywhere;}
.rw-question{font-weight:650;font-size:19px;line-height:1.5;text-align:center;padding:1px 4px;}
.rw-branch-strip{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;font-size:17px;line-height:1.45;}
.rw-branch-strip span{background:#f0e9d5;border-radius:10px;padding:5px 8px;}
.rw-branch-strip .rw-crossed{background:#f6e5e2;color:#93616b;}
.rw-candidate{background:#e8efe4;border-radius:12px;padding:11px 8px;text-align:center;font-size:23px;line-height:1.5;overflow-wrap:anywhere;}
.rw-quote{font-size:16px;line-height:1.5;text-align:center;color:#81745e;}
body[data-mode=hands] #modelControls.rw-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:6px 12px;align-items:stretch;}
body[data-mode=hands] #modelControls.rw-controls button{min-width:0;font-size:16px;line-height:1.4;min-height:42px;padding:7px 8px;overflow-wrap:anywhere;white-space:normal;}
body[data-mode=hands] #modelControls.rw-controls .rw-undo{grid-column:1/-1;justify-self:start;font-size:12px;min-height:30px;padding:4px 10px;color:#82725e;}
@container mathapp (max-height:520px){
 body[data-mode=hands] #scene.rw-scene{padding:3px 8px;}
 .rw-workshop{gap:5px;}
 .rw-progress{font-size:10px;gap:3px;}
 .rw-chip{padding:2px 5px;}
 .rw-relations{gap:5px;}
 .rw-relations>div{padding:4px 6px;gap:5px;border-radius:8px;}
 .rw-relations b{font-size:12px;}
 .rw-relations span{font-size:13px;line-height:1.4;}
 .rw-equation{font-size:16px;line-height:1.4;padding:4px 6px;border-radius:8px;}
 .rw-question{font-size:14px;line-height:1.4;}
 .rw-branch-strip{font-size:12px;gap:4px;}
 .rw-branch-strip span{padding:3px 6px;border-radius:7px;}
 .rw-candidate{font-size:16px;line-height:1.4;padding:5px 6px;border-radius:8px;}
 .rw-quote{font-size:12px;line-height:1.4;}
 body[data-mode=hands] #modelControls.rw-controls{gap:4px;padding:3px 8px;}
 body[data-mode=hands] #modelControls.rw-controls button{font-size:12px;min-height:30px;padding:4px 5px;line-height:1.35;border-radius:8px;}
 body[data-mode=hands] #modelControls.rw-controls .rw-undo{font-size:11px;min-height:25px;padding:3px 8px;}
}
@container mathapp (max-width:720px) and (max-height:520px){
 .rw-progress .rw-chip:last-child{display:none;}
 body[data-mode=hands] #modelControls.rw-controls{grid-template-columns:repeat(2,minmax(0,1fr));}
 body[data-mode=hands] #modelControls.rw-controls .rw-undo{grid-column:auto;justify-self:stretch;}
}

body[data-mode=book] #scene.rw-book-scene{display:block;overflow:auto;padding:5px 10px;scrollbar-width:thin;}
.rw-book-detail{display:flex;flex-direction:column;gap:7px;max-width:800px;margin:auto;}
.rw-book-caption{text-align:center;font-size:17px;line-height:1.4;color:#87714e;}
.rw-book-math{text-align:center;line-height:1.5;font-size:26px;color:#655d87;}
.rw-book-result{color:#417a65;background:#edf2e6;border-radius:10px;padding:3px;}
body[data-mode=book] #modelControls.rw-book-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:3px 9px;}
body[data-mode=book] #modelControls.rw-book-controls button[aria-pressed=true]{background:#e8eedf;border-color:#9cb89d;}
@container mathapp (max-height:520px){.rw-book-detail{gap:3px}.rw-book-caption{font-size:12px}.rw-book-math{font-size:17px;line-height:1.4}.rw-book-result{padding:2px}body[data-mode=book] #modelControls.rw-book-controls button{font-size:11px;min-height:28px;padding:4px 3px}}

@container mathapp (max-height:520px){.rw-final-quotes{font-size:13px;padding:4px 5px}}
