.mg-actions,.mg-keypad {display:flex;gap:8px;flex-wrap:wrap}
.mg-button {min-width:44px;min-height:44px;padding:8px 12px;border-radius:8px;border:1px solid #aeb4a3;background:#fffdf8;color:#243f32;font:inherit;line-height:1.3;cursor:pointer}
.mg-button:focus-visible,.mg-slider input:focus-visible {outline:3px solid #936124;outline-offset:2px}
.mg-machine {background:#294d3b;border:1px solid #233e30;border-radius:16px;padding:clamp(12px,3vw,22px);box-shadow:inset 0 -3px #213e30}
.mg-display {background:#f6edd4;color:#244132;border-radius:8px;padding:10px 14px}
.mg-target {font-size:.9rem;font-weight:600}
.mg-expression {font:600 clamp(22px,4vw,34px)/1.35 Georgia,serif;margin:6px 0 0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.mg-keypad {margin-block-start:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.mg-keypad .mg-button {box-shadow:inset 0 -2px #ddd5bc;padding:8px 2px;border-color:#fffdf8}
.mg-key {font:600 22px/1.3 Georgia,serif}
.mg-keypad .mg-equals {color:#263c30;background:#ebc18b;border-color:#ebc18b;font-size:24px;font-weight:650}
.mg-question,.mg-note {margin:0;overflow-wrap:anywhere}
.mg-note,.mg-solutions {font:500 17px/1.65 Georgia,"Songti SC",serif;color:#35523c}
.mg-solutions {margin:0;padding-inline-start:23px}
.mg-scale {padding:16px clamp(4px,2vw,14px) 0;background:#e8ede2;border-radius:12px}
.mg-pans {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;border-bottom:5px solid #755432;transform:rotate(var(--mg-tilt,0deg));transform-origin:50% 100%;padding-bottom:4px}
.mg-tray,.mg-empty-pan {padding:6px 0 3px;min-width:0;text-align:center}
.mg-strip {width:100%;height:20px;display:flex;border:1px solid #445c45;background:#fffdf4;box-sizing:border-box}
.mg-strip i {flex:1;border-right:1px solid #697761}
.mg-strip i:last-child {border:0}.mg-strip .mg-ink {background:repeating-linear-gradient(45deg,#52785a 0 4px,#355b46 4px 5px)}
.mg-tray-label {font-size:13px;color:#294334}
.mg-fulcrum {width:0;margin:0 auto;border:11px solid transparent;border-top:0;border-bottom:20px solid #785637}
.mg-area-card {margin:0;padding:14px;background:#234838;border-radius:12px;color:#fff4d9}
.mg-equation {font:600 27px/1.3 Georgia,serif;margin-bottom:12px}
.mg-area-grid {display:grid;grid-template-columns:repeat(var(--mg-columns),minmax(0,1fr));background:#234838;gap:1px}
.mg-area-grid i {aspect-ratio:1;background:#cae3c5;min-width:0}.mg-area-grid .mg-piece {background:repeating-linear-gradient(135deg,#e7b773 0 4px,#fff2d2 4px 5px)}
.mg-area-grid .mg-cut {box-shadow:inset 2px 0 #814817}
.mg-angle {width:100%;max-height:180px;border-radius:12px;background:#eff2e9}
.mg-angle line {stroke-linecap:round}.mg-mirror {stroke:#768b76;stroke-width:1;stroke-dasharray:4 3}
.mg-fixed-ray {stroke:#355c47;stroke-width:4}.mg-free-ray {stroke:#96592e;stroke-width:4}
.mg-slider {display:block;color:#304a39}.mg-slider output {font-variant-numeric:tabular-nums;font-weight:650}
.mg-slider input {display:block;width:100%;min-height:44px;accent-color:#355c47}
