.mobile-wizard-adjust-toggle, .mobile-wizard-photo-progress { display: none; }
@media (max-width: 800px) { .mobile-wizard-photo-progress:empty { display: none !important; } }
@media (max-width: 800px) {
  .mobile-wizard-photo-progress { display: block; }
  .design-page .adjust-actions { display: none !important; }
  .design-page #adjustPanel:not(.bho-adjust-open) { display: none !important; }
  .design-page .mobile-wizard-adjust-toggle {
    display: block; width: 100%; min-height: 44px; margin: 12px 0;
    border: 1px solid #dfc5a3; border-radius: 11px;
    background: #fffaf4; color: #70471f;
    font: 700 13px/1.3 Arial, sans-serif; cursor: pointer;
  }
  .design-page .mobile-wizard-adjust-toggle[aria-expanded="true"] { background: #f6ead9; }
  .mobile-wizard-photo-progress {
    margin: 10px 0 16px;
    padding: 11px 13px;
    border: 1px solid #d9ad70;
    border-radius: 12px;
    background: #fff5e7;
    color: #694018;
    font: 700 13px/1.4 Arial, sans-serif;
    text-align: center;
  }
  .photo-upload-row > .mobile-wizard-next-photo .photo-box {
    outline: 3px solid #b9853f;
    outline-offset: 3px;
  }
  body.bho-mobile-wizard-open { overflow: hidden !important; }
  #mobileDesignWizard[hidden], #mobileDesignWizard [hidden] { display: none !important; }
  #mobileDesignWizard {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    background: rgba(26, 19, 13, .75);
    font-family: Arial, sans-serif;
  }
  #mobileDesignWizard * { box-sizing: border-box; }
  #mobileDesignWizard .mobile-wizard-card {
    width: min(100%, 430px);
    max-height: min(760px, calc(100dvh - 20px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e6c79e;
    border-radius: 21px;
    background: #fffaf4;
    box-shadow: 0 22px 60px rgba(20, 12, 5, .34);
    color: #4b2c15;
  }
  #mobileDesignWizard .mobile-wizard-header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 19px 20px 15px;
    border-bottom: 1px solid #ead8c2;
  }
  #mobileDesignWizard .mobile-wizard-header small { display: block; margin-bottom: 6px; color: #aa7740; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  #mobileDesignWizard h2 { margin: 0; color: #4b2c15; font: 700 22px/1.2 Arial, sans-serif; }
  #mobileDesignWizard .mobile-wizard-close {
    width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center;
    border: 1px solid #e4cfb4; border-radius: 50%; background: #fff; color: #6d4a27;
    font: 26px/1 Arial, sans-serif; cursor: pointer;
  }
  #mobileDesignWizard .mobile-wizard-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 20px 22px; }
  #mobileDesignWizard .mobile-wizard-step p { margin: 0 0 17px; color: #71523a; font: 14px/1.5 Arial, sans-serif; }
  #mobileDesignWizard .mobile-wizard-step > label:not(.mobile-wizard-check),
  #mobileDesignWizard .mobile-wizard-step > strong { display: block; margin: 14px 0 7px; color: #553215; font: 700 14px/1.3 Arial, sans-serif; }
  #mobileDesignWizard textarea, #mobileDesignWizard input[type="text"],
  #mobileDesignWizard input:not([type]) {
    width: 100%; min-height: 47px; padding: 12px 13px;
    border: 1px solid #d8b98e; border-radius: 11px; outline-color: #bd8b48;
    background: #fff; color: #3c2917; font: 16px/1.4 Arial, sans-serif;
  }
  #mobileDesignWizard textarea { min-height: 112px; resize: vertical; }
  #mobileDesignWizard #mobileWizardText { min-height: 76px; }
  #mobileDesignWizard .mobile-wizard-step label small,
  #mobileDesignWizard .mobile-wizard-optional summary small { color: #977b61; font-size: 11px; font-weight: 400; }
  #mobileDesignWizard .mobile-wizard-name-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  #mobileDesignWizard .mobile-wizard-optional { margin-top: 16px; border: 1px solid #e2ceb4; border-radius: 11px; background: #fff; }
  #mobileDesignWizard .mobile-wizard-optional summary { padding: 13px; color: #69431f; font: 700 13px/1.3 Arial, sans-serif; cursor: pointer; }
  #mobileDesignWizard .mobile-wizard-optional[open] { padding: 0 12px 14px; }
  #mobileDesignWizard .mobile-wizard-optional[open] summary { margin: 0 -12px 10px; border-bottom: 1px solid #ead8c2; }
  #mobileDesignWizard .mobile-wizard-optional strong { display: block; margin: 12px 0 6px; font-size: 12px; }
  #mobileDesignWizard .mobile-wizard-check { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: #654324; font: 13px/1.35 Arial, sans-serif; }
  #mobileDesignWizard .mobile-wizard-check input { width: 18px; height: 18px; accent-color: #b98a49; }
  #mobileDesignWizard .mobile-wizard-emojis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
  #mobileDesignWizard .mobile-wizard-emojis button {
    min-height: 49px; padding: 4px; border: 1px solid #d9bb93; border-radius: 10px;
    background: #f4e6d0; color: #563619; font: 600 19px/1.2 Arial, sans-serif; cursor: pointer;
  }
  #mobileDesignWizard .mobile-wizard-emojis button:last-child { font-size: 11px; }
  #mobileDesignWizard .mobile-wizard-emojis button.selected { border: 2px solid #68411d; background: #b98a49; color: #fff; box-shadow: 0 0 0 2px #f5e6d1 inset; }
  #mobileDesignWizard .mobile-wizard-preview-step > p:first-child { margin-bottom: 10px; }
  #mobileDesignWizard .mobile-wizard-preview-host { width: 100%; border: 1px solid #e4c79d; border-radius: 16px; overflow: hidden; background: #f3eadc; }
  #mobileDesignWizard .mobile-wizard-preview-host > .design-preview { display: block !important; position: static !important; width: 100% !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  #mobileDesignWizard .mobile-wizard-preview-host .design-preview > :not(.preview-frame) { display: none !important; }
  #mobileDesignWizard .mobile-wizard-preview-host .design-preview .preview-frame { display: block !important; width: 100% !important; min-height: 0 !important; height: min(50dvh, 405px) !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
  #mobileDesignWizard .mobile-wizard-preview-host .design-preview #scene { width: 100% !important; height: 100% !important; touch-action: pan-y !important; }
  /* Enlarge the complete rendered product only in the mobile review modal.
     CSS zoom keeps the existing 3D rotation transform intact. */
  #mobileDesignWizard .mobile-wizard-preview-host .design-preview .real-3d #product { zoom: 1.28; }
  body.round-template #mobileDesignWizard .round-clock-product { zoom: var(--wizard-round-zoom, .86); }
  #mobileDesignWizard .mobile-wizard-preview-host .vertical-wall-instructions { display: none !important; }
  #mobileDesignWizard .mobile-wizard-preview-note { margin: 10px 0 0 !important; font-size: 12px !important; }
  #mobileDesignWizard .mobile-wizard-error { margin: 15px 0 0; padding: 10px 12px; border: 1px solid #ce8c7b; border-radius: 9px; background: #fff1ed; color: #92392b; font: 13px/1.4 Arial, sans-serif; }
  #mobileDesignWizard .mobile-wizard-footer { flex: 0 0 auto; display: flex; gap: 9px; padding: 14px 20px 18px; border-top: 1px solid #ead8c2; background: #fffaf4 !important; }
  #mobileDesignWizard .mobile-wizard-footer button { min-height: 46px; border-radius: 11px; font: 700 14px/1.2 Arial, sans-serif; cursor: pointer; }
  #mobileDesignWizard .mobile-wizard-back { flex: 0 0 75px; border: 1px solid #d5b68e; background: #fff; color: #6e4521; }
  #mobileDesignWizard .mobile-wizard-edit { flex: 0 0 78px; border: 1px solid #b98a49; background: #fff2dd; color: #794819; }
  #mobileDesignWizard .mobile-wizard-next { flex: 1 1 auto; padding: 9px 12px; border: 1px solid #a5773c; background: linear-gradient(105deg, #b98a49, #995d1d); color: #fff; }
  #mobileDesignWizard .mobile-wizard-footer.is-review-step { gap: 7px; padding-inline: 14px; }
  #mobileDesignWizard .mobile-wizard-footer.is-review-step .mobile-wizard-back { flex-basis: 58px; }
  #mobileDesignWizard .mobile-wizard-footer.is-review-step .mobile-wizard-next { min-width: 0; padding-inline: 6px; font-size: 12px; line-height: 1.2; }
}

/* Vertical model review: fit the full clock inside the mobile preview window. */
@media (max-width: 800px) {
  body.vertical-template #mobileDesignWizard .mobile-wizard-preview-host .design-preview .real-3d.bho-preview-clock--style-4 #product {
    zoom: .48 !important;
    top: 0 !important;
    transform: scale(1) !important;
    transform-origin: center center !important;
  }
}
@media (max-width: 800px) and (max-height: 560px) {
  body.vertical-template #mobileDesignWizard .mobile-wizard-preview-host .design-preview .real-3d.bho-preview-clock--style-4 #product { zoom: .36 !important; }
}
@media (max-width: 800px) and (max-height: 450px) {
  body.vertical-template #mobileDesignWizard .mobile-wizard-preview-host .design-preview .real-3d.bho-preview-clock--style-4 #product { zoom: .28 !important; }
}

@media (max-width: 800px) {
  body.square-template #mobileDesignWizard .mobile-wizard-preview-host .design-preview .real-3d.bho-preview-clock--square #product {
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    zoom: 1 !important;
    transform: translate(-50%, -50%) perspective(1000px) rotateX(var(--square-rx, 1deg)) rotateY(var(--square-ry, -2deg)) scale(var(--wizard-square-scale, .68)) !important;
    transform-origin: center center !important;
  }
}
