/* Constructor controls: visual adaptation of the supplied constructor reference.
   The monument preview and the constructor's existing behavior remain untouched. */
body.reference-study #constructor .builder-controls {
  min-width: 0;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: none;
}
body.reference-study #constructor .v9-builder-tabs { display: none !important; }
body.reference-study #constructor .builder-controls > fieldset { display: block; margin: 0 0 24px; padding: 0 0 24px; border: 0; border-bottom: 1px solid #dce2d8; }
body.reference-study #constructor .builder-controls > fieldset:nth-of-type(2) { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
body.reference-study #constructor .builder-controls > fieldset:nth-of-type(3) { margin-top: 22px; }
body.reference-study #constructor .builder-controls > fieldset.personalization { border-top: 1px solid #dce2d8; padding-top: 24px; }
body.reference-study #constructor .constructor-material-field > legend { margin-bottom: 4px; }
body.reference-study #constructor #stone-name { display: block; width: 100%; margin: 0 0 12px; color: #59685e; font-size: 13px; }
body.reference-study #constructor .stone-actions { display: contents; }
body.reference-study #constructor .stone-actions a { display: block; width: max-content; margin: 8px 0 12px auto; padding: 0; background: none; }
body.reference-study #constructor .stone-actions #more-stones { order: 99; width: 48px; height: 48px; padding: 0; border-radius: 50%; }
body.reference-study #constructor .swatches { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
body.reference-study #constructor .swatch { flex: 0 0 48px; width: 48px; }
body.reference-study #constructor .estimate { display: block; }
body.reference-study #constructor .estimate > div { display: none; }
body.reference-study #constructor .estimate .button { display: block; width: 100%; }
body.reference-study #constructor .estimate-note { margin-top: 10px; }
body.reference-study #constructor .builder-topline .text-button { background: transparent; }
body.reference-study #constructor .builder-topline {
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(42, 61, 51, .14);
}
body.reference-study #constructor .builder-topline > span {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
}
body.reference-study #constructor .builder-topline .text-button {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e9ede6;
  color: #536258;
  font-size: 13px;
}
body.reference-study #constructor fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0 0 22px;
  border-bottom: 1px solid rgba(42, 61, 51, .14);
}
body.reference-study #constructor fieldset:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
body.reference-study #constructor legend {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: #263c31;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 500;
}
body.reference-study #constructor legend > span {
  max-width: 62%;
  color: #66736a;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
}
body.reference-study #constructor .shape-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
body.reference-study #constructor .shape-option {
  min-width: 0;
  min-height: 112px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: #edf0e9;
  color: #293c32;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 400;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
body.reference-study #constructor .shape-option img {
  width: 100%;
  height: 68px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
body.reference-study #constructor .shape-option[aria-pressed="true"] {
  border-color: #2a4938;
  background: #e2e9df;
}
body.reference-study #constructor .shape-option:focus-visible,
body.reference-study #constructor .size-option:focus-visible,
body.reference-study #constructor .extra-option:focus-visible,
body.reference-study #constructor .swatch:focus-visible {
  outline: 3px solid #78917e;
  outline-offset: 3px;
}
@media (hover: hover) {
  body.reference-study #constructor .shape-option:hover { transform: translateY(-2px); }
}
body.reference-study #constructor .swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-items: center;
  gap: 12px 8px;
  padding: 4px 2px;
}
body.reference-study #constructor .swatch {
  width: min(100%, 48px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #f8f9f5, 0 0 0 3px #d9dfd7;
}
body.reference-study #constructor .swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px #f8f9f5, 0 0 0 4px #304c3b;
}
body.reference-study #constructor .stone-actions {
  align-items: center;
  margin-top: 14px;
}
body.reference-study #constructor .stone-actions > * {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e9ede6;
  color: #44594b;
  font-size: 13px;
  text-decoration: none;
}
body.reference-study #constructor .size-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
body.reference-study #constructor .size-option {
  min-width: 0;
  min-height: 48px;
  padding: 8px 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #edf0e9;
  color: #35483b;
  font-size: 13px;
  line-height: 1.2;
  white-space: normal;
}
body.reference-study #constructor .size-option[aria-pressed="true"] {
  border-color: #2a4938;
  background: #e2e9df;
}
body.reference-study #constructor .constructor-size-hint {
  margin: 0 0 10px;
  color: #526258;
  font-size: 14px;
}
body.reference-study #constructor .constructor-size-select {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 10px 42px 10px 16px;
  border: 1px solid #c6d0c5;
  border-radius: 14px;
  background: #edf0e9;
  color: #203d30;
  font: inherit;
  font-size: 16px;
}
body.reference-study #constructor .custom-size-fields:not([hidden]) { display: grid; gap: 14px; margin-top: 16px; }
body.reference-study #constructor .custom-size-fields > p:first-child { margin: 0; font-size: 16px; }
body.reference-study #constructor .custom-size-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body.reference-study #constructor .custom-size-group > span { grid-column: 1 / -1; color: #526258; font-size: 14px; }
body.reference-study #constructor .custom-size-group label { display: grid; gap: 6px; min-width: 0; color: #526258; font-size: 13px; }
body.reference-study #constructor .custom-size-group input { width: 100%; min-width: 0; min-height: 48px; padding: 9px 10px; border: 1px solid #c6d0c5; border-radius: 12px; background: #fff; color: #203d30; font: inherit; font-size: 16px; }
body.reference-study #constructor .custom-size-group input[aria-invalid="true"] { border-color: #a23e3e; }
body.reference-study #constructor .constructor-size-select:focus-visible,
body.reference-study #constructor .custom-size-group input:focus-visible { outline: 2px solid #2a4938; outline-offset: 2px; }
body.reference-study #constructor .personalization > label,
body.reference-study #constructor .personalization #portrait-controls > label {
  color: #526258;
  font-size: 14px;
}
body.reference-study #constructor .portrait-upload {
  min-height: 70px;
  padding: 13px 16px !important;
  border-radius: 16px;
  background: #edf0e9;
}
body.reference-study #constructor .personalization textarea,
body.reference-study #constructor .memorial-dates input,
body.reference-study #constructor #share-link {
  min-width: 0;
  border: 1px solid #dce2d8;
  border-radius: 12px;
  background: #fff;
}
body.reference-study #constructor .lettering-options button,
body.reference-study #constructor .person-tabs button {
  min-height: 44px;
  border-radius: 999px;
}
body.reference-study #constructor .extra-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
body.reference-study #constructor .extra-option {
  min-width: 0;
  min-height: 58px;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid #e1e6de;
  border-radius: 16px;
  background: #fff;
  color: #35483b;
  text-align: left;
}
body.reference-study #constructor .extra-option[aria-pressed="true"] {
  border-color: #9cab99;
  background: #e8ede5;
}
body.reference-study #constructor .extra-option > span {
  flex: 0 0 auto;
  color: #526b59;
}
body.reference-study #constructor .estimate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(42, 61, 51, .14);
}
body.reference-study #constructor .estimate .button {
  min-height: 48px;
  border-radius: 999px;
  white-space: nowrap;
}
body.reference-study #constructor .estimate-note,
body.reference-study #constructor .personal-note,
body.reference-study #constructor .date-hint {
  color: #66736a;
  font-size: 13px;
  line-height: 1.5;
}
body.reference-study #constructor .builder-tools {
  justify-content: flex-start;
  gap: 8px 16px;
}
@media (max-width: 1200px) {
  body.reference-study #constructor .builder-controls { padding: 24px; }
  body.reference-study #constructor .swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  body.reference-study #constructor .builder-controls {
    padding: 20px 16px;
    border-radius: 22px;
  }
  body.reference-study #constructor .builder-topline {
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }
  body.reference-study #constructor .builder-topline > span { font-size: 18px; }
  body.reference-study #constructor .builder-topline .text-button { font-size: 12px; }
  body.reference-study #constructor fieldset {
    margin-bottom: 18px;
    padding-bottom: 18px;
  }
  body.reference-study #constructor legend { font-size: 17px; }
  body.reference-study #constructor legend > span { font-size: 13px; }
  body.reference-study #constructor .shape-option {
    min-height: 102px;
    padding: 8px 8px 10px;
    border-radius: 20px;
    font-size: 13px;
  }
  body.reference-study #constructor .shape-option img { height: 62px; }
  body.reference-study #constructor .swatches {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px 6px;
  }
  body.reference-study #constructor .swatch { width: min(100%, 44px); }
  body.reference-study #constructor .size-option { font-size: 12px; }
  body.reference-study #constructor .memorial-dates { gap: 8px; }
  body.reference-study #constructor .extra-options { gap: 8px; }
  body.reference-study #constructor .extra-option {
    min-height: 52px;
    padding-inline: 10px;
    font-size: 13px;
  }
  body.reference-study #constructor .estimate { grid-template-columns: 1fr; }
  body.reference-study #constructor .estimate .button { width: 100%; }
}
@media (max-width: 380px) {
  body.reference-study #constructor .builder-controls { padding-inline: 13px; }
  body.reference-study #constructor .shape-options { gap: 7px; }
  body.reference-study #constructor .shape-option { font-size: 12px; }
  body.reference-study #constructor .size-options { gap: 5px; }
  body.reference-study #constructor .size-option { padding-inline: 2px; font-size: 11px; }
  body.reference-study #constructor .extra-option { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body.reference-study #constructor .shape-option { transition: none; }
}
