/* V0.15.14 — source-level Setup width fix + no stale-data flash */

/* Setup dialog is genuinely wide enough for history, but still respects the viewport. */
body .personal-backdrop .personal-modal{
  width:min(900px,calc(100vw - 36px))!important;
  max-width:900px!important;
  box-sizing:border-box!important;
}

/* Mortgage deal rows: five data fields across, action on its own clean row. */
body .personal-modal .history-deal-row{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(130px,1.2fr) minmax(130px,1.2fr) minmax(72px,.58fr) minmax(96px,.82fr) minmax(96px,.82fr)!important;
  gap:10px!important;
  overflow:visible!important;
}
body .personal-modal .history-deal-row label,
body .personal-modal .history-deal-row input{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
body .personal-modal .history-deal-row .history-remove{
  grid-column:1/-1!important;
  justify-self:end!important;
  width:auto!important;
  max-width:100%!important;
  margin-top:0!important;
}

/* Setup Close: authoritative warm control, including inherited generic button rules. */
body .personal-backdrop .personal-modal button.personal-close,
body .personal-backdrop .personal-modal .personal-modal-head button.personal-close{
  appearance:none!important;
  width:auto!important;
  min-width:64px!important;
  max-width:none!important;
  height:36px!important;
  min-height:36px!important;
  padding:0 14px!important;
  margin:0!important;
  border:1px solid #d6c8b8!important;
  border-radius:11px!important;
  background:#fffaf4!important;
  background-image:none!important;
  color:#202833!important;
  -webkit-text-fill-color:#202833!important;
  font:inherit!important;
  font-size:11px!important;
  font-weight:780!important;
  line-height:1!important;
  box-shadow:0 3px 10px rgba(61,48,36,.05)!important;
}
body .personal-backdrop .personal-modal button.personal-close:hover,
body .personal-backdrop .personal-modal button.personal-close:focus-visible{
  background:#f2e7da!important;
  color:#202833!important;
  -webkit-text-fill-color:#202833!important;
  border-color:#c9986e!important;
  box-shadow:0 10px 24px rgba(61,48,36,.12)!important;
  outline:none!important;
}

@media(max-width:760px){
  body .personal-backdrop .personal-modal{width:min(100%,calc(100vw - 16px))!important}
  body .personal-modal .history-deal-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body .personal-modal .history-deal-row .history-remove{grid-column:1/-1!important;width:100%!important;justify-self:stretch!important}
}
