/* Owner176d: place component viewpoints above the main camera controls.
   Owner20261007: give the desktop gauge/play group clearance from the menu toggle.
   The original Door/Walls icons retain their positions.
   Owner176e adds quiet push/pull captions around the unchanged range track. */
:root[data-variant="a"] .pov-anchor { position: relative; min-inline-size: 0; }
:root[data-variant="a"] .pov-anchor #views { max-inline-size: 100%; }
:root[data-variant="a"] .door-controls {
  position: absolute; inset: auto;
  inset-inline: 0; inset-block-end: calc(100% + 2px); margin-inline: auto;
  width: max-content; inline-size: max-content; max-inline-size: calc(100vw - 32px);
  align-items: center; flex-wrap: nowrap; gap: 10px;
}
:root[data-variant="a"] .door-gauge {
  position: fixed; inset: auto;
  inset-block-start: calc(var(--safe-t) + 116px); inset-inline-start: calc(var(--atelier) + 16px);
  --gauge-height: clamp(96px, calc(100dvh - var(--sheet) - 280px), 160px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
:root[data-variant="a"] .door-controls .swing {
  position: relative; inset: auto;
  width: 44px; height: calc(var(--gauge-height) + 48px);
  min-block-size: 0; padding: 24px 0; border-radius: 24px;
  justify-content: center; flex: none;
}
/* Owner 2026-10-18/19: the door and lock buttons show their names. Desktop: one-line pills of one width, opening
   from the gauge's edge toward the stage, each glyph in a round well concentric with the pill's end cap, so the wells
   sit on the gauge's track. Phone: the 44 px column stays (names on two lines, no glyphs): the lock shares its row
   with the component chips. A moving door reads stop; a paused one splits into continue opening (on top, the
   gauge's push end) and continue closing. */
.swing-action, #lock-mech { inline-size: var(--door-pill, 44px); border-radius: 22px; color: var(--control-ink177);
  background: var(--control-surface177); border: 1px solid rgb(255 255 255 / .62);
  box-shadow: var(--control-shadow177); backdrop-filter: blur(12px) saturate(.85); }
.swing-action span, #lock-mech span { font-size: 13px; font-weight: 500; line-height: 16px; white-space: nowrap; }
.swing-action button, #lock-mech { display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  padding-block: 0; padding-inline: 5px 12px; font: inherit; cursor: pointer; }
.swing-action svg, #lock-mech svg { flex: none; box-sizing: border-box; inline-size: 32px; block-size: 32px; padding: 8px;
  border-radius: 50%; background: rgb(41 42 41 / .06); transition: background-color .2s ease, color .2s ease; }
.swing-action svg { fill: currentColor; }
#lock-mech svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#lock-mech { block-size: 44px; transition: background-color .2s ease, color .2s ease; }
#lock-mech:hover { background: #fff; }
#lock-mech:focus-visible { outline: 2px solid var(--control-ink177); outline-offset: 2px; }
#lock-mech:disabled { opacity: .42; cursor: default; }
#lock-mech[aria-pressed="true"], .swing-action[data-open="true"]:not([data-state="paused"]) { color: #fff;
  background: var(--accent); border-color: var(--accent); }
#lock-mech[aria-pressed="true"] svg, .swing-action[data-open="true"]:not([data-state="paused"]) svg {
  color: var(--accent); background: #fff; }
.swing-action { display: flex; flex-direction: column; block-size: 44px; overflow: hidden;
  transition: block-size .24s ease, background-color .2s ease, color .2s ease; }
.swing-action[data-state="paused"] { display: grid; grid-auto-rows: 1fr; row-gap: 4px; block-size: 92px; overflow: visible;
  border-width: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.swing-action:has(#swing-play:disabled) { opacity: .42; }
.swing-action button { flex: 1 0 0; min-block-size: 0; border: 0; color: inherit; background: transparent; }
.swing-action button:disabled { cursor: default; }
.swing-action:is([data-open="false"], [data-state="paused"]) button:hover { background: #fff; }
.swing-action button:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; border-radius: 20px; }
.swing-action .pause, .swing-action[data-state="moving"] .play { display: none; }
.swing-action[data-state="moving"] .pause { display: inline; }
.swing-action [data-resume], .swing-action[data-state="paused"] #swing-play { display: none; }
.swing-action[data-state="paused"] [data-resume] { display: flex; border-radius: 22px;
  background: var(--control-surface177); border: 1px solid rgb(255 255 255 / .62);
  box-shadow: var(--control-shadow177); backdrop-filter: blur(12px) saturate(.85); animation: swing-resume-in .24s ease both; }
@keyframes swing-resume-in { from { opacity: 0; } to { opacity: 1; } }
#cylinder-closeups { position: absolute; inset-inline-start: calc(44px + 4px);
  inset-block-start: 0; block-size: calc(var(--gauge-height) + 36px);
  display: flex; flex-direction: column; justify-content: space-between; }
#cylinder-closeups[hidden] { display: none; }
#cylinder-closeups button { display: grid; place-items: center; inline-size: 44px; block-size: 44px;
  padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
#cylinder-closeups i { inline-size: 10px; block-size: 2px; border-radius: 1px;
  background: var(--control-muted177); border: 0;
  box-shadow: 0 1px 4px rgb(28 25 21 / .12); }
#cylinder-closeups button:hover i { background: var(--control-ink177); }
#cylinder-closeups button[aria-pressed="true"] i { background: var(--accent); border-color: var(--accent); }
#cylinder-closeups button:focus-visible { outline: 2px solid var(--control-ink177); outline-offset: -6px; }
:root[data-variant="a"] .door-controls .swing input {
  writing-mode: vertical-lr; direction: rtl;
  width: 44px; height: var(--gauge-height); inline-size: var(--gauge-height); block-size: 44px;
  min-inline-size: 0; min-block-size: 44px; flex: none; touch-action: none; border-radius: 24px;
}
:root[data-variant="a"] .swing input::-webkit-slider-runnable-track {
  width: 3px; height: 100%;
  background: linear-gradient(to top, var(--accent) var(--p, 0%), rgba(255,255,255,.28) var(--p, 0%));
}
:root[data-variant="a"] .swing input::-webkit-slider-thumb { margin-top: 0; margin-left: -7.5px; }
:root[data-variant="a"] .swing input::-moz-range-track { width: 3px; height: 100%; }
:root[data-variant="a"] .swing input::-moz-range-progress { width: 3px; }
:root[data-variant="a"] .component-dock { flex: none; align-self: flex-start; }
.gauge-direction176 {
  position: absolute; inset-inline: 0; color: #fff;
  font-size: 11px; font-weight: 500; line-height: 16px; text-align: center;
  pointer-events: none; user-select: none; animation: gauge-direction-in176 .2s ease-out both;
}
.gauge-direction176-push { inset-block-start: 6px; }
.gauge-direction176-pull { inset-block-end: 6px; }
@keyframes gauge-direction-in176 { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 721px) and (orientation: landscape), (min-width: 1025px) {
  :root[data-variant="a"] .door-gauge {
    /* The collapse toggle extends22px into the stage; keep18px between hit areas. */
    inset-inline-start: calc(var(--atelier) + 40px);
    --door-pill: 140px; /* the continue-opening pill with its well, the widest */
  }
}
@media (max-width: 720px), (max-width: 1024px) and (orientation: portrait) {
  :root[data-variant="a"] .door-gauge {
    inset-block-start: auto; inset-block-end: calc(var(--sheet) + 66px - var(--vv-gap, 0px));
  }
  :root[data-variant="a"] .pov-anchor { max-inline-size: calc(100% - 108px); }
  .swing-action span, #lock-mech span { inline-size: min-content; font-size: 11px; line-height: 13px;
    white-space: normal; text-align: center; }
  .swing-action button, #lock-mech { padding: 0; justify-content: center; }
  .swing-action svg, #lock-mech svg { display: none; }
}
@media (max-height: 600px) and (orientation: landscape) {
  :root[data-variant="a"] .door-gauge {
    inset-block-start: calc(var(--safe-t) + 100px); --gauge-height: 96px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gauge-direction176 { animation: none; }
  .swing-action, #lock-mech, .swing-action svg, #lock-mech svg { transition: none; }
  .swing-action[data-state="paused"] [data-resume] { animation: none; }
}

@media (min-width: 721px) and (orientation: landscape), (min-width: 1025px) {
  @container stage (max-width: 760px) {
    :root[data-variant="a"] .pov-anchor { max-inline-size: calc(100% - 88px); }
  }
}
@media (max-width: 389px) {
  :root[data-variant="a"] .pov-anchor { max-inline-size: 100%; }
}
