/* Viewport-bound overlays: independent of the hero and document scroll. */
#leadModal {
  position: fixed;
  inset: var(--lead-viewport-center, 50dvh) 0 auto;
  width: min(760px, calc(100vw - 24px));
  max-width: none;
  max-height: min(900px, calc(var(--lead-viewport-height, 100dvh) - 24px));
  margin: 0 auto;
  transform: translateY(-50%);
  overflow: visible;
  transition: opacity .18s ease;
}
#leadModal[open] { transform: translateY(-50%); }
#leadModal .lead-modal-shell {
  max-height: min(900px, calc(var(--lead-viewport-height, 100dvh) - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #754631 #f5ead8;
}
#leadModal .lead-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 12;
  width: 44px;
  height: 44px;
  margin: 0;
  float: none;
}
#leadModal .lead-card-header { padding-right: 40px; }
#leadModal #form-title:focus { outline: none; }
#leadModal .chocolate-progress {
  height: 14px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #d8c3a6;
  border-radius: 999px;
  background: #eee0c9;
  box-shadow: inset 0 1px 3px #67351920;
}
#leadModal .chocolate-progress-fill {
  inset: 0;
  width: 100%;
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(var(--form-progress-scale, 0));
  background: linear-gradient(180deg, #8b5740 0%, #5b2d20 38%, #381b14 100%);
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
  box-shadow: inset 0 1px 0 #dca77966;
}
#leadModal .chocolate-progress-fill::after {
  content: '';
  position: absolute;
  inset: 2px 7px auto;
  width: auto;
  height: 2px;
  border-radius: 50%;
  background: #ffe0ae55;
  box-shadow: none;
}
#leadModal .form-journey-status {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: .85rem;
}
#leadModal .form-journey-status::after {
  content: attr(data-progress);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  color: #805d4c;
}
#mixModal .mix-modal-card { width: min(760px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; border-radius: 18px; }
#mixModal .mix-image-stage { position: relative; background: #23110d; touch-action: pan-y pinch-zoom; }
#mixModal #mixModalImage { display: block; height: min(62dvh, 580px, calc(100dvh - 170px)); max-height: none; width: 100%; object-fit: contain; user-select: none; }
#mixModal .mix-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #eedcba;
  border-radius: 50%;
  background: #fff7e9;
  color: #581d19;
  cursor: pointer;
  box-shadow: 0 2px 8px #0003;
}
#mixModal .mix-nav svg { width: 22px; height: 22px; }
#mixModal [data-mix-prev] { left: 10px; }
#mixModal [data-mix-next] { right: 10px; }
#mixModal .mix-nav:active { transform: translateY(-50%) scale(.94); }
#mixModal .mix-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 16px; }
#mixModal #mixModalCounter { font-size: .85rem; font-variant-numeric: tabular-nums; color: #805d4c; }
#mixModal .mix-catalog-link { padding: 11px 18px; border-radius: 10px; color: #fff7e9; background: #5d1e19; font-weight: 700; text-decoration: none; }
#mixModal .mix-modal-close { width: 44px; height: 44px; }
@media (max-width: 600px) {
  #leadModal .lead-card { padding: 24px 18px 20px; }
  #leadModal .lead-card-header h2 { font-size: 1.35rem; }
  #leadModal .lead-card-header > p:last-child { font-size: .9rem; line-height: 1.45; }
  #leadModal .lead-form { gap: 16px; }
  #leadModal input, #leadModal select { font-size: 16px; }
  #leadModal .lead-modal-close { top: 9px; right: 9px; }
  #mixModal { padding: 12px; }
  #mixModal #mixModalImage { height: min(58dvh, 500px, calc(100dvh - 170px)); }
}
@media (prefers-reduced-motion: reduce) {
  #leadModal, #leadModal .chocolate-progress-fill { transition: none; }
}
