/* Interactive 3D stage layout. Kept in its own file so a strict style-src 'self' policy still applies it. */
.replay3d{margin:1.5rem 0;padding:1rem;border:1px solid #ccd6ca;border-radius:10px;background:#fff;color:#18302c;max-width:100%;overflow:hidden}
.replay3d-title{margin:0 0 .4rem;font-size:1.1rem;line-height:1.3}
.replay3d-intro,.replay3d-readout,.replay3d-note{margin:.5rem 0;font-size:.95rem;line-height:1.5}
.replay3d-canvas{display:block;width:100%;aspect-ratio:2/1;min-height:220px;max-height:360px;border-radius:8px;background:#FAF8F4;touch-action:none;cursor:grab}
.replay3d-canvas:focus-visible{outline:3px solid #1a8c80;outline-offset:2px}
.replay3d-controls{display:flex;flex-wrap:wrap;gap:.6rem 1.2rem;align-items:center;margin:.7rem 0}
.replay3d-controls label{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;font-size:.95rem}
.replay3d-controls input[type=range]{width:min(220px,60vw)}
.replay3d-controls button,.replay3d-controls select{font:inherit;font-size:.95rem;padding:.3rem .7rem;min-height:44px}
.replay3d-readout{font-weight:600}
.replay3d-legend{display:flex;flex-wrap:wrap;gap:.3rem 1.2rem;list-style:none;padding:0;margin:.4rem 0;font-size:.9rem}
.replay3d-legend li{display:flex;gap:.4rem;align-items:center}
.replay3d-swatch{display:inline-block;width:14px;height:14px;border-radius:3px;flex:none}
.replay3d-gold{background:#db9e29}.replay3d-teal{background:#1a8c80}.replay3d-ink{background:#17302b}.replay3d-pale{background:#c7ccc2}
.replay3d-green{background:#2f8a4a}.replay3d-red{background:#b83333}.replay3d-blue{background:#2f62b8}.replay3d-grey{background:#8a8f88}
.replay3d-note{color:#4a5a55}
/* Wide reader figures scroll inside their frame instead of widening the page on a phone. */
figure{max-width:100%;overflow-x:auto}
/* On a course overview page the primer and stage span both grid columns. */
.overview-body>.start-here,.overview-body>.replay3d{grid-column:1/-1}
