/* Desktop uses the same viewport-wide transparent layer as the wedge. */
body.sub-floating main { isolation: auto; z-index: auto; }
body.sub-floating main > .stage-smoke { z-index: 0; }
body.sub-floating > .sub-model-view {
  position: fixed !important; inset: 0 !important;
  width: 100vw !important; height: 100dvh !important;
  z-index: 20; overflow: visible !important;
  background: none !important; border: 0; box-shadow: none;
}
body.sub-floating > .sub-model-view.zoomed-forward { z-index: 36; }
body.sub-floating .header { position: relative; z-index: 50; }
body.sub-floating .sub-product-info { z-index: 35; }
body.sub-floating .sub-product > .point-heading { z-index: 30; pointer-events: none; }
body.sub-floating .page-breadcrumb { position: relative; z-index: 30; width: max-content; }
body.sub-floating footer { position: relative; z-index: 30; pointer-events: none; }
body.sub-floating footer a { pointer-events: auto; }
body.sub-floating > .sub-viewer-actions { position: fixed; inset: 0; z-index: 45; transform: none; pointer-events: none; }
body.sub-floating > .sub-viewer-actions button { pointer-events: auto; }
body.sub-floating #sub-mount-tripod { border-color: #e63848; }
body #subviewer-dialog > .header { z-index: 50 !important; }
/* Shared product information and control layout with the C12AW page. */
.sub-info-label, .sub-info-metrics, #sub-explore-features { display: none; }
.sub-product-info [hidden] { display: none !important; }
.sub-product-info #features-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.sub-product-info .wedge-chapter .sub-intro-expanded { display: block; }
.sub-product-info .wedge-chapter-nav button { width: auto; height: auto; }
@media(min-width:761px) {
  body:has(.sub-product) { height: 100svh; overflow: hidden; }
  .sub-product { display: block !important; }
  .sub-product > .point-heading { position: fixed; left: 5%; top: 110px; z-index: 2; padding: 0; }
  .sub-product > .point-heading h1 { font-size: clamp(32px,3.2vw,48px); }
  .sub-product > .point-heading .point-metrics { display: none; }
  .sub-product-info {
    position: fixed; z-index: 5; right: 5%; top: 150px; bottom: 130px; width: 43%;
    padding: 20px 24px; background: linear-gradient(110deg,#08090bd9,#08090bf5);
    display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow: auto;
  }
  .sub-product-info[hidden] { display: none !important; }
  .sub-product-info > .sub-info-label { display: block; margin: 0; }
  .sub-product-info > .sub-info-metrics { display: flex; margin: 0; }
  .sub-product-info .point-tabs { gap: 22px; flex-shrink: 0; }
  .sub-product-info .point-tabs button { font-size: 12px; }
  .sub-product-info .point-panel { flex: 1; min-height: 0; overflow: auto; }
  .sub-product .sub-3d-only {
    position: fixed !important; left: 0; top: 210px; bottom: 120px; width: 53%;
    height: auto !important; min-height: 0; margin: 0;
  }
  .sub-product .sub-3d-only .sub-model-view { inset: 0 !important; }
  .sub-info-hidden .sub-product .sub-3d-only { width: 100%; }
  .sub-product .sub-3d-only figcaption { position: fixed; left: 5%; bottom: 58px; right: auto; height: auto; font-size: 11px; }
  .sub-product .sub-3d-only figcaption > span:last-child { display: none; }
  .sub-product .sub-viewer-actions { position: static; }
  .sub-product .sub-viewer-actions button, #sub-explore-features, .sub-product #sub-open-model {
    position: fixed; z-index: 8; width: auto; min-height: 0; height: auto;
    padding: 8px 12px; border: 1px solid #51545c; background: #0e1013; color: #eee;
    font: 400 11px system-ui,sans-serif; white-space: nowrap; cursor: pointer;
  }
  .sub-product #sub-reset-model { right: calc(5% + 175px); top: auto; bottom: 84px; }
  .sub-product #sub-mount-tripod { left: auto; right: 5%; top: auto; bottom: 84px; transform: none; padding: 11px 18px; border-color: #e63848; font-size: 12px; }
  .sub-product #sub-open-model { left: 27%; right: auto; bottom: 12%; transform: translateX(-50%); padding: 8px 16px; font-size: 12px; }
  .sub-info-hidden #sub-open-model { left: 50%; }
  #sub-explore-features { display: block; left: 5%; bottom: 125px; }
}
@media(min-width:761px) and (max-height:800px) {
  .sub-product-info { top: 125px; bottom: 122px; gap: 12px; padding: 16px 20px; }
  .sub-product-info .wedge-chapter h2 { font-size: 24px; margin-bottom: 12px; }
  .sub-product-info .wedge-chapter p, .sub-product-info .wedge-chapter li { font-size: 12px; line-height: 1.45; }
}
@media(min-width:761px) and (max-height:500px) {
  .sub-product > .point-heading { top: 100px; }
  .sub-product-info { top: 100px; bottom: 75px; padding: 10px 14px; gap: 7px; }
  .sub-product-info > .sub-info-label, .sub-product-info > .sub-info-metrics { display: none; }
  .sub-product .sub-3d-only { top: 150px; bottom: 100px; }
  .sub-product #sub-reset-model, .sub-product #sub-mount-tripod { bottom: 45px; }
  #sub-explore-features { bottom: 85px; }
}
/* Text controls must not inherit the 44px thumbnail-arrow button width. */
.sub-product-visual .sub-viewer-actions {
  width: max-content;
  max-width: calc(100% - 20px);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sub-product-visual .sub-viewer-actions button {
  width: auto;
  height: auto;
  min-height: 44px;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.3;
  cursor: pointer;
}
/* Isolate 3D from the information panels while retaining the site's visual identity. */
body.subviewer-open {
  position: fixed;
  top: var(--subviewer-scroll, 0);
  left: 0;
  right: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
body.subviewer-open > :not(#subviewer-dialog) { visibility: hidden; }
body.subviewer-open .stage-smoke { display: none !important; }
#subviewer-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #eee;
  background: linear-gradient(90deg,#03040510,#03040585 32%,#030405a8 54%,#03040580 72%,#03040510),url('assets/hex-metal-desktop.webp') center/cover no-repeat #050607;
  overflow: hidden;
  overscroll-behavior: none;
  isolation: isolate;
}
#subviewer-dialog[open] { display: grid; grid-template-rows: auto auto minmax(0,1fr); }
#subviewer-dialog > .header { grid-row: 1; min-height: 76px; z-index: 0 !important; }
.subviewer-page-context { grid-row: 2; min-width: 0; position: relative; z-index: 0; }
#subviewer-dialog .point-heading { padding: 10px 5% 0; margin: 0; }
#subviewer-dialog .point-heading h1 { margin: 0; }
#subviewer-dialog .point-metrics { margin-top: 10px; }
#subviewer-dialog::backdrop { background: #08090b; }
.subviewer-toolbar {
  position: absolute;
  inset: auto auto calc(14px + env(safe-area-inset-bottom, 0px)) 18px;
  height: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
  background: transparent;
}
.subviewer-toolbar button,
#subviewer-dialog .sub-viewer-actions button {
  width: auto;
  min-height: 44px;
  height: auto;
  border: 1px solid #4a4d55;
  padding: 10px 14px;
  color: #eee;
  background: #101114;
  font: 500 12px system-ui, sans-serif;
  cursor: pointer;
}
#subviewer-dialog .sub-3d-only {
  display: block !important;
  position: absolute !important;
  grid-area: auto !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  z-index: 1 !important;
}
#subviewer-dialog .sub-model-view {
  position: absolute !important;
  inset: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  pointer-events: auto !important;
  touch-action: none !important;
  z-index: 0 !important;
}
#subviewer-dialog canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none !important;
  pointer-events: auto !important;
}
#subviewer-dialog figcaption,
#subviewer-dialog #sub-open-model { display: none !important; }
#subviewer-dialog .sub-viewer-actions {
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  position: absolute !important;
  inset: auto 18px calc(14px + env(safe-area-inset-bottom, 0px)) auto !important;
  z-index: 2;
  pointer-events: none;
}
#subviewer-dialog .sub-viewer-actions button { pointer-events: auto; }
#sub-mount-tripod { order: -1; }
.tripod-prompt {
  position: fixed;
  inset: 0;
  width: min(360px,calc(100vw - 36px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 24px;
  border: 1px solid #74323b;
  background: #101114;
  color: #eee;
  box-shadow: 0 20px 80px #000b;
  overflow: auto;
}
.tripod-prompt::backdrop { background: #0009; }
.tripod-prompt h2 { margin: 0 0 12px; font-size: 27px; line-height: 1.1; }
.tripod-prompt p { margin: 0; color: #c0c3ca; font-size: 14px; line-height: 1.5; }
.tripod-choices { display: grid; gap: 10px; margin-top: 22px; }
.tripod-prompt .tripod-choices button {
  width: 100%; height: auto; min-height: 46px; padding: 10px 12px;
  border: 1px solid #52545c; background: #1b1d22; color: #eee; font: 500 13px system-ui,sans-serif;
}
.tripod-prompt .tripod-choices .tripod-choice-primary { border-color: #e53b4b; background: #3a1820; }
.tripod-caption {
  position: absolute; left: 18px; right: 18px; bottom: 130px;
  z-index: 1; pointer-events: none; text-align: center;
  color: #fff; font: 700 clamp(18px,5vw,28px) system-ui,sans-serif;
  text-shadow: 0 2px 12px #000,0 0 24px #000;
}
#sub-open-model {
  position: absolute;
  width: auto;
  height: auto;
  right: 10px;
  bottom: 52px;
  z-index: 1;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #4a4d55;
  background: #101114;
  color: #eee;
  font-size: 12px;
}
@media(max-width:760px) {
  #sub-open-model { bottom: 0; right: 0; }
  #subviewer-dialog {
    background-image: linear-gradient(90deg,#03040535,#030405ab 35%,#030405b5 65%,#03040535),url('assets/hex-metal-mobile.webp');
    background-size: auto,auto 100%;
    background-position: center,left center;
  }
  #subviewer-dialog > .header { min-height: 60px; }
  #subviewer-dialog .point-heading { padding-top: 8px; }
  #subviewer-dialog .point-heading h1 { font-size: clamp(34px,9vw,46px); line-height: .98; }
  #subviewer-dialog .point-heading .eyebrow { margin-bottom: 5px; }
  #subviewer-dialog .point-metrics { margin-top: 10px; gap: 20px; }
  #subviewer-dialog .point-metrics strong { font-size: 20px; }
  #subviewer-dialog .point-metrics > span { font-size: 7px; }
}
