.mq-shell{max-width:980px;margin:auto;padding:18px 14px 70px}.mq-top{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}.mq-top a{text-decoration:none}.mq-hero{padding:28px;border-radius:24px;background:linear-gradient(135deg,#111827,#312e81);color:#fff;margin-bottom:18px}.mq-hero p{letter-spacing:.14em;font-size:12px;margin:0 0 5px}.mq-hero h1{font-size:34px;margin:0 0 8px}.mq-hero strong,.mq-hero span{display:block}.mq-hero span{opacity:.82;margin-top:8px}.mq-grades{display:flex;gap:7px;overflow:auto;padding:3px 0 14px}.mq-grades a{white-space:nowrap;padding:8px 12px;border-radius:999px;background:#eef2f7;text-decoration:none;color:#334155}.mq-grades a.on{background:#111827;color:white}.mq-stage-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}.mq-stage-grid a{display:flex;flex-direction:column;gap:5px;padding:16px;border:1px solid #e2e8f0;border-radius:17px;text-decoration:none;color:inherit;background:white}.mq-stage-grid span,.mq-meta span{font-size:11px;font-weight:800;color:#6366f1}.mq-stage-grid small{color:#64748b}.mq-gauge{padding:12px 15px;background:white;border-radius:16px;margin-bottom:12px}.mq-gauge>div:first-child{display:flex;justify-content:space-between}.mq-bar{height:9px;background:#e5e7eb;border-radius:10px;overflow:hidden;margin-top:7px}.mq-bar i{display:block;height:100%;background:#f59e0b}.mq-stage-head{padding:18px 4px}.mq-stage-head span{font-weight:800;color:#6366f1}.mq-stage-head h1{margin:4px 0}.mq-card{background:white;border:1px solid #e2e8f0;border-radius:22px;padding:22px;box-shadow:0 8px 28px rgba(15,23,42,.06)}.mq-meta{display:flex;justify-content:space-between;gap:12px;color:#64748b}.mq-card h2{font-size:24px;line-height:1.65;margin:22px 0}.mq-answer{display:flex;gap:8px}.mq-answer input{flex:1;min-width:0;font-size:22px;padding:13px;border:2px solid #cbd5e1;border-radius:13px}.mq-answer button,.mq-choices button{border:0;border-radius:13px;padding:13px 18px;background:#4f46e5;color:white;font-weight:800;font-size:16px}.mq-choices{display:grid;gap:9px}.mq-pending{padding:18px;background:#f8fafc;border-radius:13px;color:#64748b}.mq-result{margin-top:16px;padding:16px;border-radius:14px}.mq-result.ok{background:#ecfdf5}.mq-result.ng{background:#fff7ed}.mq-result p{margin:7px 0 0;line-height:1.7}.mq-nav{display:flex;justify-content:space-between;margin-top:22px}.mq-nav button{padding:9px 13px;border:0;border-radius:10px;background:#eef2f7}.mq-done{text-align:center}.mq-done a{display:inline-block;margin-top:10px;padding:12px 18px;background:#4f46e5;color:white;border-radius:12px;text-decoration:none}@media(max-width:600px){.mq-card{padding:17px}.mq-card h2{font-size:20px}.mq-meta{display:block}.mq-meta b{display:block;margin-top:5px}.mq-answer{flex-direction:column}}
.mq-visual{max-width:620px;margin:18px auto}.mq-visual-svg{display:block;width:100%;height:auto;max-height:310px}.mq-visual-svg path,.mq-visual-svg polygon,.mq-visual-svg rect{fill:#fff;stroke:#263248;stroke-width:3;stroke-linejoin:round}.mq-visual-svg line{stroke:#263248;stroke-width:3}.mq-visual-svg .helper{fill:none;stroke:#7b8798;stroke-dasharray:7 6;stroke-width:2}.mq-visual-svg .dash{fill:none;stroke:#9aa5b3;stroke-dasharray:6 5;stroke-width:2}.mq-visual-svg text{font-size:18px;font-weight:800;fill:#263248}.mq-visual-svg text.small{font-size:14px}.mq-visual-svg .plain{fill:#fff}.mq-visual-svg .band,.mq-visual-svg .pie{fill:#eef2f7}.mq-visual-svg .b1,.mq-visual-svg .p1{fill:#dce5ef}.mq-visual-svg .b2,.mq-visual-svg .p2{fill:#cbd8e6}.mq-cube-compare{display:grid;grid-template-columns:1fr 1fr;gap:14px;max-width:430px;margin:18px auto}.mq-cube-compare button{min-height:120px;border:2px solid #d8e0ea;border-radius:16px;background:#fff;font-size:28px;font-weight:900}.mq-cube-compare span{font-size:16px;font-weight:700}
.mq-diagram-choices,.mq-solid-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px auto;max-width:760px}.mq-diagram-choices button,.mq-solid-choices button{border:2px solid #d8e0ea;border-radius:14px;background:#fff;padding:8px;font-weight:900;font-size:18px}.mq-diagram-choices .mq-visual-svg{max-height:150px}.mq-solid-choices button{min-height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.mq-solid-choices span{font-size:16px}@media(max-width:640px){.mq-diagram-choices,.mq-solid-choices{grid-template-columns:1fr}.mq-diagram-choices .mq-visual-svg{max-height:120px}}
/* v3: CALC input UI reused by Math Quest. Only decimal key is added. */
.mq-answer-row{margin-top:14px}.mq-calc-workspace{margin-top:0}.mq-actions{display:flex;justify-content:flex-end;margin-top:14px}.mq-actions .calc-key{width:min(150px,100%)}
.mq-result #mqContinue{margin-top:10px;border:0;border-radius:12px;padding:11px 18px;font-weight:900;background:#202638;color:#fff}.mq-result.pass{border-color:#d6dde7;background:#f7f9fb}.mq-finish-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:18px}.mq-finish-actions a,.mq-finish-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border-radius:12px;border:1px solid #ccd5e0;background:#fff;font-weight:900;text-decoration:none;color:#202638}
/* Same handwriting memo behavior/layout as CALC v2. */
.calc-workspace{display:block}.calc-controls{min-width:0}.calc-memo,.calc-memo-toggle{display:none}.calc-memo,.calc-memo *{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}#calc-memo-canvas{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
@media (min-width:721px) and (max-width:1180px) and (pointer:coarse){.calc-workspace{display:grid;grid-template-columns:minmax(300px,430px) minmax(280px,1fr);justify-content:center;align-items:start;gap:18px;margin-top:18px}.calc-workspace .calc-keypad{margin-top:0}.calc-memo{display:block;min-width:0;padding:10px;border:1px solid #d8dee8;border-radius:16px;background:#f8fafb;text-align:left}.calc-memo__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;font-size:13px}.calc-memo__head button{min-height:34px;padding:5px 10px;border:1px solid #d8dee8;border-radius:10px;background:#fff;color:#4b5565;font:inherit;font-size:12px;font-weight:800}#calc-memo-canvas{display:block;width:100%;height:300px;border:1px solid #cfd7e3;border-radius:10px;background-color:#fff;background-image:linear-gradient(#eef2f6 1px,transparent 1px),linear-gradient(90deg,#eef2f6 1px,transparent 1px);background-size:24px 24px;cursor:crosshair}}
@media (max-width:720px){.calc-memo-toggle{display:block;width:min(430px,100%);min-height:42px;margin:14px auto 8px;border:1px solid #d5dce8;border-radius:11px;background:#fff;color:#39465a;font:inherit;font-size:13px;font-weight:900}.calc-workspace{display:flex;flex-direction:column;width:100%;margin:0}.calc-controls{display:contents}.calc-memo{display:none;order:-1;width:min(430px,100%);box-sizing:border-box;margin:0 auto 10px;padding:9px;border:1px solid #d8dee8;border-radius:14px;background:#f8fafb;text-align:left}.calc-memo.is-open{display:block}.calc-memo__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px;font-size:12px}.calc-memo__head button{min-height:32px;padding:4px 9px;border:1px solid #d8dee8;border-radius:9px;background:#fff;color:#4b5565;font:inherit;font-size:11px;font-weight:800}#calc-memo-canvas{display:block;width:100%;height:270px;border:1px solid #cfd7e3;border-radius:9px;background-color:#fff;background-image:linear-gradient(#eef2f6 1px,transparent 1px),linear-gradient(90deg,#eef2f6 1px,transparent 1px);background-size:24px 24px;cursor:crosshair}.calc-workspace .calc-keypad{order:0}}

.mq-submit-row{display:flex;justify-content:center;margin:14px 0 4px}.mq-submit-button{min-width:180px;min-height:48px;border:0;border-radius:12px;background:#202638;color:#fff;font-size:17px;font-weight:900}.mq-next-stage{background:#202638!important;color:#fff!important;border-color:#202638!important}

.mq-answer-key{font-weight:900}

/* Math Quest v60: unit-cube and solid-diagram refinements */
.mq-cube-compare--visual{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;max-width:760px;margin:18px auto}
.mq-cube-stack-choice{background:#fff;border:2px solid #d8e0ec;border-radius:22px;padding:8px;cursor:pointer;min-height:280px}
.mq-cube-stack-choice:hover{border-color:#7b78ff}
.mq-cube-stack-choice .mq-visual-svg{width:100%;height:auto;max-height:270px}
.mq-unit-cube polygon{fill:#fff;stroke:#25324a;stroke-width:2}
.mq-unit-cube polygon:nth-child(1){fill:#f3f6fb}
.mq-unit-cube polygon:nth-child(2){fill:#e8eef7}
.mq-cube-label{font-size:28px;font-weight:800;fill:#1c2436}
.mq-composite-solid .mq-solid-back{fill:#f3f6fb}
.mq-composite-solid .mq-solid-face{fill:#eef3f9}
@media(max-width:700px){.mq-cube-compare--visual{grid-template-columns:1fr 1fr;gap:10px}.mq-cube-stack-choice{min-height:190px;padding:4px}}
/* Shared/basic renderer adapters */
.mq-clock-wrap{max-width:330px;margin:0 auto}.mq-clock-face{display:block;width:100%;height:auto}.mq-clock-face .dial{fill:#fff;stroke:#6b7e95;stroke-width:4}.mq-clock-face .tick{stroke:#9aa9b8;stroke-width:2}.mq-clock-face .tick.major{stroke:#52677f;stroke-width:4}.mq-clock-face .num{font:700 18px system-ui,sans-serif;fill:#24364a;text-anchor:middle;dominant-baseline:middle}.mq-clock-face .hand{stroke:#3f4c5c;stroke-linecap:round;transform-origin:100px 100px}.mq-clock-face .hour-hand{stroke-width:8}.mq-clock-face .minute-hand{stroke-width:5}.mq-clock-face .hand.is-highlight{stroke-width:12}.mq-clock-face .center-dot{fill:#334155}.mq-table-wrap{overflow:auto;max-width:680px;margin:0 auto}.mq-data-table{border-collapse:collapse;margin:auto;background:#fff}.mq-data-table th,.mq-data-table td{border:2px solid #9aa9b8;padding:9px 14px;text-align:center;min-width:48px}.mq-data-table th{background:#f0f4f8}.mq-length-compare{display:grid;gap:18px;max-width:560px;margin:auto}.mq-length-compare>div{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:10px}.mq-pencil{display:block;height:18px;border:2px solid #52677f;border-radius:8px;background:#fff;position:relative}.mq-pencil:after{content:"";position:absolute;right:-18px;top:-2px;border-left:18px solid #52677f;border-top:9px solid transparent;border-bottom:9px solid transparent}.mq-unit-length{max-width:560px;margin:auto}.mq-unit-length .mq-pencil.long{width:80%;margin:0 0 16px}.mq-unit-length>div{display:flex;width:80%}.mq-unit-length i{height:34px;flex:1;border:1px solid #52677f;background:#f3f6f9}.mq-capacity-compare,.mq-cups{display:flex;justify-content:center;align-items:flex-end;gap:28px}.mq-capacity-compare>div{text-align:center}.mq-cup{display:inline-flex;align-items:flex-end;width:76px;height:105px;border:3px solid #52677f;border-top:0;border-radius:0 0 18px 18px;overflow:hidden;background:#fff}.mq-cup i{display:block;width:100%;background:#dbe9f5}.mq-ruler-object{fill:#fff;stroke:#52677f;stroke-width:3}.mq-scale-arc{fill:none!important;stroke:#52677f;stroke-width:4}.mq-point{fill:#263248;stroke:none}.mq-move-arrow{fill:none!important;stroke:#52677f;stroke-width:3}
/* v66 shared math visual renderer */
.mq-common-visual{max-width:100%;height:auto}.mq-common-visual .axis,.mq-common-visual line{stroke:currentColor;stroke-width:2;fill:none}.mq-common-visual .tick{stroke-width:1}.mq-vtext{font-size:15px;fill:currentColor}.mq-vbar,.mq-vbox{fill:rgba(80,120,220,.16);stroke:currentColor;stroke-width:2}.mq-vline{fill:none;stroke:currentColor;stroke-width:3}.mq-vline.series1{stroke-dasharray:9 6}.mq-vpoint{fill:currentColor}.mq-vmedian{stroke:currentColor;stroke-width:4}.mq-frac{fill:transparent;stroke:currentColor;stroke-width:2}.mq-frac.is-shaded{fill:rgba(80,120,220,.28)}.mq-render-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.mq-visual-choice{background:var(--surface,#fff);border:2px solid rgba(127,127,127,.25);border-radius:16px;padding:8px;cursor:pointer}.mq-visual-choice .mq-visual-svg{width:100%;height:auto}.mq-data-chips,.mq-object-row,.mq-people-row{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-items:center}.mq-data-chips span,.mq-object-row span,.mq-people-row span{padding:10px 14px;border:1px solid rgba(127,127,127,.3);border-radius:12px}.mq-people-row span{width:44px;height:60px;border-radius:22px 22px 12px 12px;text-align:center;padding-top:18px}.mq-picture-sort,.mq-picture-graph{display:grid;gap:12px;max-width:520px;margin:auto}.mq-picture-sort>div,.mq-picture-graph>div{display:grid;grid-template-columns:90px 1fr;gap:12px;align-items:center;padding:10px;border-bottom:1px solid rgba(127,127,127,.2)}.mq-picture-graph span{letter-spacing:8px}
.mq-inline-choice{display:flex;gap:12px;justify-content:center;margin-top:8px}.mq-inline-choice button{min-width:88px;padding:12px 20px;border-radius:12px;border:2px solid rgba(127,127,127,.25);background:var(--surface,#fff);font-weight:800}

/* v67 generic geometry renderer */
.mq-geometry-generic{max-width:520px;width:100%;height:auto}.mq-geometry-generic *{vector-effect:non-scaling-stroke}.mq-geometry-generic line,.mq-geometry-generic path,.mq-geometry-generic polygon,.mq-geometry-generic rect,.mq-geometry-generic circle,.mq-geometry-generic ellipse{fill:none;stroke:currentColor;stroke-width:3;stroke-linejoin:round;stroke-linecap:round}.mq-geometry-generic .helper,.mq-geometry-generic .dash{stroke-dasharray:7 6;stroke-width:2}.mq-geometry-generic .equal-mark{fill:none;stroke:currentColor;stroke-width:3;stroke-dasharray:none}.mq-geometry-generic .mq-grid-cell{stroke-width:2}.mq-geometry-generic .mq-vtext{fill:currentColor;stroke:none;font-size:20px;font-weight:700}.mq-geometry-generic .mq-angle-arc{stroke-width:2}.mq-render-choice-grid .mq-geometry-generic{max-height:220px}.mq-visual-choice{min-width:0}
/* v68 interactive/shared renderer finishing */
.mq-connect-point{fill:#fff;stroke:currentColor;stroke-width:3;cursor:pointer}.mq-connect-point.selected{stroke-width:6}.mq-connect-line{stroke:currentColor;stroke-width:4;stroke-linecap:round}.mq-connect-help{text-align:center;font-size:.9rem;opacity:.75}.mq-target{fill:transparent;stroke:currentColor;stroke-width:3;stroke-dasharray:5 4}.mq-geometry-generic .mq-vtext{font-size:18px}.mq-geometry-generic .helper{stroke-dasharray:6 5}
/* v69 shared/basic renderer audit fixes */
.mq-item-count{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;max-width:520px;margin:8px auto;font-size:clamp(34px,8vw,58px);line-height:1.1}
.mq-trace-write{display:flex;align-items:center;justify-content:center;min-height:190px}.mq-trace-write span{font-size:150px;font-weight:800;line-height:1;color:transparent;-webkit-text-stroke:3px currentColor;opacity:.28}
.mq-vertical-calc{width:max-content;min-width:150px;margin:4px auto;font-size:36px;font-variant-numeric:tabular-nums;text-align:right;line-height:1.25}.mq-vertical-calc>div:nth-child(2){display:flex;justify-content:space-between;gap:30px}.mq-vertical-calc hr{border:0;border-top:3px solid currentColor;margin:4px 0}.mq-vertical-answer{min-height:42px}
.mq-vertical-division{position:relative;width:max-content;min-width:210px;margin:16px auto 4px;font-size:34px;font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto 18px auto;gap:3px;align-items:start}.mq-vertical-division strong{border-top:3px solid currentColor;padding:4px 10px}.mq-vertical-division i{font-style:normal;font-size:48px;line-height:.85}.mq-vertical-division div{grid-column:3;text-align:center;min-height:40px}

/* v77: ordered-position visual answer */
.mq-people-wrap{display:grid;gap:8px}.mq-people-guide{display:flex;justify-content:space-between;align-items:center;font-weight:700}.mq-people-guide i{flex:1;border-top:2px solid currentColor;margin:0 12px;position:relative}.mq-people-guide i:after{content:"";position:absolute;right:-1px;top:-5px;border-left:8px solid currentColor;border-top:4px solid transparent;border-bottom:4px solid transparent}.mq-people-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.mq-person-choice{min-width:54px;display:grid;place-items:center;gap:2px}.mq-person-choice span{font-size:30px;line-height:1}.mq-person-choice b{font-size:14px}

/* v79: on-screen math expression input */
.mq-math-keys{display:grid;grid-template-columns:repeat(7,minmax(42px,1fr));gap:8px;max-width:680px;margin:10px auto 14px}.mq-math-keys button{min-height:44px;border:1px solid #d6dbe5;border-radius:10px;background:#fff;font:inherit;font-weight:700;cursor:pointer}.mq-math-keys button:active{transform:translateY(1px)}@media(max-width:560px){.mq-math-keys{grid-template-columns:repeat(5,minmax(42px,1fr));gap:6px}.mq-math-keys button{min-height:42px}}

/* v86: final responsive visual audit */
.mq-card,.mq-visual,.mq-render-choice-grid,.mq-visual-choice{box-sizing:border-box;min-width:0}
.mq-card h2{overflow-wrap:anywhere}
.mq-visual{width:100%;overflow:hidden}
.mq-visual>svg,.mq-visual .mq-visual-svg,.mq-visual .mq-geometry-generic{max-width:100%;height:auto}
.mq-render-choice-grid{width:100%}
.mq-visual-choice{width:100%;overflow:hidden;touch-action:manipulation}
.mq-visual-choice>b{display:block;margin-bottom:4px}
.mq-table-wrap{width:100%;max-width:100%;-webkit-overflow-scrolling:touch}
.mq-data-table{max-width:none}
@media(max-width:600px){
 .mq-visual{margin:14px auto}
 .mq-render-choice-grid{grid-template-columns:1fr;gap:10px}
 .mq-render-choice-grid .mq-visual-svg,.mq-render-choice-grid .mq-geometry-generic{max-height:210px}
 .mq-visual-choice{min-height:48px;padding:7px}
 .mq-geometry-generic .mq-vtext,.mq-common-visual .mq-vtext{font-size:17px}
 .mq-capacity-compare,.mq-cups{gap:14px}
 .mq-cup{width:62px;height:90px}
 .mq-picture-sort>div,.mq-picture-graph>div{grid-template-columns:72px 1fr;gap:8px}
 .mq-data-table th,.mq-data-table td{padding:8px 10px}
}

/* v93: second-round curriculum display audit */
.mq-math-inline{font-variant-numeric:lining-nums}
.mq-frac-text{display:inline-flex;vertical-align:middle;flex-direction:column;align-items:center;line-height:1.05;margin:0 .12em;font-size:.95em}
.mq-frac-text>span:first-child{border-bottom:1.6px solid currentColor;padding:0 .18em .08em}
.mq-frac-text>span:last-child{padding:.08em .18em 0}
.mq-radical{display:inline-flex;align-items:flex-start;vertical-align:middle}.mq-root{font-size:1.15em;line-height:1}.mq-radicand{border-top:1.6px solid currentColor;padding:.03em .12em 0 .05em;line-height:1}
.mq-card h2 sup,.mq-math-keys sup{font-size:.65em;vertical-align:super}
.mq-length-stick{display:block;height:12px;border-radius:7px;background:currentColor;opacity:.75;min-width:28px}
.mq-people-row{flex-wrap:nowrap!important;overflow-x:auto;justify-content:flex-start!important;padding-bottom:6px}
.mq-people-row .mq-person-choice{flex:0 0 52px}
.mq-visual-svg .grid{stroke:#d7dde7;stroke-width:1}
.mq-visual-svg .hidden-edge{fill:none;stroke:#7b8798;stroke-width:2;stroke-dasharray:7 6}
.mq-visual-svg .target-area{fill:#e8eef7;stroke:#263248;stroke-width:3}
.mq-visual-svg .cutout-area{fill:#fff;stroke:#263248;stroke-width:3}

/* v94: geometry family rebuild */
.mq-visual-svg .dimension{fill:none;stroke:#596579;stroke-width:2}
.mq-visual-svg .right-mark{fill:none;stroke:#596579;stroke-width:2}
.mq-render-choice-grid .mq-visual-choice .mq-visual-svg{min-height:150px}
@media(min-width:700px){.mq-render-choice-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}}

/* final audit repair */
.mq-radical{display:inline-flex;align-items:flex-start;vertical-align:-.12em;white-space:nowrap}.mq-root{font-family:serif;font-size:1.32em;line-height:.92;transform:scaleX(.9);transform-origin:right top}.mq-radicand{border-top:1.8px solid currentColor;padding:.06em .14em 0 .05em;line-height:1.05;min-width:.45em}.mq-neg{display:inline-block;vertical-align:.1em;margin-right:.04em}.mq-frac-text{vertical-align:-.34em}.mq-person-icon{display:inline-flex!important;align-items:center;justify-content:center;gap:2px;width:44px!important;height:54px!important;border-radius:22px!important;padding:0!important}.mq-person-icon i{font-size:26px;font-style:normal}.mq-geometry-generic .tree-crown{fill:rgba(70,120,70,.15)}.mq-geometry-generic .tree-trunk{fill:rgba(120,90,60,.15)}.mq-angle-answer{text-align:center}.mq-angle-answer>span{font-size:34px;vertical-align:middle}.mq-angle-answer input{font-size:28px;width:120px;text-transform:uppercase}.mq-symbol-keys{display:flex;justify-content:center;gap:10px;margin:12px}.mq-symbol-keys button{min-width:54px;min-height:48px;font-size:22px}.mq-rate-keys{grid-template-columns:repeat(7,minmax(42px,1fr))}.space-diagonal{stroke-dasharray:6 5!important;stroke-width:3!important}
.mq-struct-preview{min-height:44px;text-align:center;font-size:28px;font-weight:700;margin:6px auto}.mq-math-keys [data-structure]{border-width:2px}
/* v106 final audit family fixes */
.mq-dog-row{display:flex;flex-wrap:nowrap;justify-content:center;gap:8px;overflow-x:auto}.mq-dog-choice{flex:0 0 68px;padding:4px}.mq-dog-choice img{display:block;width:60px;height:60px;object-fit:contain}.mq-face-select .mq-inline-choice,.mq-inline-choice{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:10px}.mq-inline-choice button{min-width:52px;min-height:46px;font-size:18px}.mq-geometry-generic .protractor{stroke:#718096;stroke-width:2}.mq-geometry-generic .protractor-major{stroke:#4a5568;stroke-width:2}.mq-geometry-generic .protractor-minor{stroke:#a0aec0;stroke-width:1}.mq-geometry-generic .angle-ray{stroke-width:4}.mq-geometry-generic .highlight-face{fill:rgba(80,120,220,.14);stroke-width:3}.mq-geometry-generic .paper-a{fill:rgba(80,120,220,.12)}.mq-geometry-generic .paper-b{fill:rgba(220,140,80,.12)}
.mq-pair-answer,.mq-fraction-answer,.mq-mixed-answer{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:16px 0}.mq-pair-answer input,.mq-mixed-answer>input{width:90px;font-size:28px;text-align:center;padding:8px}.mq-frac-entry{display:inline-grid;grid-template-rows:1fr 2px 1fr;width:88px;vertical-align:middle}.mq-frac-entry input{width:100%;box-sizing:border-box;text-align:center;font-size:25px;padding:5px}.mq-frac-entry i{display:block;background:currentColor;height:2px}.mq-fraction-note{text-align:center;font-size:13px;opacity:.7}.mq-math-preview{min-height:42px;font-size:30px;text-align:center;margin-bottom:8px}.mq-expression-answer{display:grid;grid-template-columns:1fr auto;gap:8px}.mq-expression-answer .mq-math-preview{grid-column:1/-1}
.mq-pair-keys{display:grid;grid-template-columns:repeat(6,minmax(44px,64px));gap:7px;justify-content:center;margin:10px auto 16px}.mq-pair-keys button{min-height:46px;font-size:20px}
.mq-unit-length .mq-rod.long{display:block;width:80%;height:18px;border:3px solid #52677f;border-radius:9px;background:#fff;margin:0 0 16px}
.mq-source-data{max-width:620px;margin:0 auto 14px;text-align:center}.mq-source-data>div{display:flex;gap:7px;flex-wrap:wrap;justify-content:center;margin-top:7px}.mq-source-data span{border:1px solid rgba(127,127,127,.3);border-radius:10px;padding:6px 9px;background:#fff}
.mq-mini-table{overflow:auto;margin:0 auto 12px;max-width:620px}.mq-mini-table table{border-collapse:collapse;margin:auto}.mq-mini-table th,.mq-mini-table td{border:1px solid #9aa9b8;padding:6px 10px;text-align:center}
.mq-frac-text{vertical-align:middle!important}.mq-svg-measure{display:flex;align-items:center;justify-content:center;gap:3px;font:700 18px system-ui;color:#24364a}.mq-svg-frac{display:inline-flex;flex-direction:column;line-height:1;text-align:center}.mq-svg-frac b:first-child{border-bottom:1.5px solid currentColor;padding:0 3px 2px}.mq-svg-frac b:last-child{padding-top:2px}

/* v107: diagram-linked answers and expression display */
.mq-solid-face{fill:rgba(90,130,220,.04);stroke:transparent;stroke-width:8;cursor:pointer;pointer-events:all}
.mq-solid-face:hover,.mq-solid-face:focus{fill:rgba(90,130,220,.18);outline:none}
.mq-vertex-hit{fill:transparent;stroke:transparent;cursor:pointer;pointer-events:all}
.mq-vertex-hit:hover,.mq-vertex-hit:focus{fill:rgba(90,130,220,.18);stroke:rgba(90,130,220,.55);stroke-width:2;outline:none}
.mq-figure-hint{text-align:center;font-weight:700;margin:0 0 4px}
.mq-expression-raw{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
/* v109: figure-linked answer targets remain visible but do not pre-highlight correctness. */
.mq-click-point,.mq-vertex-hit{fill:var(--surface,#fff);stroke:currentColor;stroke-width:2;cursor:pointer}
.mq-click-point:hover,.mq-click-point:focus,.mq-vertex-hit:hover,.mq-vertex-hit:focus{stroke-width:4;outline:none}
/* v110: wide transparent hit target for selecting cuboid edges without drawing an answer cue. */
.mq-edge-hit{stroke:transparent!important;stroke-width:18!important;fill:none;cursor:pointer;pointer-events:stroke}
.mq-edge-hit:focus,.mq-edge-hit:hover{stroke:rgba(35,110,210,.18)!important;outline:none}
.mq-frac-sign{font-size:28px;font-weight:700;min-width:1em;text-align:center}.mq-fraction-tools{display:flex;justify-content:center;margin:-4px 0 8px}.mq-fraction-tools button{min-width:54px;min-height:44px;font-size:22px;font-weight:700}

/* v128: explicit solid faces; never fill open multi-segment paths */
.mq-geometry-generic .mq-solid-front{fill:rgba(127,127,127,.04)}.mq-geometry-generic .mq-solid-top{fill:rgba(127,127,127,.09)}.mq-geometry-generic .mq-solid-side{fill:rgba(127,127,127,.14)}.mq-geometry-generic .mq-solid-back,.mq-geometry-generic .mq-solid-base{fill:rgba(127,127,127,.03)}.mq-geometry-generic .mq-open-edge{fill:none}

/* v129: Grade 1 clock answers — large, literal, child-friendly controls */
.mq-clock-answer{display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap;margin:22px auto 10px}.mq-clock-field{display:flex;align-items:center;gap:8px;font-size:28px;font-weight:900}.mq-clock-field input{width:86px;min-height:64px;box-sizing:border-box;border:3px solid #aab7c7;border-radius:16px;background:#fff;text-align:center;font-size:34px;font-weight:900}.mq-clock-answer>button,.mq-clock-choice button{min-height:64px;border:0;border-radius:16px;padding:14px 28px;background:#4f46e5;color:#fff;font-size:22px;font-weight:900}.mq-clock-choice{display:grid;grid-template-columns:repeat(2,minmax(120px,190px));justify-content:center;gap:16px;margin:22px auto}.mq-clock-choice button{width:100%}.mq-clock-answer+.mq-pair-keys{max-width:420px;margin:16px auto}.mq-clock-answer+.mq-pair-keys button{min-width:58px;min-height:54px;font-size:22px}@media(max-width:600px){.mq-clock-answer{gap:12px}.mq-clock-field{font-size:24px}.mq-clock-field input{width:76px;min-height:60px;font-size:31px}.mq-clock-answer>button{width:100%;font-size:20px}.mq-clock-choice{grid-template-columns:repeat(2,1fr)}}

/* v130 Q55: make the two triangular colour-board pieces readable to grade-1 learners. */
.mq-geometry-generic .mq-tile-outline,.mq-geometry-generic .mq-target-outline{fill:rgba(127,127,127,.04);stroke:#263248;stroke-width:4}
.mq-geometry-generic .mq-tile-seam{fill:none;stroke:#263248;stroke-width:4}
.mq-geometry-generic .mq-tile-piece{fill:rgba(127,127,127,.10);stroke:#263248;stroke-width:4}

/* v131: grade-3 scale must expose every 100g division clearly. */
.mq-scale .mq-scale-tick{stroke:#52677f;stroke-width:2.5}.mq-scale .mq-scale-needle{stroke:#263248;stroke-width:5;stroke-linecap:round}.mq-scale .mq-scale-hub{fill:#263248;stroke:none}

/* v135 Q299: large invisible vertex hit targets; do not cover the cuboid drawing. */
.mq-geometry-generic .mq-vertex-hit{fill:transparent;stroke:transparent;stroke-width:0;cursor:pointer;pointer-events:all}
.mq-geometry-generic .mq-vertex-hit:hover,.mq-geometry-generic .mq-vertex-hit:focus{fill:rgba(90,130,220,.16);stroke:rgba(90,130,220,.65);stroke-width:2;outline:none}
/* v142: coordinate questions use an explicit (x, y) entry UI; answer actions stay touch-sized. */
.mq-coordinate-answer{display:flex;align-items:flex-end;justify-content:center;gap:10px;flex-wrap:wrap;margin:18px auto}
.mq-coordinate-answer label{display:grid;gap:4px;text-align:center;font-weight:800}
.mq-coordinate-answer label small{font-size:15px}
.mq-coordinate-answer input{width:86px;min-height:64px;border:3px solid #263248;border-radius:14px;background:#fff;text-align:center;font-size:30px;font-weight:900}
.mq-coordinate-paren,.mq-coordinate-comma{font-size:42px;line-height:64px;font-weight:800}
.mq-coordinate-answer #mqCoordinateSubmit,.mq-answer #mqSubmit,.mq-pair-answer button,.mq-mixed-answer button,.mq-clock-answer button{min-width:132px;min-height:60px;padding:12px 20px;border-radius:16px;font-size:20px;font-weight:900}
.mq-coordinate-keys{display:grid;grid-template-columns:repeat(5,minmax(52px,1fr));gap:8px;max-width:420px;margin:0 auto 12px}
.mq-coordinate-keys button{min-height:52px;border-radius:12px;font-size:20px;font-weight:800}
/* v142: coordinate questions use an explicit (x, y) entry UI; answer actions stay touch-sized. */
.mq-coordinate-answer{display:flex;align-items:flex-end;justify-content:center;gap:10px;flex-wrap:wrap;margin:18px auto}
.mq-coordinate-answer label{display:grid;gap:4px;text-align:center;font-weight:800}.mq-coordinate-answer label small{font-size:15px}
.mq-coordinate-answer input{width:86px;min-height:64px;border:3px solid #263248;border-radius:14px;background:#fff;text-align:center;font-size:30px;font-weight:900}
.mq-coordinate-paren,.mq-coordinate-comma{font-size:42px;line-height:64px;font-weight:800}
.mq-coordinate-answer #mqCoordinateSubmit,.mq-answer #mqSubmit,.mq-pair-answer button,.mq-mixed-answer button,.mq-clock-answer button{min-width:132px;min-height:60px;padding:12px 20px;border-radius:16px;font-size:20px;font-weight:900}
.mq-coordinate-keys{display:grid;grid-template-columns:repeat(5,minmax(52px,1fr));gap:8px;max-width:420px;margin:0 auto 12px}.mq-coordinate-keys button{min-height:52px;border-radius:12px;font-size:20px;font-weight:800}
/* v147: graph-reading answers must have an obvious response target. */
.mq-read-graph-answer{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}
.mq-read-graph-answer .mq-answer-label{font-size:1.05rem;font-weight:800}
.mq-read-graph-answer #mqNumericSubmit{min-width:132px;min-height:54px;padding:10px 22px;border:0;border-radius:14px;font-size:1.05rem;font-weight:800;cursor:pointer}
/* v148: tree diagrams can be wider/taller than the standard visual card; scroll instead of crushing labels/branches. */
.mq-tree-scroll{max-width:100%;overflow:auto;padding:4px 0 10px}
.mq-tree-scroll .mq-visual-svg{min-width:520px}

/* v149: quadratic solution entry */
.mq-solution-hint{font-weight:700;text-align:center;margin:0 0 8px}.mq-quadratic-solutions #mqSubmit{min-height:52px;min-width:112px}

/* v158: equation solution UI keeps x = fixed and gives the learner one clear answer target. */
.mq-equation-entry{display:flex;align-items:center;justify-content:center;gap:12px;min-height:72px}.mq-equation-prefix{font-size:clamp(24px,5vw,34px);font-weight:900;white-space:nowrap}.mq-equation-entry .mq-math-display{min-width:120px;min-height:58px;margin:0}.mq-equation-solution>#mqSubmit{min-height:54px;min-width:132px;font-size:18px;font-weight:900}

.mq-tree-scroll .mq-tree-svg{max-height:none;height:auto;min-width:520px}
/* v172: coordinate/graph SVGs must never be vertically clamped independently of width.
   graphFrame() makes x/y one-unit lengths equal in the viewBox; preserving that aspect ratio
   in CSS is required for a mathematically square grid. */
.mq-visual-svg.mq-square-grid{max-height:none}
/* v193 audit corrections */
.mq-unit-cube polygon,.mq-unit-cube line{stroke-width:1.25!important}
.mq-scale .mq-scale-base{stroke:#52677f;stroke-width:3}.mq-scale .mq-scale-pointer{fill:#263248;stroke:none}

/* v194: audit fixes — expression entry must have an obvious visible target. */
.mq-math-entry-box{min-height:66px;border:3px solid #263248;border-radius:16px;background:#fff;padding:10px 14px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:8px 0}.mq-math-entry-box .mq-math-preview{min-width:90px;margin:0}.mq-quadratic-pair{max-width:620px;margin:16px auto}.mq-quadratic-fields{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}.mq-quadratic-fields label{font-size:24px;font-weight:900}.mq-quadratic-fields input{width:130px;min-height:58px;border:3px solid #263248;border-radius:14px;font-size:26px;text-align:center}.mq-quadratic-fields button{min-width:120px;min-height:58px;border-radius:14px;font-size:19px;font-weight:900}@media(max-width:620px){.mq-quadratic-fields{grid-template-columns:1fr 1fr}.mq-quadratic-fields button{grid-column:1/-1}}
.mq-common-visual path,.mq-common-visual polyline{fill:none}
.mq-geometry-generic .mq-plain-point{fill:currentColor!important;stroke:none!important}

/* v195: the 36-leaf tree is intentionally taller than ordinary figures; never crop it. */
.mq-tree-scroll{max-height:none!important;overflow:auto!important}
.mq-tree-scroll .mq-tree-svg{width:520px!important;max-width:none!important;max-height:none!important;height:760px!important}

/* v196: units are fixed labels beside the expression, never part of a fraction/root structure. */
.mq-math-entry-box .mq-fixed-unit{flex:0 0 auto;margin-left:10px;font-size:24px;font-weight:900;line-height:1}
.mq-math-entry-box .mq-math-preview{display:flex;align-items:center;justify-content:center;min-height:38px}

/* v200: units are fixed outside the MathJax expression; dedicated two-field answers stay visible. */
.mq-math-unit-row{display:flex;align-items:center;justify-content:center;gap:10px}.mq-math-unit-row .mq-math-entry-box{flex:1;margin:8px 0}.mq-answer-unit{font-size:26px;font-weight:900;white-space:nowrap}.mq-slope-intercept-answer{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end;max-width:620px;margin:16px auto}.mq-slope-intercept-answer label{font-size:22px;font-weight:900}.mq-slope-intercept-answer input{width:100%;min-height:58px;border:3px solid #263248;border-radius:14px;font-size:26px;text-align:center;box-sizing:border-box}.mq-slope-intercept-answer button{min-height:58px;min-width:120px;border-radius:14px;font-weight:900}@media(max-width:620px){.mq-slope-intercept-answer{grid-template-columns:1fr 1fr}.mq-slope-intercept-answer button{grid-column:1/-1}}
.mq-tree-scroll .mq-tree-svg{width:640px!important;height:860px!important;min-width:640px!important;overflow:visible!important}
/* v208 audit repairs */
.mq-construction-vertex{position:relative;max-width:720px;margin:0 auto;text-align:center}.mq-construction-vertex .mq-reference-figure{position:relative}.mq-construction-point{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;border:3px solid #263248;border-radius:50%;background:#fff;font-weight:900;font-size:18px;z-index:3}.mq-tile-split-reference{max-width:520px;margin:0 auto -28px}.mq-tile-split{max-width:620px}.mq-tile-piece{fill:#eef3f8;stroke:#263248;stroke-width:4}.mq-target-outline{fill:none!important;stroke:#263248;stroke-width:4}
.mq-construction-choice{cursor:pointer}.mq-construction-choice circle{fill:#fff;stroke:#263248;stroke-width:3}.mq-construction-choice .mq-choice-letter{font:900 17px system-ui,sans-serif;fill:#263248;pointer-events:none}
.mq-cube-array-side-closure{fill:none!important;stroke:#263248;stroke-width:3;stroke-linejoin:round}

/* v252: stage攻略を主導線にし、121ステージ一覧はトグル内へ。 */
.mq-progress-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px;margin:0 0 16px;border:1px solid #dfe5ee;border-radius:22px;background:#fff;box-shadow:0 8px 28px rgba(15,23,42,.06)}.mq-progress-card span{font-size:12px;font-weight:900;color:#6366f1;letter-spacing:.04em}.mq-progress-card h2{margin:4px 0 6px;font-size:24px}.mq-progress-card p{margin:0;color:#64748b;font-weight:700}.mq-progress-card>a{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:0 20px;border-radius:14px;background:#4f46e5;color:#fff;text-decoration:none;font-weight:900}.mq-stage-picker{border:1px solid #e2e8f0;border-radius:18px;background:#fff;overflow:hidden}.mq-stage-picker>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:17px 18px;cursor:pointer;font-weight:900;list-style:none}.mq-stage-picker>summary::-webkit-details-marker{display:none}.mq-stage-picker>summary:after{content:'▼';font-size:12px;color:#64748b}.mq-stage-picker[open]>summary:after{content:'▲'}.mq-stage-picker>summary small{margin-left:auto;color:#64748b;font-weight:700}.mq-stage-picker-body{padding:0 16px 18px}.mq-stage-grid a.is-progress{border-color:#a5b4fc}.mq-stage-grid a.is-complete{border-color:#86efac;background:#f0fdf4}.mq-stage-grid a.is-complete small{color:#15803d;font-weight:900}@media(max-width:640px){.mq-progress-card{align-items:stretch;flex-direction:column}.mq-progress-card>a{width:100%;box-sizing:border-box}.mq-stage-picker>summary{align-items:flex-start;flex-wrap:wrap}.mq-stage-picker>summary small{width:100%;margin-left:0}}
