:root {
  --skw-fpd-bar-height: 54px;
  --skw-fpd-mobile-vh: 100dvh;
  --skw-fpd-green: #0f8f78;
  --skw-fpd-dark: #17232d;
  --skw-fpd-stage-zoom: 1.70;
  --skw-fpd-stage-pan-x: 0px;
  --skw-fpd-stage-pan-y: 0px;
}

@media (max-width: 9999px) {
  html.skw-fpd-mobile-active,
  body.skw-fpd-mobile-active {
    height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body.skw-fpd-mobile-active {
    position: fixed;
    right: 0;
    left: 0;
    width: 100%;
  }

  #skw-fpd-mobile-bar {
    position: fixed;
    z-index: 2147483646;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    height: calc(var(--skw-fpd-bar-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 10px 0;
    box-sizing: border-box;
    color: #fff;
    background: var(--skw-fpd-dark);
    box-shadow: 0 1px 10px rgb(0 0 0 / 20%);
    font-family: inherit;
  }

  #skw-fpd-mobile-bar strong {
    overflow: hidden;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #skw-fpd-mobile-bar button {
    min-height: 40px;
    margin: 0;
    border: 0;
    border-radius: 9px;
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
  }

  #skw-fpd-mobile-bar .skw-fpd-mobile-back {
    color: #fff;
    background: rgb(255 255 255 / 12%);
  }

  #skw-fpd-mobile-bar .skw-fpd-mobile-done {
    color: #fff;
    background: var(--skw-fpd-green);
  }

  #skw-fpd-mobile-reopen {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0 0 14px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    color: #fff;
    background: var(--skw-fpd-green);
    font: inherit;
    font-weight: 700;
  }

  #skw-fpd-mobile-reopen[hidden] {
    display: none !important;
  }

  body.skw-fpd-size-prompt-open {
    overflow: hidden !important;
  }

  #skw-fpd-size-prompt {
    position: fixed;
    z-index: 2147483647;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: rgb(8 17 24 / 58%);
    backdrop-filter: blur(3px);
  }

  .skw-fpd-size-prompt-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    border-radius: 20px;
    padding: 27px 20px 20px;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 18px 55px rgb(0 0 0 / 28%);
    text-align: center;
  }

  .skw-fpd-size-prompt-panel > strong {
    display: block;
    padding: 0 28px;
    color: var(--skw-fpd-dark);
    font-size: 20px;
    line-height: 1.25;
  }

  .skw-fpd-size-prompt-panel > p {
    margin: 12px 0 20px;
    color: #526273;
    font-size: 15px;
    line-height: 1.45;
  }

  .skw-fpd-size-prompt-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    padding: 0;
    color: #667482;
    background: transparent;
    font: inherit;
    font-size: 31px;
    line-height: 1;
  }

  .skw-fpd-size-prompt-actions {
    display: grid;
    gap: 10px;
  }

  .skw-fpd-size-prompt-actions button {
    width: 100%;
    min-height: 52px;
    margin: 0;
    border-radius: 10px;
    padding: 12px 16px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    touch-action: manipulation;
  }

  .skw-fpd-size-prompt-more {
    border: 0;
    color: #fff;
    background: var(--skw-fpd-green);
  }

  .skw-fpd-size-prompt-cart {
    border: 1px solid #cdd5dc;
    color: var(--skw-fpd-dark);
    background: #fff;
  }

  #skw-fpd-size-hint {
    margin: 10px 0;
    border: 1px solid rgb(15 143 120 / 34%);
    border-radius: 10px;
    padding: 11px 13px;
    color: #135f53;
    background: #effaf7;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
  }

  #skw-fpd-cart-error {
    margin: 10px 0 14px;
    border: 1px solid #d9a4a4;
    border-radius: 10px;
    padding: 11px 13px;
    color: #842929;
    background: #fff2f2;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
  }

  .skw-fpd-size-choice-highlight {
    border-radius: 10px;
    outline: 3px solid rgb(15 143 120 / 36%);
    outline-offset: 5px;
    animation: skw-fpd-size-pulse 1.2s ease-in-out 2;
  }

  @keyframes skw-fpd-size-pulse {
    50% {
      outline-color: rgb(15 143 120 / 80%);
    }
  }

  #skw-fpd-mobile-zoom {
    position: fixed;
    z-index: 2147483630;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: 44px 62px 44px;
    height: 46px;
    border: 1px solid rgb(0 0 0 / 8%);
    border-radius: 12px;
    overflow: hidden;
    background: rgb(255 255 255 / 95%);
    box-shadow: 0 5px 18px rgb(0 0 0 / 16%);
    backdrop-filter: blur(10px);
  }

  #skw-fpd-mobile-zoom.skw-fpd-zoom-with-pan {
    grid-template-columns: 44px 62px 44px 44px;
  }

  #skw-fpd-mobile-zoom[hidden] {
    display: none !important;
  }

  #skw-fpd-mobile-zoom button {
    min-width: 0;
    min-height: 44px;
    margin: 0;
    border: 0;
    border-right: 1px solid rgb(0 0 0 / 8%);
    border-radius: 0;
    padding: 0;
    color: #111;
    background: transparent;
    font: inherit;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    touch-action: manipulation;
  }

  #skw-fpd-mobile-zoom button:last-child {
    border-right: 0;
  }

  #skw-fpd-mobile-zoom .skw-fpd-zoom-value {
    font-size: 12px;
    font-weight: 700;
  }

  #skw-fpd-mobile-zoom button:disabled {
    opacity: 0.28;
  }

  #skw-fpd-mobile-zoom .skw-fpd-pan-active {
    color: #fff;
    background: var(--skw-fpd-green);
  }

  body.skw-fpd-mobile-active .fpd-product-designer-wrapper {
    position: fixed !important;
    z-index: 2147483600 !important;
    top: calc(var(--skw-fpd-bar-height) + env(safe-area-inset-top)) !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    display: block !important;
    width: 100vw !important;
    max-width: none !important;
    height: calc(var(--skw-fpd-mobile-vh) - var(--skw-fpd-bar-height) - env(safe-area-inset-top)) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f4f5f6;
  }

  body.skw-fpd-mobile-active .fpd-product-designer-wrapper > .fpd-container.fpd-wrapper {
    display: flex !important;
    flex-flow: column nowrap !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-actions-bar {
    order: 1 !important;
    flex: 0 0 46px !important;
    min-height: 46px !important;
    padding: 3px 8px !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-actions-bar .fpd-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 8px !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-actions-bar [data-action="info"] {
    display: none !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-actions-bar .fpd-label,
  body.skw-fpd-mobile-active .fpd-wrapper > fpd-actions-bar .fpd-btn > span {
    display: none !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper {
    order: 2 !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper .fpd-product-stage {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    touch-action: none;
  }

  /*
   * The configured FPD view is 1000 x 600, while the actual product artwork
   * occupies the central square. Zooming the complete Fabric stage makes that
   * useful square fill a portrait phone without changing print coordinates.
   */
  body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper .fpd-view-stage {
    transform: translate3d(
      var(--skw-fpd-stage-pan-x),
      var(--skw-fpd-stage-pan-y),
      0
    ) scale(var(--skw-fpd-stage-zoom)) !important;
    transform-origin: center center !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar {
    position: static !important;
    z-index: 50 !important;
    order: 3 !important;
    display: block !important;
    flex: 0 0 calc(66px + env(safe-area-inset-bottom)) !important;
    width: 100% !important;
    height: calc(66px + env(safe-area-inset-bottom)) !important;
    min-height: 0 !important;
    padding: 0 0 env(safe-area-inset-bottom) !important;
    overflow: hidden !important;
    background: #fff;
    box-shadow: 0 -2px 12px rgb(0 0 0 / 9%);
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar > .fpd-navigation {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100% !important;
    height: 66px !important;
    min-height: 66px !important;
    overflow: visible !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0 !important;
    min-height: 58px;
    margin: 4px !important;
    border-radius: 10px;
    padding: 5px 8px !important;
    font-size: 13px;
    line-height: 1.1;
    touch-action: manipulation;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-icon {
    height: auto !important;
    margin: 0 0 3px !important;
    padding: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-label {
    display: block !important;
    overflow: hidden;
    max-width: 100%;
    font-size: 13px !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.skw-fpd-mobile-active .fpd-container fpd-views-nav {
    right: 10px !important;
    bottom: 12px !important;
    gap: 2px !important;
    min-height: 46px !important;
    max-width: none !important;
    border: 1px solid rgb(0 0 0 / 8%);
    border-radius: 12px !important;
  }

  body.skw-fpd-mobile-active .fpd-container fpd-views-nav > .fpd-view-next,
  body.skw-fpd-mobile-active .fpd-container fpd-views-nav > .fpd-view-prev {
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
  }

  body.skw-fpd-mobile-active .fpd-container fpd-views-nav > .fpd-show-views-grid {
    min-width: 58px;
    min-height: 44px;
  }

  body.skw-fpd-mobile-active .fpd-container fpd-views-nav > .fpd-show-views-grid::after {
    content: 'Seite';
    margin-left: 5px;
    color: #4b5560;
    font-size: 11px;
  }

  body.skw-fpd-mobile-active .fpd-draggable-dialog.fpd-show {
    z-index: 2147483645 !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: min(62dvh, 560px) !important;
    border-radius: 18px 18px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -10px 35px rgb(0 0 0 / 24%) !important;
  }

  body.skw-fpd-mobile-active .fpd-draggable-dialog > .fpd-dialog-head {
    min-height: 50px !important;
    cursor: default !important;
  }

  body.skw-fpd-mobile-active .fpd-draggable-dialog > .fpd-dialog-head > .fpd-close-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-height: 48px;
    padding: 0 !important;
  }

  body.skw-fpd-mobile-active .fpd-draggable-dialog textarea,
  body.skw-fpd-mobile-active .fpd-draggable-dialog input,
  body.skw-fpd-mobile-active fpd-element-toolbar textarea,
  body.skw-fpd-mobile-active fpd-element-toolbar input {
    font-size: 16px !important;
  }

  body.skw-fpd-mobile-active .fpd-draggable-dialog .fpd-add-text textarea {
    min-height: 112px;
    padding: 14px !important;
  }

  body.skw-fpd-mobile-active .fpd-draggable-dialog .fpd-add-text .fpd-btn,
  body.skw-fpd-mobile-active .fpd-draggable-dialog .fpd-upload-image .fpd-btn {
    min-height: 48px;
    padding: 13px 16px !important;
    font-size: 15px;
  }

  body.skw-fpd-mobile-active .fpd-draggable-dialog .fpd-module-tabs > [data-context="instagram"],
  body.skw-fpd-mobile-active .fpd-draggable-dialog .fpd-module-tabs > [data-context="qr-code"] {
    display: none !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart {
    z-index: 2147483644 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    max-height: min(45dvh, 390px) !important;
    border-radius: 16px 16px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    overflow: visible !important;
    box-shadow: 0 -8px 28px rgb(0 0 0 / 20%) !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart.fpd-panel-visible > .fpd-close-sub-panel {
    z-index: 5 !important;
    top: 10px !important;
    right: 10px !important;
    display: flex !important;
    min-width: 92px !important;
    min-height: 42px !important;
    border-radius: 9px !important;
    padding: 0 12px !important;
    transform: none !important;
    color: #fff !important;
    background: var(--skw-fpd-dark) !important;
    box-shadow: 0 2px 8px rgb(0 0 0 / 18%) !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart.fpd-panel-visible > .fpd-sub-panel {
    min-height: 190px;
    border-radius: 16px 16px 0 0;
    padding-top: 60px;
    overflow: hidden !important;
    background: #fff;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart.fpd-panel-visible .fpd-panel-font-family {
    min-height: 0;
    padding-top: 0 !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tools-nav,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-secondary-tools {
    scrollbar-width: none;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tools-nav::-webkit-scrollbar,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-secondary-tools::-webkit-scrollbar {
    display: none;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > div,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-secondary-tools > div {
    min-width: 68px;
    min-height: 58px;
    touch-action: manipulation;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-advanced-editing,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-remove-bg,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-reset,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-position,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-duplicate,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-remove {
    display: none !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-sub-panel {
    max-height: min(38dvh, 320px);
    overflow: auto;
    overscroll-behavior: contain;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-panel-font-family .fpd-scroll-area {
    max-height: min(30dvh, 250px) !important;
    overflow-y: auto !important;
  }

  body.skw-fpd-mobile-active .fpd-modal-internal > .fpd-modal-inner {
    width: calc(100% - 20px) !important;
    max-width: 520px !important;
    max-height: calc(var(--skw-fpd-mobile-vh) - 24px) !important;
    border-radius: 16px !important;
  }
}

/* Desktop-specific refinements for the shared full-screen editor. */
@media (min-width: 768px) {
  /*
   * FPD's smart toolbar carries a phone-oriented horizontal translation.
   * Reset it on desktop and present the controls as a compact centered card.
   */
  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart {
    top: auto !important;
    right: 20px !important;
    bottom: 78px !important;
    left: 20px !important;
    width: auto !important;
    max-width: 920px !important;
    min-height: 0 !important;
    max-height: min(330px, calc(100dvh - 190px)) !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    padding-bottom: 0 !important;
    transform: none !important;
    overflow: visible !important;
    box-shadow: 0 10px 34px rgb(0 0 0 / 22%) !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart > .fpd-close {
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    transform: none !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart > .fpd-tools-nav {
    position: static !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 84px !important;
    max-height: 190px !important;
    padding: 10px 58px 10px 14px !important;
    box-sizing: border-box !important;
    transform: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  /*
   * Once a primary tool is opened, FPD switches to its sub-panel. Keep the
   * compact tool row from covering the color, font and font-size controls.
   */
  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart.fpd-panel-visible > .fpd-tools-nav {
    display: none !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart.fpd-panel-visible > .fpd-sub-panel {
    display: flex !important;
    width: 100% !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-secondary-tools {
    position: static !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: stretch !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    overflow: visible !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > div,
  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-secondary-tools > div {
    flex: 0 0 96px !important;
    min-width: 88px !important;
    min-height: 64px !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart.fpd-panel-visible > .fpd-sub-panel {
    min-height: 0 !important;
    max-height: min(280px, calc(100dvh - 230px)) !important;
    border-radius: 16px !important;
    padding: 58px 18px 16px !important;
    box-sizing: border-box !important;
    overflow: auto !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart.fpd-panel-visible > .fpd-close-sub-panel {
    top: 8px !important;
    right: 58px !important;
  }

  body.skw-fpd-mobile-active fpd-element-toolbar .fpd-panel-font-family .fpd-scroll-area {
    max-height: 190px !important;
  }

  html.skw-fpd-pan-mode body.skw-fpd-mobile-active .fpd-product-stage {
    cursor: grab !important;
  }

  html.skw-fpd-panning body.skw-fpd-mobile-active .fpd-product-stage {
    cursor: grabbing !important;
  }

  body.skw-fpd-size-prompt-open {
    overflow: hidden !important;
  }

  #skw-fpd-size-prompt {
    position: fixed;
    z-index: 2147483647;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgb(8 17 24 / 54%);
    backdrop-filter: blur(3px);
  }

  .skw-fpd-size-prompt-panel {
    position: relative;
    width: min(520px, 100%);
    border-radius: 20px;
    padding: 34px 34px 30px;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 22px 70px rgb(0 0 0 / 30%);
    text-align: center;
  }

  .skw-fpd-size-prompt-panel > strong {
    display: block;
    padding: 0 30px;
    color: var(--skw-fpd-dark);
    font-size: 24px;
    line-height: 1.25;
  }

  .skw-fpd-size-prompt-panel > p {
    margin: 14px 0 24px;
    color: #526273;
    font-size: 16px;
    line-height: 1.5;
  }

  .skw-fpd-size-prompt-close {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    padding: 0;
    color: #667482;
    background: transparent;
    font: inherit;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
  }

  .skw-fpd-size-prompt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .skw-fpd-size-prompt-actions button {
    min-height: 54px;
    margin: 0;
    border-radius: 10px;
    padding: 12px 16px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
  }

  .skw-fpd-size-prompt-more {
    border: 0;
    color: #fff;
    background: var(--skw-fpd-green);
  }

  .skw-fpd-size-prompt-cart {
    border: 1px solid #cdd5dc;
    color: var(--skw-fpd-dark);
    background: #fff;
  }

  #skw-fpd-size-hint {
    margin: 10px 0 14px;
    border: 1px solid rgb(15 143 120 / 34%);
    border-radius: 10px;
    padding: 12px 14px;
    color: #135f53;
    background: #effaf7;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
  }

  #skw-fpd-cart-error {
    margin: 10px 0 14px;
    border: 1px solid #d9a4a4;
    border-radius: 10px;
    padding: 12px 14px;
    color: #842929;
    background: #fff2f2;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
  }

  .skw-fpd-size-choice-highlight {
    border-radius: 10px;
    outline: 3px solid rgb(15 143 120 / 36%);
    outline-offset: 5px;
    animation: skw-fpd-size-pulse 1.2s ease-in-out 2;
  }
}


/* =========================================================
   SKALDWERK DARK THEME – v1.0.3
   Purely visual overrides. No FPD behaviour/layout logic.
   ========================================================= */
:root {
  --skw-fpd-page-bg: #171C24;
  --skw-fpd-surface: #202833;
  --skw-fpd-control: #293442;
  --skw-fpd-line: #3A4654;
  --skw-fpd-text: #F1F3F5;
  --skw-fpd-muted: #B8C1CC;
  --skw-fpd-link: #78A9F5;
  --skw-fpd-accent: #D7E66B;
}

/* Full-screen surroundings */
body.skw-fpd-mobile-active .fpd-product-designer-wrapper {
  background: var(--skw-fpd-page-bg) !important;
}

body.skw-fpd-mobile-active .fpd-wrapper > fpd-actions-bar {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-page-bg) !important;
  border-color: var(--skw-fpd-line) !important;
}

body.skw-fpd-mobile-active .fpd-wrapper > fpd-actions-bar .fpd-btn {
  color: var(--skw-fpd-muted) !important;
  background: transparent !important;
}

body.skw-fpd-mobile-active .fpd-wrapper > fpd-actions-bar .fpd-btn:hover {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-control) !important;
}

/* Keep the actual artwork/view neutral, darken only the editor around it. */
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper .fpd-product-stage {
  background: var(--skw-fpd-page-bg) !important;
}

/* Bottom navigation */
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-surface) !important;
  border-top: 1px solid var(--skw-fpd-line) !important;
  box-shadow: 0 -2px 14px rgb(0 0 0 / 28%) !important;
}

body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item {
  color: var(--skw-fpd-text) !important;
  background: transparent !important;
}

body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item:hover,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item.fpd-active,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item.fpd-selected {
  color: var(--skw-fpd-accent) !important;
  background: var(--skw-fpd-control) !important;
}

/* Page/view switcher */
body.skw-fpd-mobile-active .fpd-container fpd-views-nav {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-surface) !important;
  border-color: var(--skw-fpd-line) !important;
  box-shadow: 0 4px 16px rgb(0 0 0 / 28%) !important;
}

body.skw-fpd-mobile-active .fpd-container fpd-views-nav > * {
  color: var(--skw-fpd-text) !important;
}

body.skw-fpd-mobile-active .fpd-container fpd-views-nav > .fpd-show-views-grid::after {
  color: var(--skw-fpd-muted) !important;
}

/* FPD dialogs / tool cards */
body.skw-fpd-mobile-active .fpd-draggable-dialog,
body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tools-nav,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-secondary-tools,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-sub-panel,
body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart.fpd-panel-visible > .fpd-sub-panel {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-surface) !important;
  border-color: var(--skw-fpd-line) !important;
}

body.skw-fpd-mobile-active .fpd-draggable-dialog > .fpd-dialog-head {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-control) !important;
  border-color: var(--skw-fpd-line) !important;
}

body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > div,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-secondary-tools > div {
  color: var(--skw-fpd-text) !important;
}

body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > div:hover,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-secondary-tools > div:hover {
  background: var(--skw-fpd-control) !important;
}

/* Form controls inside FPD panels */
body.skw-fpd-mobile-active .fpd-draggable-dialog input,
body.skw-fpd-mobile-active .fpd-draggable-dialog textarea,
body.skw-fpd-mobile-active .fpd-draggable-dialog select,
body.skw-fpd-mobile-active fpd-element-toolbar input,
body.skw-fpd-mobile-active fpd-element-toolbar textarea,
body.skw-fpd-mobile-active fpd-element-toolbar select {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-control) !important;
  border-color: var(--skw-fpd-line) !important;
}

body.skw-fpd-mobile-active .fpd-draggable-dialog input::placeholder,
body.skw-fpd-mobile-active .fpd-draggable-dialog textarea::placeholder,
body.skw-fpd-mobile-active fpd-element-toolbar input::placeholder,
body.skw-fpd-mobile-active fpd-element-toolbar textarea::placeholder {
  color: var(--skw-fpd-muted) !important;
}

/* Existing Skaldwerk top bar – same structure, updated palette */
#skw-fpd-mobile-bar {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-surface) !important;
  border-bottom: 1px solid var(--skw-fpd-line) !important;
}

#skw-fpd-mobile-bar .skw-fpd-mobile-back {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-control) !important;
}

#skw-fpd-mobile-bar .skw-fpd-mobile-done,
#skw-fpd-mobile-reopen {
  color: #171C24 !important;
  background: var(--skw-fpd-accent) !important;
}

/* Size prompt follows the shop palette as well. */
.skw-fpd-size-prompt-panel {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-surface) !important;
  border: 1px solid var(--skw-fpd-line) !important;
}

.skw-fpd-size-prompt-panel > strong {
  color: var(--skw-fpd-text) !important;
}

.skw-fpd-size-prompt-panel > p,
.skw-fpd-size-prompt-close {
  color: var(--skw-fpd-muted) !important;
}

.skw-fpd-size-prompt-more {
  color: #171C24 !important;
  background: var(--skw-fpd-accent) !important;
}

.skw-fpd-size-prompt-cart {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-control) !important;
  border-color: var(--skw-fpd-line) !important;
}

#skw-fpd-size-hint {
  color: var(--skw-fpd-text) !important;
  background: var(--skw-fpd-control) !important;
  border-color: var(--skw-fpd-accent) !important;
}


/* =========================================================
   SKALDWERK DARK THEME – v1.0.5 refinement
   Visual only. Based on the known-good 1.0.3.
   ========================================================= */

/* Keep the editor dark even after leaving the fullscreen state. */
.fpd-product-designer-wrapper,
.fpd-product-designer-wrapper > .fpd-container.fpd-wrapper,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-wrapper,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-wrapper .fpd-product-stage {
  background: #171C24 !important;
}

.fpd-product-designer-wrapper .fpd-wrapper > fpd-actions-bar,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar {
  color: #F1F3F5 !important;
  background: #202833 !important;
  border-color: #3A4654 !important;
}

.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-nav-item,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-nav-icon,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-label {
  color: #F1F3F5 !important;
}

/* Text/image dialogs: same dark card as the text dialog. */
.fpd-draggable-dialog,
.fpd-draggable-dialog.fpd-show,
.fpd-draggable-dialog > .fpd-dialog-head,
.fpd-draggable-dialog .fpd-dialog-content,
.fpd-draggable-dialog .fpd-content,
.fpd-draggable-dialog .fpd-upload-image,
.fpd-draggable-dialog .fpd-upload-image > *,
.fpd-draggable-dialog .fpd-module-tabs,
.fpd-draggable-dialog .fpd-scroll-area {
  color: #F1F3F5 !important;
  background-color: #202833 !important;
  border-color: #3A4654 !important;
}

/* The white upload strip/drop zone visible in the Bilder dialog. */
.fpd-draggable-dialog .fpd-upload-image .fpd-upload-zone,
.fpd-draggable-dialog .fpd-upload-image .fpd-drop-zone,
.fpd-draggable-dialog .fpd-upload-image .fpd-upload-area,
.fpd-draggable-dialog .fpd-upload-image [class*="upload-zone"],
.fpd-draggable-dialog .fpd-upload-image [class*="drop-zone"],
.fpd-draggable-dialog .fpd-upload-image [class*="upload-area"],
.fpd-draggable-dialog .fpd-upload-image label,
.fpd-draggable-dialog .fpd-upload-image form {
  color: #B8C1CC !important;
  background: #293442 !important;
  border-color: #3A4654 !important;
}

.fpd-draggable-dialog .fpd-upload-image .fpd-btn,
.fpd-draggable-dialog .fpd-upload-image button {
  color: #171C24 !important;
  background: #D7E66B !important;
  border-color: #D7E66B !important;
}

/* Preview modal: dark shell, without touching the actual product images. */
.fpd-modal-internal,
.fpd-modal-internal > .fpd-modal-inner,
.fpd-modal-internal .fpd-modal-content,
.fpd-modal-internal .fpd-modal-body {
  color: #F1F3F5 !important;
  background: #202833 !important;
  border-color: #3A4654 !important;
}

.fpd-modal-internal > .fpd-modal-inner {
  box-shadow: 0 18px 60px rgb(0 0 0 / 45%) !important;
}

/* Modal close control – intentionally very visible. */
.fpd-modal-internal .fpd-close,
.fpd-modal-internal .fpd-close-modal,
.fpd-modal-internal .fpd-modal-close,
.fpd-modal-internal [class*="close"] {
  color: #F1F3F5 !important;
  background: #293442 !important;
  border: 1px solid #3A4654 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.fpd-modal-internal .fpd-close svg,
.fpd-modal-internal .fpd-close-modal svg,
.fpd-modal-internal .fpd-modal-close svg,
.fpd-modal-internal [class*="close"] svg,
.fpd-modal-internal [class*="close"] svg * {
  fill: #F1F3F5 !important;
  stroke: #F1F3F5 !important;
  opacity: 1 !important;
}

/* Preserve neutral artwork/image backgrounds. */
.fpd-modal-internal img,
.fpd-product-stage img,
.fpd-view-stage img {
  filter: none !important;
}


/* =========================================================
   SKALDWERK DARK THEME – v1.0.6 refinement
   FPD design editor polish requested after live testing.
   ========================================================= */

/* Make the area around the view blend into the surrounding dark editor. */
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper .fpd-view-stage,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper .fpd-view-stage > div,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper .fpd-view-stage .fabricjs-container,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-wrapper .fpd-product-stage .fabricjs-container,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-wrapper .fpd-view-stage,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-wrapper .fpd-view-stage > div,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-wrapper .fpd-view-stage .fabricjs-container,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-wrapper .fpd-product-stage .fabricjs-container {
  background: #171C24 !important;
}

/* Bottom main navigation: make the icons/labels easier to recognise. */
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-nav-item {
  color: #F1F3F5 !important;
}

body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-icon,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-nav-icon {
  color: #F1F3F5 !important;
  opacity: 1 !important;
  font-size: 25px !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 0 rgb(0 0 0 / 28%);
}

body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-label,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-label {
  color: #F1F3F5 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item:hover .fpd-nav-icon,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item.fpd-active .fpd-nav-icon,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-nav-item.fpd-selected .fpd-nav-icon,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-nav-item:hover .fpd-nav-icon,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-nav-item.fpd-active .fpd-nav-icon,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-nav-item.fpd-selected .fpd-nav-icon {
  color: #D7E66B !important;
}

/* Hide the redundant “Füllen” headline/button once the direct color choices are visible. */
.skw-fpd-hide-fill-title,
.skw-fpd-hide-fill-title-wrap {
  display: none !important;
}

/* Bring the curved-text icon closer to its label. */
.skw-fpd-curved-text-control,
.skw-fpd-curved-text-control > div {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  text-align: center !important;
}

.skw-fpd-curved-text-control svg,
.skw-fpd-curved-text-control i,
.skw-fpd-curved-text-control .fpd-icon {
  margin-bottom: 2px !important;
}

@media (min-width: 768px) {
  .skw-fpd-toolbar-field > .skw-fpd-field-meta {
    font-size: 14px !important;
  }
}


/* v1.0.7 – FPD main navigation symbols are black SVG paths in 6.5.x.
   Override SVG paints, not just the surrounding font color. */
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-navigation .fpd-nav-item svg,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-navigation .fpd-nav-item svg *,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-navigation .fpd-nav-item svg,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-navigation .fpd-nav-item svg * {
  color: #F1F3F5 !important;
  fill: #F1F3F5 !important;
  stroke: #F1F3F5 !important;
  opacity: 1 !important;
}
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-navigation .fpd-nav-item .fpd-icon,
body.skw-fpd-mobile-active .fpd-wrapper > fpd-main-bar .fpd-navigation .fpd-nav-item i,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-navigation .fpd-nav-item .fpd-icon,
.fpd-product-designer-wrapper .fpd-wrapper > fpd-main-bar .fpd-navigation .fpd-nav-item i {
  color: #F1F3F5 !important;
  -webkit-text-fill-color: #F1F3F5 !important;
}
/* Skaldwerk FPD 1.0.8 — precise selectors confirmed via inspector */
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > .fpd-tool-color,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > .fpd-tool-text-size,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > .fpd-tool-font-family {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  text-align: center !important;
  box-sizing: border-box !important;
  padding: 4px 6px !important;
}
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > .fpd-tool-color > .fpd-label,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > .fpd-tool-text-size > .fpd-label,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-primary-tools > .fpd-tool-font-family > .fpd-label {
  display: block !important;
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #f1f3f5 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  text-align: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-color .fpd-current-fill,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-color > span:first-child,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-text-size > input,
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-tool-font-family > fpd-dropdown {
  margin-inline: auto !important;
  flex-shrink: 0 !important;
}
/* Distinct dark close control, including icon-font glyphs and pseudo elements. */
body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart > .fpd-close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 38px !important;
  min-height: 38px !important;
  background: #293442 !important;
  border: 1px solid #78a9f5 !important;
  border-radius: 8px !important;
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart > .fpd-close > .fpd-icon-close,
body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart > .fpd-close > .fpd-icon-close::before,
body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart > .fpd-close > span,
body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart > .fpd-close > span::before {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
body.skw-fpd-mobile-active fpd-element-toolbar.fpd-smart > .fpd-close:focus-visible {
  outline: 3px solid #d7e66b !important;
  outline-offset: 2px !important;
}


/* SKALDWERK FPD 1.0.9 – contrast of FPD icon-font navigation glyphs.
   Actual elements inspected: span.fpd-nav-icon.fpd-icon-text-secondary
   and span.fpd-nav-icon.fpd-icon-images.  The icon font may force its
   own foreground paint; filter acts on the rendered glyph itself. */
body.skw-fpd-mobile-active .fpd-product-designer-wrapper
  fpd-main-bar .fpd-navigation > .fpd-nav-item[data-module="text"] > span.fpd-nav-icon,
body.skw-fpd-mobile-active .fpd-product-designer-wrapper
  fpd-main-bar .fpd-navigation > .fpd-nav-item[data-module="images"] > span.fpd-nav-icon {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  filter: brightness(0) invert(1) !important;
}
body.skw-fpd-mobile-active .fpd-product-designer-wrapper
  fpd-main-bar .fpd-navigation > .fpd-nav-item[data-module="text"] > span.fpd-nav-icon::before,
body.skw-fpd-mobile-active .fpd-product-designer-wrapper
  fpd-main-bar .fpd-navigation > .fpd-nav-item[data-module="images"] > span.fpd-nav-icon::before {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}


/* Skaldwerk 1.0.11: unified 2-row sizing layout, equivalent to spacing panels.
   The original .fpd-tool-text-size.fpd-input contains the actual range slider
   and the numeric field. Keep both in their native FPD elements. */
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-panel-text-size .fpd-tool-text-size.fpd-input,
.fpd-product-designer-wrapper fpd-element-toolbar .fpd-panel-text-size .fpd-tool-text-size.fpd-input {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 70px !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  column-gap: 12px !important;
  row-gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-panel-text-size .fpd-tool-text-size.fpd-input > input.fpd-slider-number,
.fpd-product-designer-wrapper fpd-element-toolbar .fpd-panel-text-size .fpd-tool-text-size.fpd-input > input.fpd-slider-number {
  grid-row: 1 !important;
  grid-column: 2 !important;
  justify-self: end !important;
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
  margin: 0 !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  text-align: center !important;
}
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-panel-text-size .fpd-tool-text-size.fpd-input > fpd-range-slider,
.fpd-product-designer-wrapper fpd-element-toolbar .fpd-panel-text-size .fpd-tool-text-size.fpd-input > fpd-range-slider {
  grid-row: 2 !important;
  grid-column: 1 / -1 !important;
  justify-self: stretch !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
body.skw-fpd-mobile-active fpd-element-toolbar .fpd-panel-text-size .skw-fpd-control-caption {
  display: none !important;
}


/* Finished-design summary: do not expose the interactive FPD canvas outside the editor. */
/* Hide the interactive FPD internals, not the wrapper: the wrapper may be
   the actual left gallery column on products configured with FPD. */
body.skw-fpd-design-completed .fpd-product-designer-wrapper > :not(#skw-fpd-completed-preview),
body.skw-fpd-design-completed .fpd-product-designer-wrapper .fpd-container.fpd-wrapper {
  display: none !important;
}
body.skw-fpd-design-completed .fpd-product-designer-wrapper {
  display: block !important;
  min-width: 0;
}
body.skw-fpd-design-completed #fpd-start-customizing-button,
body.skw-fpd-design-completed .fpd-start-customizing-button {
  display: none !important;
}
#skw-fpd-completed-preview {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px;
  text-align: center;
}
#skw-fpd-completed-preview[hidden] { display:none !important; }
#skw-fpd-completed-preview img {
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  margin:0 auto;
  object-fit:contain;
  border-radius:6px;
}
.skw-fpd-preview-views {
  display:flex;
  justify-content:center;
  gap:10px;
  padding:12px 0;
}
.skw-fpd-preview-views[hidden] { display:none !important; }
.skw-fpd-preview-views button {
  background:#202833;
  border:1px solid #3A4654;
  border-radius:8px;
  color:#F1F3F5;
  padding:8px 14px;
  cursor:pointer;
}
.skw-fpd-preview-views button.is-active {
  border-color:#D7E66B;
  background:#2864B8;
}
body.skw-fpd-design-completed #skw-fpd-mobile-reopen {
  background:linear-gradient(105deg,#ed4562,#fc963f,#f5d54b,#38ad80,#317cda,#8653d2) !important;
  color:#fff !important;
}

/* Preserve the original gallery column and its sizing. Only hide the
   uncustomized gallery contents while the completed preview is visible. */
body.skw-fpd-design-completed .woocommerce-product-gallery > :not(#skw-fpd-completed-preview),
body.skw-fpd-design-completed .ct-product-gallery > :not(#skw-fpd-completed-preview) {
  display: none !important;
}
body.skw-fpd-design-completed .woocommerce-product-gallery,
body.skw-fpd-design-completed .ct-product-gallery {
  display: block !important;
  min-width: 0;
}
body.skw-fpd-design-completed .product-entry-wrapper {
  align-items: start;
}

/* v0.9.14: finished preview is a genuine gallery COLUMN, not an extra row. */
@media (min-width: 1000px) {
  body.skw-fpd-design-completed .product-entry-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: clamp(24px, 3vw, 58px) !important;
    row-gap: 0 !important;
    align-items: start !important;
  }
  body.skw-fpd-design-completed .product-entry-wrapper > #skw-fpd-completed-preview,
  body.skw-fpd-design-completed .product-entry-wrapper > .woocommerce-product-gallery,
  body.skw-fpd-design-completed .product-entry-wrapper > .ct-product-gallery {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  body.skw-fpd-design-completed .product-entry-wrapper > .summary,
  body.skw-fpd-design-completed .product-entry-wrapper > .entry-summary {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  body.skw-fpd-design-completed .product-entry-wrapper > .fpd-product-designer-wrapper {
    display: none !important;
  }
}
@media (max-width: 999px) {
  body.skw-fpd-design-completed .product-entry-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  body.skw-fpd-design-completed .product-entry-wrapper > .summary,
  body.skw-fpd-design-completed .product-entry-wrapper > .entry-summary {width:100%!important;}
}
body.skw-fpd-design-completed #skw-fpd-mobile-reopen {
  cursor:pointer !important;
  border:1px solid transparent !important;
  transition:filter .2s ease,transform .2s ease,box-shadow .2s ease !important;
}
body.skw-fpd-design-completed #skw-fpd-mobile-reopen:hover {
  filter:brightness(1.12) !important;
  transform:translateY(-2px) !important;
  box-shadow:0 6px 20px rgba(0,0,0,.28) !important;
}
body.skw-fpd-design-completed #skw-fpd-mobile-reopen:focus-visible {
  outline:3px solid #D7E66B !important;
  outline-offset:3px !important;
}

body.skw-fpd-design-completed .product-entry-wrapper > .woocommerce-product-gallery,
body.skw-fpd-design-completed .product-entry-wrapper > .ct-product-gallery {display:none!important;}
