/* R6: labels are a reversible viewing choice. Existing model geometry stays intact. */
.r6-number-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:6px 12px;background:#f6f8fb;border-bottom:1px solid #dce3ec;flex:0 0 auto;min-width:0}
.r6-label-toggle{display:inline-flex;align-items:center;justify-content:space-between;gap:14px;min-height:44px;min-width:142px;padding:8px 12px;border:1px solid #b9cadc;border-radius:7px;background:#fff;color:#203d58;font:600 13px/1.35 system-ui,"Microsoft YaHei",sans-serif;cursor:pointer;touch-action:manipulation}
.r6-label-toggle span{font-size:11px;font-weight:500;color:#52667a;white-space:nowrap}
.r6-label-toggle[aria-pressed="true"]{background:#244f72;border-color:#244f72;color:#fff}
.r6-label-toggle[aria-pressed="true"] span{color:#eff7ff}
.r6-label-toggle:focus-visible{outline:3px solid #e4b34d;outline-offset:2px}

@media(max-width:900px){
 .scene-experience .r6-number-toolbar{justify-content:flex-start;padding:6px 8px;scroll-margin-top:64px}
 .scene-experience .r6-label-toggle{min-height:44px;min-width:156px;font-size:14px}
 .lesson-main{overflow-x:clip}
 .lesson-heading h1{font-size:22px;line-height:1.45}
 .lesson-heading .lesson-summary:not(.expanded){-webkit-line-clamp:2}
 .lesson-heading .summary-toggle{min-height:40px}
 .scene-experience .stage .uav-viewer{height:clamp(350px,54svh,520px);min-height:350px}
 .scene-experience .view-controls{grid-template-columns:repeat(4,minmax(0,1fr))}
 .scene-experience .view-controls button:nth-last-child(-n+2){grid-column:span 2}
 .scene-experience .toggle-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
 .scene-experience .toggle-controls button{min-height:44px}
 .scene-experience .mechanism-tools button,.scene-experience .workshop-view-tools button{min-height:44px;touch-action:manipulation}
 .scene-experience .disassembly-head select,.lesson-scenes .scene-switch select{font-size:16px;max-width:100%;min-height:46px}
 .scene-experience{scroll-margin-top:64px}
}
@media(max-width:900px) and (max-height:500px) and (orientation:landscape){
 /* Keep the short landscape screen for the model. The two viewing controls
    share one overlay strip; no repeated model heading pushes the canvas down. */
 .mobile-studybar{height:44px;min-height:44px;padding:0 8px;gap:5px}
 .mobile-studybar button{height:44px;min-height:44px;padding:5px 8px;font-size:12px}
 /* The mode chooser remains available in portrait. In this short landscape
    view, direct model QR links stay focused on their chosen learning mode. */
 .experience-tabs{display:none}
 .scene-experience{scroll-margin-top:48px}
 .scene-experience .lab-top{display:none}
 .scene-experience .stage{position:relative;isolation:isolate}
 .scene-experience .stage .uav-viewer{height:calc(100svh - 100px);min-height:220px}
 .scene-experience .r6-number-toolbar{position:absolute;top:6px;left:8px;z-index:12;width:158px;min-height:44px;padding:0;background:transparent;border:0}
 .scene-experience .r6-label-toggle{height:44px;min-height:44px;min-width:0;width:100%;padding:6px 9px;font-size:12px;gap:8px;background:#fffffff2;backdrop-filter:blur(6px)}
 .scene-experience .r6-label-toggle[aria-pressed="true"]{background:#244f72}
 .scene-experience .view-controls{position:absolute;top:6px;left:174px;right:8px;z-index:12;display:flex;flex-wrap:nowrap;overflow-x:auto;gap:4px;padding:0;background:transparent;border:0;scrollbar-width:thin}
 .scene-experience .view-controls button{height:44px;min-height:44px;min-width:52px;flex:1 0 auto;padding:6px 8px;font-size:12px;white-space:nowrap;background:#fffffff2;backdrop-filter:blur(6px)}
 .scene-experience .uav-viewer .viewer-status{top:auto;bottom:9px;max-width:60%;font-size:10px;padding:4px 7px}
 .scene-experience .uav-viewer .viewer-settings-toggle{top:58px;min-height:44px;padding:6px 9px;font-size:11px}
 .scene-experience .uav-viewer .viewer-modebar{top:106px}
}
