/* Canvas occupies the enlarged SVG layout slot; controls own a separate row. */
.lock-study>.lock-machine{visibility:hidden}
.lock3d-poster{position:absolute;inset:0;display:block;pointer-events:none}
.lock3d-poster picture{display:block;width:100%;height:100%}
.lock3d-poster img{display:block;width:100%;height:100%;object-fit:contain}
.lock3d-poster .lock3d-poster-dark{display:none}
html[data-theme=dark] .lock3d-poster .lock3d-poster-light{display:none}
html[data-theme=dark] .lock3d-poster .lock3d-poster-dark{display:block}
.lock3d-ready>.lock3d-poster{display:none}
.lock3d-host { position:relative; min-width:0; padding-bottom:56px; }
.lock3d-host > .lock-machine { height:min(768.4px,calc(110svh - 234.8px)); max-height:768.4px; width:calc(110% + 4.4vw - 1.6px); margin-left:calc(-5% - 1.5vw + .8px); }
.lock3d-canvas { position:absolute; display:block; opacity:0; visibility:hidden; pointer-events:none; background:transparent; touch-action:pan-y pinch-zoom; cursor:grab; }
.lock3d-ready > .lock3d-canvas { opacity:1; visibility:visible; pointer-events:auto; }
.lock3d-ready > .lock-machine { opacity:0; }
.lock3d-canvas:active { cursor:grabbing; }
.lock3d-canvas:focus-visible { outline:2px solid var(--accent,#654283); outline-offset:-3px; border-radius:8px; }
.lock3d-controls { position:absolute; z-index:2; bottom:64px; height:44px; inset-inline:0; width:max-content; max-width:100%; margin-inline:auto; padding-inline:10px; border-radius:24px; background:var(--paper,#fcfafc); display:none; align-items:center; justify-content:center; gap:14px; font:12px/1.3 Helvetica,Arial,sans-serif; color:var(--muted,#66596f); pointer-events:none; }
.lock3d-ready > .lock3d-controls { display:flex; }
.lock3d-controls button { pointer-events:auto; width:44px; height:44px; min-width:44px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:50%; border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.lock3d-controls button:hover { background:color-mix(in srgb,currentColor 10%,transparent); }
.lock3d-controls button svg { display:block; pointer-events:none; }
.lock3d-controls button:focus-visible { outline:2px solid var(--accent,#654283); outline-offset:-2px; }
@media (min-width:761px) and (max-height:720px) {
  .lock3d-host > .lock-machine { height:calc(110svh - 215px); }
}
@media (min-width:761px) and (max-width:1000px) {
  .lock3d-host > .lock-machine { height:482.4px; max-height:482.4px; }
}
@media (max-width:760px) {
  .home-story .lock3d-host > .lock-machine, .lock3d-host > .lock-machine { height:min(482.4px,calc(127.6vw - 1.6px)); max-height:482.4px; width:100vw; margin-left:-6vw; }
  .lock3d-controls { gap:10px; font-size:12px; }
}
@media (min-width:761px) and (orientation:landscape) and (max-height:500px) {
  .lock3d-host > .lock-machine { height:clamp(200px,calc(100svh - 135px),365px); }
}
@media print { .lock3d-host > .lock-machine { opacity:1; } .lock3d-canvas,.lock3d-controls { display:none!important; } }

/* Rotation reveals a contextual action near the active canvas. */
.lock3d-host{padding-bottom:0}
.lock3d-host>.lock3d-controls{position:absolute;display:flex;top:8px;bottom:auto;inset-inline:auto 10px;margin:0;width:max-content;height:44px;padding:0;background:var(--paper);border:1px solid var(--line);font-size:16px;pointer-events:auto}
.lock3d-controls[hidden]{display:none!important}
.lock3d-controls button{width:auto;min-width:44px;padding-inline:12px;gap:6px;border-radius:24px;color:var(--accent)}
.lock3d-instruction{position:absolute;z-index:1;display:none;height:44px;align-items:center;color:var(--muted);font:16px/1.5 Helvetica,Arial,sans-serif;pointer-events:none;white-space:nowrap}
.home-story .lock3d-ready>.lock3d-instruction{display:inline-flex;margin:0}
.lock3d-instruction[hidden]{display:none!important}
/* Wide layouts keep guidance in the text column after the canvas in focus order. */
.practice-story__pin>.lock3d-controls{position:absolute;z-index:3;bottom:auto;inset-inline:auto;margin:0;width:max-content;height:44px;padding:0;background:var(--paper);border:1px solid var(--line);font-size:16px;pointer-events:auto}
.practice-story__pin:has(.lock3d-ready)>.lock3d-controls{display:flex}
.practice-story__pin:has(.lock3d-ready)>.lock3d-instruction{display:inline-flex;z-index:3}
.lock3d-host:not(.lock3d-ready)>.lock3d-controls{display:none}
@media(max-width:760px){.home-story+#home-services{padding-top:44px}}
@media(orientation:landscape) and (min-width:560px) and (max-height:430px){
 .home-story .lock3d-host>.lock-machine{width:100%;height:clamp(200px,calc(100svh - 135px),295px);max-height:295px;margin-left:0}
}

/* A model-sized input surface owns rotation; surrounding page space owns scrolling. */
.lock3d-ready>.lock3d-canvas{pointer-events:none}
.lock3d-touch-surface{position:absolute;z-index:2;display:none;touch-action:none;touch-action:pinch-zoom;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}
.lock3d-ready>.lock3d-touch-surface{display:block}
.lock3d-touch-surface:active{cursor:grabbing}
.lock3d-compact>.lock-machine{position:absolute;left:0;top:0}
@media(max-width:760px),(orientation:landscape) and (max-width:1100px) and (max-height:500px){
 .home-story .lock-scroll-cue{flex-direction:row;align-items:center;flex-wrap:nowrap;gap:12px}
 .home-story:has(.lock3d-ready) .lock-scroll-cue>.lock3d-instruction{position:static;display:inline-flex;height:44px;font-size:14px;margin:0;white-space:nowrap}
 .home-story .lock-scroll-cue>.lock3d-controls{position:static;display:none;width:max-content;height:44px;margin:0;padding:0;border:1px solid var(--line);border-radius:24px;background:var(--paper);font:14px/1.3 Helvetica,Arial,sans-serif;pointer-events:auto;flex-shrink:0}
 .home-story:has(.lock3d-ready) .lock-scroll-cue>.lock3d-controls{display:inline-flex}
 .home-story .lock-scroll-cue>.lock3d-controls button{font-size:14px}
}
@media(max-width:760px) and (orientation:portrait){
 /* A stable full-screen introduction keeps the next section for the offers reveal. */
 .home-story{min-height:calc(100vh - 90px + 16px);min-height:calc(100lvh - 90px + 16px)}
 .home-story .practice-story__visual{padding-block:16px 32px}
 /* Reserve the compact rest pose before the WebGL module arrives. */
 .home-story .lock-study{height:min(284px,calc(68.4vw + 16px))}
 .home-story .lock-study>.lock-machine{position:absolute;left:0;top:0}
 .home-story .lock3d-poster{padding-block:18px}
}
@media print{.lock3d-touch-surface{display:none!important}}
html[data-lock-gesture=rotate]{overflow-anchor:none;scroll-behavior:auto}
@media(max-width:760px) and (orientation:portrait){
 .home-story:has(.lock3d-compact){height:auto}
 .lock3d-compact>.lock3d-canvas:focus-visible{outline:0}
 .lock3d-compact:has(>.lock3d-canvas:focus-visible)>.lock3d-touch-surface{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
}
@media(orientation:landscape) and (max-width:640px) and (max-height:430px){
 .home-story .lock-scroll-cue{gap:8px}
 .home-story .lock-scroll-instruction{flex-shrink:0;white-space:nowrap}
 .home-story:has(.lock3d-ready) .lock-scroll-cue>.lock3d-instruction{font-size:13px}
}
