@font-face {
  font-family: "Manrope";
  src: url("./fonts/ManropeLatin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

body.pennantCustomer {
  --ink: #ffffff;
  --muted: #9b9b9b;
  --line: #313131;
  --panel: #1f1f1f;
  --page: #181818;
  --accent: #313131;
  color-scheme: dark;
  color: var(--ink);
  background: var(--page);
  font-family: "Manrope", "Microsoft YaHei", sans-serif;
}

/* The public pennant route uses the shared renderer but exposes only its customer editor. */
.pennantCustomer .brand,
.pennantCustomer #manualFields,
.pennantCustomer #localExportsActions,
.pennantCustomer .exportsBox,
.pennantCustomer #hint {
  display: none !important;
}

.pennantCustomer button,
.pennantCustomer input,
.pennantCustomer select,
.pennantCustomer textarea {
  font-family: inherit;
}

.pennantCustomer main.app {
  gap: 24px;
  padding: 24px;
}

.pennantCustomer .panel.controls {
  border: 0;
  border-radius: 16px;
  background: #1f1f1f;
}

.pennantCustomer .previewToolbar {
  color: #9b9b9b;
  font-size: 14px;
}

.pennantCustomer .preview {
  border: 1px solid #313131;
  border-radius: 8px;
  background: #ffffff;
}

.pennantCustomer .pennantFrameWarn {
  border-radius: 8px;
  background: #d92d20;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}

#designPanel {
  gap: 16px;
}

#designPanel .dpSection {
  border: 0;
  border-radius: 12px;
  background: #272727;
  padding: 16px;
  color: #ffffff;
}

#designPanel .dpTitle {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

#designPanel .dpTitle .dpHint,
#designPanel .dpSmallHint,
#designPanel .dpSaveHint,
#designPanel .dpDraftStatus,
#designPanel .dpProductBar .dpSub,
#designPanel .dpConfirmSummary dt {
  color: #9b9b9b;
}

#designPanel .dpSmallHint,
#designPanel .dpSaveHint,
#designPanel .dpDraftStatus {
  font-size: 12px;
  line-height: 16px;
}

#designPanel .dpProductBar {
  margin-bottom: 0;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: #272727;
}

#designPanel .dpProductBar .dpName {
  color: #ffffff;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
}

#designPanel .dpLineInput,
#designPanel .dpSelect,
#designPanel input[type="text"],
#designPanel input[type="number"],
#designPanel textarea {
  border: 1px solid #313131;
  border-radius: 8px;
  background: #313131;
  color: #ffffff;
  font-size: 16px;
}

#designPanel input::placeholder,
#designPanel textarea::placeholder {
  color: #9b9b9b;
  opacity: 1;
}

#designPanel .dpSliderHead {
  color: #ffffff;
  font-size: 14px;
  line-height: 20px;
}

#designPanel .dpSliderHead .dpVal {
  color: #ffffff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#designPanel input[type="range"] {
  accent-color: #9b9b9b;
}

#designPanel .dpDesignBtn,
#designPanel .dpMiniBtn,
#designPanel .dpThreadButton,
#designPanel .dpOrnamentAdd,
#designPanel .dpCopyBtn,
#designPanel .dpDialogBtn,
.pennantCustomer .dpPreviewToggle {
  border: 1px solid #313131;
  border-radius: 8px;
  background: #313131;
  color: #ffffff;
  font-family: inherit;
  font-weight: 500;
}

body.pennantCustomer .previewToolbar .dpPreviewToggle {
  border: 1px solid #313131;
  border-radius: 8px;
  background: #313131;
  color: #ffffff;
  box-shadow: none;
}

#designPanel .dpDesignBtn {
  min-height: 52px;
  font-size: 14px;
}

#designPanel .dpDesignBtn.isActive,
#designPanel .dpThreadButton.isActive {
  border-color: #ffffff;
  background: #313131;
  color: #ffffff;
  font-weight: 600;
}

#designPanel .dpDesignBtn.isActive .dpDesignSub {
  color: #9b9b9b;
}

#designPanel .dpLineTag {
  border-color: #313131;
  border-radius: 8px;
  background: #313131;
  color: #ffffff;
}

#designPanel .dpLineTag.isActive {
  border-color: #ffffff;
  background: #313131;
  color: #ffffff;
}

#designPanel .dpColorBtn {
  min-height: 48px;
  color: #ffffff;
}

#designPanel .dpColorBtn.isActive {
  border: 2px solid #ffffff;
  background: #313131;
  color: #ffffff;
}

#designPanel .dpCustomerEssentials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

#designPanel .dpCustomerEssentials > .dpSection {
  min-width: 0;
  box-sizing: border-box;
}

#designPanel .dpCustomerEssentials .dpTitle {
  align-items: flex-start;
  flex-wrap: wrap;
}

#designPanel .dpCustomerEssentials .dpTitle .dpHint {
  min-width: 0;
  text-align: right;
}

#designPanel .dpCustomerEssentials .dpLine {
  gap: 8px;
}

#designPanel .dpCustomerEssentials .dpLineInput,
#designPanel .dpCustomerEssentials .dpSelect {
  min-width: 0;
  box-sizing: border-box;
}

#designPanel .dpSwatch {
  border-color: #9b9b9b;
  box-shadow: none;
}

#designPanel .dpThreadGrid {
  gap: 8px;
}

#designPanel .dpThreadButton {
  min-height: 52px;
  gap: 4px;
}

#designPanel .dpOrnamentNoneRow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

#designPanel .dpOrnamentNone {
  grid-column: 2;
}

#designPanel .dpOrnamentNone svg {
  width: 30px;
  height: 30px;
  display: block;
}

#designPanel .dpOrnamentList {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

#designPanel .dpOrnamentCard {
  min-width: 0;
  padding: 8px;
  border: 1px solid #313131;
  border-radius: 10px;
  background: #272727;
}

#designPanel .dpOrnamentCard.isSelected {
  border-color: #9b9b9b;
  box-shadow: none;
}

#designPanel .dpOrnamentHeader {
  gap: 4px;
  margin-bottom: 4px;
}

#designPanel .dpOrnamentSelect,
#designPanel .dpOrnamentDelete {
  min-height: 32px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  line-height: 16px;
}

#designPanel .dpOrnamentSelect {
  flex: 1 1 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#designPanel .dpOrnamentDelete {
  background: #313131;
}

#designPanel .dpOrnamentCard .dpSlider {
  gap: 3px;
  margin-bottom: 4px;
}

#designPanel .dpOrnamentCard .dpSlider:last-child {
  margin-bottom: 0;
}

#designPanel .dpOrnamentCard .dpSliderHead {
  font-size: 12px;
  line-height: 16px;
}

#designPanel .dpCharacterError,
#designPanel .dpTextHint.isWarn {
  border: 1px solid #313131;
  border-radius: 8px;
  background: #313131;
  color: #ffffff;
  font-size: 14px;
  line-height: 20px;
}

#designPanel .dpConfirmSummary,
#designPanel .dpConfirmSummary dd,
#designPanel .dpDialogText,
#designPanel .dpDialogTitle {
  color: #ffffff;
}

#designPanel .dpDialog {
  border-radius: 16px;
  background: #1f1f1f;
  color: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

#designPanel .dpDialogPreview,
#designPanel .dpDialogText {
  border-color: #313131;
  background: #272727;
}

#designPanel .dpSaveBtn {
  border-radius: 8px;
  background: #ffffff;
  color: #000000;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
}

#designPanel .dpSaveBtn:disabled {
  background: #313131;
  color: #9b9b9b;
}

#designPanel button,
#designPanel input,
#designPanel select,
.pennantCustomer .dpPreviewToggle {
  transition:
    background-color 300ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 300ms cubic-bezier(0.22, 1, 0.36, 1),
    color 300ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 300ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

#designPanel button:hover:not(:disabled),
.pennantCustomer .dpPreviewToggle:hover {
  transform: translateY(-2px);
}

#designPanel button:active:not(:disabled),
.pennantCustomer .dpPreviewToggle:active {
  transform: translateY(1px);
}

#designPanel button:focus-visible,
#designPanel input:focus-visible,
#designPanel select:focus-visible,
.pennantCustomer .dpPreviewToggle:focus-visible {
  outline: 2px solid #9b9b9b;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .pennantCustomer main.app {
    padding: 0;
  }

  .pennantCustomer main.app section.panel.controls {
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: #1f1f1f;
  }

  .pennantCustomer main.app section.previewWrap {
    background: #181818;
  }

  .pennantCustomer main.app section.previewWrap {
    height: 46dvh;
  }

  .pennantCustomer main.app.previewExpanded section.previewWrap {
    height: 85dvh;
  }

  .pennantCustomer main.app.previewExpanded section.panel.controls {
    max-height: 15dvh;
  }

  .pennantCustomer #designPanel .dpExport {
    background: #1f1f1f;
  }

  .pennantCustomer .dpPreviewToggle {
    min-height: 40px;
    padding: 0 12px;
  }
}

#designPanel .dpOrnamentAdd img {
  filter: brightness(0) invert(1);
}

.pennantOrnamentEntrance {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  #designPanel button,
  #designPanel input,
  #designPanel select,
  .pennantCustomer .dpPreviewToggle {
    transition: none;
  }
}
