.rwq{width:100%;min-width:0;color:var(--topic-ink,#17444a)}
.rwq-stage{position:relative;width:100%;height:clamp(190px,27dvh,270px);overflow:hidden;border-radius:12px;background:#f4f8f7}
.rwq-canvas,.rwq-canvas>div,.rwq-canvas>div>div{display:block!important;width:100%!important;height:100%!important;min-height:0!important}
.rwq-stage canvas{touch-action:none}
.rwq-tools{position:absolute;top:6px;right:6px;z-index:2;display:flex;gap:4px}
.rwq-tools button,.rwq-material button{min-height:44px;border:2px solid var(--topic-accent,#009bad);border-radius:10px;background:#fff;color:#17444a;font:inherit;font-weight:700}
.rwq-tools button{display:grid;place-items:center;width:44px;padding:8px}
.rwq-tools svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rwq-material{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.rwq-material button{padding:6px 12px}
.rwq-note{font-size:13px;line-height:1.35;margin-top:4px}
.rwq:not(:has(canvas)) :is(.rwq-material,.rwq-tools,.rwq-note){display:none}
.rwq [lang="en"]{display:none}html[lang="en"] .rwq [lang="en"]{display:inline}html[lang="en"] .rwq [lang="zh-Hant"]{display:none}
@media(max-height:700px){.rwq-stage{height:180px}}
/* The 3D layer augments the existing teaching model; the original remains the fallback. */
.rw-teaching-host{position:absolute;inset:0;width:100%;height:100%;z-index:2;display:flex;align-items:center;visibility:hidden;pointer-events:none}
.rw-teaching-host:has(canvas){visibility:visible;pointer-events:auto}
.chapter-model:has(.rw-teaching-host canvas)>:not(.rw-teaching-host){visibility:hidden}
.rw-teaching-scene{position:relative;width:100%;height:min(100%,270px);overflow:hidden}
.rw-teaching-canvas,.rw-teaching-canvas>div,.rw-teaching-canvas>div>div{display:block!important;width:100%!important;height:100%!important;min-height:0!important}
.rw-teaching-canvas canvas{touch-action:none}
.rw-teaching-reset{position:absolute;right:6px;top:6px;z-index:3;display:grid;place-items:center;width:44px;height:44px;padding:8px;border:2px solid var(--topic-accent,#009bad);border-radius:10px;background:#fff;color:#17444a}
.rw-teaching-reset svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rw-teaching-key{position:absolute;bottom:4px;left:5px;right:5px;display:flex;flex-wrap:wrap;justify-content:center;gap:3px 9px;background:#fffffff0;color:#24464a;border-radius:6px;padding:2px 4px;font-size:12px;line-height:1.3;pointer-events:none}
.rw-key-gravel{color:#111}.rw-key-sand{color:#765011}.rw-key-silt{color:#964b3e}.rw-key-solute{color:#565093}
.rw-teaching-scene [lang="en"]{display:none}html[lang="en"] .rw-teaching-scene [lang="en"]{display:inline}html[lang="en"] .rw-teaching-scene [lang="zh-Hant"]{display:none}
.rw-condensed-choices{display:flex;align-items:center;justify-content:center;gap:10px}
.rw-condensed-choices button[data-action="chapter-variant"]{display:none!important}
.rw-condensed-current{font-weight:700}.rw-condensed-next{min-height:44px;padding:6px 12px;border:2px solid var(--topic-accent,#009bad);border-radius:10px;background:#fff;color:#17444a;font:inherit;font-weight:700}
.rw-gravel-detail{position:absolute;top:8px;left:8px;display:flex;align-items:center;gap:3px;padding:4px 6px;border-radius:8px;background:#fffffff0;color:#34534e;font-size:13px;font-weight:700;line-height:1.2;pointer-events:none}.rw-gravel-detail svg{width:44px;height:44px;flex:none}
