.p3d-viewer {
  position: relative;
  margin-bottom: 2em;
}
.p3d-viewer canvas {
  display: block;
  width: 100%;
  height: 450px;
  max-height: 65vh;
  background: #edf1f4;
  border-radius: 12px;
  touch-action: none;
  cursor: grab;
}
.p3d-viewer canvas:focus {
  outline: 3px solid #237caa;
}
.p3d-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font: 13px system-ui;
}
.p3d-toolbar button {
  cursor: pointer;
  padding: 8px 12px;
}
.p3d-status {
  font-size: 13px;
}
.p3d-fallback img {
  max-width: 100%;
  height: auto;
}

.p3d-viewer [hidden] {
  display: none !important;
}
.p3d-viewer canvas {
  background: linear-gradient(#e7ebef, #fafbfc);
}
.p3d-navigation {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 138px;
  text-align: center;
  font: 11px system-ui;
  z-index: 2;
}
.p3d-navigation svg {
  display: block;
  width: 138px;
  height: 138px;
  overflow: visible;
}
.p3d-navigation polygon {
  fill: #f5f7f9;
  stroke: #9daab7;
  stroke-width: 0.65;
  cursor: pointer;
}
.p3d-navigation polygon:hover,
.p3d-navigation polygon:focus {
  fill: #91d5ed;
  stroke: #176793;
  outline: none;
  stroke-width: 2;
}
.p3d-navigation text {
  font: bold 8px system-ui;
  fill: #344453;
  pointer-events: none;
}
.p3d-navigation button,
.p3d-tools button {
  border: 1px solid #a6b2bc;
  background: #f8fafc;
  color: #253746;
  border-radius: 5px;
  padding: 7px 12px;
  cursor: pointer;
  font: 13px system-ui;
}
.p3d-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
}
.p3d-tools button[aria-pressed="true"] {
  background: #246b91;
  border-color: #246b91;
  color: white;
}
.p3d-tools label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font: 13px system-ui;
}
.p3d-tools input[type="color"] {
  width: 38px;
  height: 32px;
  padding: 2px;
  border: 1px solid #a6b2bc;
  background: white;
  cursor: pointer;
}
.p3d-toolbar {
  flex-wrap: wrap;
}
.p3d-navigation button:focus-visible,
.p3d-tools button:focus-visible {
  outline: 3px solid #237caa;
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .p3d-navigation,
  .p3d-navigation svg {
    width: 112px;
  }
  .p3d-navigation svg {
    height: 112px;
  }
}

.p3d-media [hidden] {
  display: none !important;
}
.p3d-media-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}
.p3d-media-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 68px;
  height: 68px;
  padding: 3px;
  border: 2px solid #cad1d7;
  border-radius: 6px;
  background: #fff;
  color: #253746;
  cursor: pointer;
  font: 600 13px system-ui;
}
.p3d-media-choice[aria-pressed="true"] {
  border-color: #246b91;
  box-shadow: 0 0 0 1px #246b91;
}
.p3d-media-choice:focus-visible {
  outline: 3px solid #237caa;
  outline-offset: 3px;
}
.p3d-media-choice img {
  display: block !important;
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: contain;
}
.p3d-photo {
  margin: 0;
  text-align: center;
}
.p3d-photo > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65vh;
  min-height: 250px;
  object-fit: contain;
  background: #f6f8fa;
  border-radius: 12px;
}
.p3d-photo figcaption {
  font: 13px system-ui;
  padding: 10px;
}
.p3d-media .p3d-viewer {
  margin-bottom: 0;
}

.p3d-tools select { max-width: 200px; padding: 7px 10px; border: 1px solid #bbc6d4; border-radius: 6px; font: 13px system-ui; background: white; color: #253746; }

.p3d-loading-poster { position:absolute;top:0;left:0;right:0;height:450px;max-height:65vh;border-radius:12px;background:#edf1f4;pointer-events:none;overflow:hidden; }.p3d-loading-poster img { width:100%;height:100%;object-fit:contain; }

@media (pointer:coarse) { .p3d-tools button,.p3d-toolbar button,.p3d-home { min-width:44px;min-height:44px; }.p3d-tools select { min-height:44px; } }
