html[data-embed] {
  --paper: #fff;
  --ink: #19221d;
  --muted: #647067;
  --line: #e2e7e3;
  /* Match --shadow-content-card in the portfolio. */
  --viewer-card-shadow:
    0 1px 3px -1px rgb(20 27 23 / 9%),
    0 8px 18px -10px rgb(20 27 23 / 19%);
  background: transparent;
}
html[data-embed] body {
  margin: 0;
  background: transparent;
  font-family: LiteratureSans, Arial, sans-serif;
}
html[data-embed] main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 16px 32px;
}
html[data-embed] .masthead,
html[data-embed] .intro-row,
html[data-embed] #motion,
html[data-embed] footer {
  display: none !important;
}
html[data-embed] .view-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 12px 0 18px;
  gap: 12px;
}
html[data-embed] .view-tabs button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  padding: 9px 12px;
}
html[data-embed] .view-tabs button span {
  display: none;
}
html[data-embed] .view-tabs button[aria-pressed="true"] {
  font-weight: 600;
}
html[data-embed] .view-toolbar {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 0;
}
html[data-embed] .view-toolbar p {
  font-size: 12px;
}
html[data-embed] .view-actions select,
html[data-embed] .view-actions button {
  font-family: inherit;
  font-size: 12px;
  border-radius: 6px;
}
html[data-embed] .stage,
html[data-embed] .stage.split {
  width: 100%;
  height: clamp(420px, 36vw, 580px);
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}
html[data-embed] .info-card {
  max-width: 1080px;
  margin: 25px auto 0;
  padding: 22px 24px;
  border-radius: 10px;
  border: 0;
  box-shadow: var(--viewer-card-shadow);
  background: #f4f6f3;
  font-size: 14px;
  line-height: 20px;
}
html[data-embed] .info-card h2,
html[data-embed] .pane-title {
  font-family: LiteratureSans, Arial, sans-serif;
  font-weight: 600;
}
html[data-embed] .info-card h2 {
  font-size: 24px;
  line-height: 28px;
}
html[data-embed] .key-row,
html[data-embed] .ambient-note,
html[data-embed] .stage-hint {
  display: none;
}
html[data-embed] .renderer-status {
  font-size: 11px;
}
html[data-embed] .comparison-controls {
  font-family: inherit;
  font-size: 12px;
}
@media (min-width: 800px) and (pointer: fine) {
  .viewer-frame {
    padding: 12px;
    border-radius: 10px;
    background: #f2f3f2;
    box-shadow: var(--viewer-card-shadow);
  }
  html[data-embed] .viewer-frame .stage {
    background: transparent;
  }
}
@media (max-width: 650px) {
  html[data-embed] .view-tabs {
    gap: 3px;
    justify-content: flex-start;
  }
  html[data-embed] .view-tabs button {
    font-size: 12px;
    padding: 9px 10px;
  }
  html[data-embed] .view-toolbar,
  html[data-embed] .view-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  html[data-embed] .stage {
    height: 380px;
  }
  html[data-embed] .info-card {
    padding: 20px;
  }
}

.mobile-scene-toggle {
  display: none;
}

html[data-embed] .pane-title {
  font-size: clamp(15px, 1.8vw, 20px);
}
@media (min-width: 701px) {
  html[data-embed] .stage.split.triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 360px;
  }
}
@media (max-width: 700px) {
  /* Match the three rows instead of squeezing three canvases into two rows. */
  html[data-embed] .stage.split {
    height: 760px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  html[data-embed] .stage.split.triple {
    height: 1140px;
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
  html[data-embed] .pane {
    overflow: hidden;
    isolation: isolate;
  }
  html[data-embed] .pane:not([data-mobile-interactive="true"]) canvas {
    pointer-events: none;
    touch-action: pan-y;
  }
  html[data-embed] .canvas-host {
    touch-action: pan-y;
  }
  html[data-embed] .pane[data-mobile-interactive="true"] .canvas-host {
    touch-action: none;
  }
  html[data-embed] .pane:has(canvas) > .mobile-scene-toggle {
    display: block;
    position: absolute;
    top: 50px;
    right: 12px;
    z-index: 10;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #edf0ed;
    color: var(--ink);
    font:
      12px LiteratureSans,
      Arial,
      sans-serif;
    touch-action: pan-y;
  }
  html[data-embed] .mobile-scene-toggle[aria-pressed="true"] {
    background: #19221d;
    color: white;
  }
}

@media (min-width: 480px) {
  html[data-embed][data-phone-landscape] .stage.split {
    height: 400px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
  }
  html[data-embed][data-phone-landscape] .stage.split.triple {
    height: 400px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
  }
  html[data-embed][data-phone-landscape] .pane {
    overflow: hidden;
  }
}

html[data-embed][data-phone-landscape] .pane:not([data-mobile-interactive="true"]) canvas {
  pointer-events: none;
  touch-action: pan-y;
}
html[data-embed][data-phone-landscape] .pane:has(canvas) > .mobile-scene-toggle {
  display: block;
  position: absolute;
  top: 52px;
  right: 8px;
  z-index: 10;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: #edf0ed;
  color: var(--ink);
  font:
    12px LiteratureSans,
    Arial,
    sans-serif;
}
html[data-embed][data-phone-landscape] .mobile-scene-toggle[aria-pressed="true"] {
  background: #19221d;
  color: white;
}
