.math-lab{color:#18313b;background:#f4f7f5;min-height:100vh;padding:28px 16px 70px;font-family:Arial,sans-serif}.math-lab.embedded{background:0 0;min-height:0;padding:18px 0 25px}.math-lab.embedded>nav,.math-lab.embedded .math-editor,.math-lab.embedded .math-task{margin-left:0}.math-draft-controls{border-bottom:1px solid #d5e2df;margin-bottom:18px;padding-bottom:12px}.math-save-message{color:#205955;font-weight:700}.math-lab *{box-sizing:border-box}.math-lab>nav{flex-wrap:wrap;gap:8px;max-width:760px;margin:0 auto 20px;display:flex}.math-lab button{color:#14333d;min-height:44px;font:inherit;cursor:pointer;background:#fff;border:1px solid #acc6c5;border-radius:9px;padding:10px 16px}.math-lab button[aria-pressed=true],.math-editor>button,.math-print-controls button{color:#fff;background:#087b7d;border-color:#087b7d}.math-lab button:disabled{opacity:.48;cursor:not-allowed}.math-editor,.math-task{background:#fff;border:1px solid #d5e2df;border-radius:14px;max-width:760px;margin:0 auto;padding:26px;box-shadow:0 8px 28px #142f3914}.math-editor>header,.math-task>header{border-bottom:2px solid #0a8a9c;margin-bottom:20px;padding-bottom:14px}.math-editor small,.math-task small{color:#346372;font-weight:700}.math-editor h1,.math-task h1{margin:6px 0 10px;font:700 clamp(1.6rem,4vw,2.2rem)/1.2 Arial,sans-serif}.math-editor p,.math-task p{line-height:1.5}.math-editor label,.math-step label{margin:14px 0;font-weight:700;display:block}.math-editor label input,.math-editor label textarea,.math-editor label select,.math-step input,.math-step textarea{color:#18313b;width:100%;min-height:44px;font:inherit;background:#fff;border:1px solid #9db9b8;border-radius:7px;margin-top:7px;padding:10px;display:block}.math-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;display:grid}.math-editor fieldset{border:1px solid #c8d9d5;border-radius:8px;padding:6px 14px}.math-editor legend{padding:0 5px;font-weight:700}.math-errors{background:#fcecea;border-left:4px solid #c2463b;margin:12px 0;padding:8px 14px}.math-errors p{margin:4px 0}.math-intro{font-size:1.1rem}.math-wood{background:#f7f8f4;border:1px solid #d8e0d8;border-radius:10px;margin:20px 0;padding:16px 12px 7px}.math-piece-row{align-items:center;gap:12px;margin-bottom:13px;transition:opacity .16s;display:flex}.math-piece-row.dim{opacity:.3}.math-piece-row.active .math-piece{outline-offset:2px;outline:3px solid #087b7d}.math-piece{color:#362819;background:repeating-linear-gradient(174deg,#d3ad78 0 7px,#dabb8c 8px 12px);border:1px solid #9c784b;flex:none;justify-content:center;align-items:center;min-width:70px;height:38px;font-weight:700;display:flex}.math-piece-row span{font-size:.88rem}.math-focus{flex-wrap:wrap;gap:8px;margin:12px 0 20px;display:flex}.math-focus button[aria-pressed=true]{color:#10393b;background:#dbf1ed;border-color:#087b7d}.math-step{border-top:1px solid #c9dcd7;padding-top:20px}.math-step h2{margin:8px 0 20px;font-size:1.3rem}.math-answer{align-items:center;gap:10px;display:flex}.math-answer input{max-width:170px;font-size:1.15rem}.math-answer textarea{min-height:100px}.math-hint-button{margin-top:15px}.math-hint{background:#eaf3f0;border-radius:8px;margin:10px 0 0;padding:12px}.math-step-nav{justify-content:space-between;gap:10px;margin-top:20px;display:flex}.math-step-nav button:last-child{color:#fff;background:#087b7d}.math-demo-note{color:#536a6f;border-top:1px solid #d4e1dd;margin-top:22px;padding-top:13px;font-size:.9rem}.math-print-controls{align-items:center;gap:12px;max-width:760px;margin:0 auto 14px;display:flex}.math-paper{box-shadow:none}.math-paper-steps section{break-inside:avoid;margin:12px 0}.math-paper-steps h2{margin:0 0 8px;font-size:1.05rem}.math-write-space{border-bottom:1px solid #8a9a9a;height:32px;position:relative}.math-write-space.wide{background:repeating-linear-gradient(#0000 0 29px,#aebfbe 30px 31px);border:none;height:60px}.math-write-space span{position:absolute;bottom:4px;right:2px}@media (width<=580px){.math-lab{padding:14px 9px 40px}.math-editor,.math-task{padding:17px 13px}.math-editor-grid{grid-template-columns:1fr;gap:0}.math-piece-row span{font-size:.75rem}}@page math-task{size:A4 portrait;margin:15mm}@media print{body *{visibility:hidden!important}.math-paper,.math-paper *{visibility:visible!important}.math-paper{page:math-task;color:#172f39;width:100%;max-width:none;box-shadow:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;background:#fff;border:none;border-radius:0;margin:0;padding:0;position:absolute;inset:0}.math-paper .math-wood{margin:12px 0;padding:8px}.math-paper .math-piece-row{margin-bottom:7px}.math-paper .math-piece{height:24px}.math-paper>header{margin-bottom:12px}}
