.story-frame.template-004-active {
  background: var(--template-004-primary, #b9aedc);
}

.story-frame.template-004-active > .template-chrome {
  z-index: auto;
}

.story-frame.template-004-active > .template-text-host {
  z-index: 5;
}

.story-frame.template-004-active > img.template-004-product {
  position: absolute;
  z-index: 2;
  display: block;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.story-frame.template-004-active > img.template-004-product-top-left {
  top: -5%;
  left: -26%;
  width: 88%;
  height: 49%;
  object-position: center;
  transform: rotate(24deg);
  transform-origin: center;
}

.story-frame.template-004-active > img.template-004-product-bottom-right {
  right: -17%;
  bottom: -8%;
  left: auto;
  top: auto;
  width: 77%;
  height: 45%;
  object-position: center;
  transform: rotate(1deg);
  transform-origin: center;
}

.story-frame.template-004-active > img.template-004-product.is-product-editable {
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}

html.is-text-editing .story-frame.template-004-active > img.template-004-product.is-product-editable {
  pointer-events: none;
}

.story-frame.template-004-active > img.template-004-product-outline {
  pointer-events: none;
}

.story-frame.template-004-active > img.template-004-product-outline[hidden] {
  display: none;
}

.template-004-product-outline.is-white {
  filter: none;
}

.template-004-product-outline.is-black {
  filter: brightness(0);
}

.template-004-canvas {
  overflow: hidden;
}

.template-004-blob svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.story-frame.template-004-active [data-template-color-key] {
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}

.template-004-blob {
  z-index: 0;
}

.template-004-cta {
  z-index: 4;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(35, 21, 46, 0.18);
}

.template-004-product-menu {
  position: absolute;
  z-index: 9;
  top: 64px;
  left: 50%;
  display: grid;
  width: calc(100% - 24px);
  max-width: 350px;
  box-sizing: border-box;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: rgba(30, 29, 34, 0.9);
  color: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.template-004-product-menu[hidden] {
  display: none;
}

.template-004-product-menu > span {
  padding-inline: 3px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.template-004-product-menu button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.template-004-shadow-button {
  width: 100%;
}

.template-004-outline-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.template-004-outline-options button.is-active {
  border-color: #fff;
  background: #fff;
  color: #111;
}
