/* Scale a fixed design coordinate system into both preview and storefront. */
.hd-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #28605b;
}
.hd-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 600px;
  transform-origin: 0 0;
  overflow: hidden;
}
.hd-layer {
  position: absolute;
  transform-origin: center;
}
.hd-layer-face {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.hd-canvas .hd-layer img {
  display: block;
  position: static;
  width: 100%;
  height: 100%;
  max-height: none;
  max-width: none;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
}
.hd-text {
  height: 100%;
  width: 100%;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hd-text-inset {
  height: 100%;
  width: 50%;
  shape-margin: 3px;
}
.hd-inset-left {
  float: left;
}
.hd-inset-right {
  float: right;
}
.hd-no-photo {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 20px;
  color: #243c37;
}
.hero-art.hd-live {
  display: block;
  padding: 0;
  min-width: 0;
  background: #28605b;
}
.hd-live .hd-viewport {
  width: 100%;
}
.hd-playback {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #123a37eb;
  color: white;
  border-radius: 30px;
  padding: 5px 10px;
  font-size: 12px;
}
.hd-playback:empty {
  display: none;
}
.hd-playback button {
  padding: 5px 9px;
  background: transparent;
  color: white;
  border-color: #ffffff55;
  border-radius: 20px;
  min-width: 32px;
  min-height: 32px;
}
.hd-no-active {
  height: 100%;
  background: #28605b;
}
.hd-toolbar,
.hd-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.hd-toolbar {
  padding: 14px 0;
  border-block: 1px solid var(--line);
}
.hd-toolbar button {
  font-size: 13px;
  padding: 10px 12px;
}
#hdstatus {
  margin: 12px 0 4px;
  font-size: 13px;
  color: #396258;
}
#hderror {
  color: #a12525;
}
#hderror:empty {
  display: none;
}
.hd-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
.hd-artboard {
  min-width: 0;
  position: sticky;
  top: 16px;
}
.hd-artboard-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  font-size: 13px;
}
.hd-artboard-heading span {
  color: var(--muted);
}
.hd-edit-stage {
  border: 1px solid #678f82;
  box-shadow: 0 10px 35px #16342b20;
  touch-action: none;
}
.hd-edit-stage .hd-layer {
  cursor: grab;
  outline: 1px dashed transparent;
}
.hd-edit-stage .hd-layer:hover {
  outline-color: #f6d46c;
}
.hd-edit-stage .hd-layer.hd-selected {
  outline: 2px solid #f7cd57;
  outline-offset: 2px;
}
.hd-edit-stage .hd-layer:focus-visible {
  outline: 3px solid #f7cd57;
}
.hd-resize {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 16px;
  height: 16px;
  min-width: 0;
  padding: 0;
  border: 2px solid #172d27;
  border-radius: 2px;
  background: #f7cd57;
  cursor: nwse-resize;
  z-index: 100;
}
.hd-controls {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.hd-panel {
  border: 1px solid #d5dfd8;
  background: white;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.hd-panel summary {
  padding: 15px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  background: #f0f5f1;
}
.hd-panel-body {
  padding: 0 14px 16px;
}
.hd-panel input:not([type='checkbox']),
.hd-panel select {
  width: 100%;
  font-size: 14px;
  padding: 8px;
}
.hd-panel input[type='color'] {
  height: 38px;
  padding: 3px;
}
.hd-panel input[type='range'] {
  padding: 8px 0;
}
.hd-panel button {
  font-size: 12px;
  padding: 8px 10px;
}
.hd-panel label {
  font-size: 12px;
}
.hd-panel .muted {
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0;
}
.hd-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}
.hd-fields label {
  min-width: 0;
}
.hd-buttons {
  margin-top: 12px;
}
.hd-slide-list,
.hd-layer-list {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  max-height: 240px;
  overflow: auto;
}
.hd-slide-list button,
.hd-layer-list button {
  text-align: left;
  overflow-wrap: anywhere;
}
.hd-slide-list small {
  display: block;
  color: #60776b;
  font-size: 11px;
  margin-top: 3px;
}
.hd-panel .selected {
  background: #e1eee5;
  border-color: #356758;
}
.hd-upload input {
  margin-top: 6px;
}
.hd-rich-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
}
.hd-rich-tools label {
  flex: 1 1 65px;
  font-size: 11px;
  margin: 6px 0;
}
#hdrich {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 130px;
  max-height: 300px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #91aca0;
  border-radius: 5px;
  line-height: 1.4;
  margin: 10px 0;
}
#hdrich span {
  font-size: inherit;
}
.hd-hint {
  font-size: 13px;
  padding: 18px;
  color: #657268;
}
.hd-photo-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.hd-photo-picker button {
  padding: 8px;
  text-align: left;
  font-size: 12px;
}
.hd-photo-picker img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.hd-photo-picker span {
  display: block;
  margin-top: 8px;
}
.hd-preview-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
}
.hd-preview-controls label {
  margin: 0;
}
#hdpreviewlabel {
  font-size: 13px;
}
.hd-busy .hd-artboard {
  pointer-events: none;
  opacity: 0.7;
}
.hd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (max-width: 1150px) {
  .hd-editor {
    grid-template-columns: 1fr;
  }
  .hd-artboard {
    position: static;
    max-width: 600px;
    width: 100%;
  }
  .hd-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
  .hd-panel {
    margin-bottom: 0;
  }
  .hd-hint {
    grid-column: 1/-1;
  }
}
@media (max-width: 650px) {
  .hd-controls {
    display: block;
  }
  .hd-panel {
    margin-bottom: 10px;
  }
  .hd-editor {
    gap: 12px;
  }
  .hd-toolbar {
    gap: 6px;
  }
  .hd-toolbar button {
    font-size: 12px;
  }
  .hd-photo-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hd-playback {
    bottom: 8px;
    right: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hd-canvas {
    animation: none !important;
    transition: none !important;
  }
}

