.ivris-proposal-v2 {
  box-sizing: border-box;
  width: min(720px, calc(100% - 32px));
  max-width: 720px;
  /* 820px is the ceiling proven to fit a 900px viewport with the header and
     actions pinned. RC3 raised this to 860px and simultaneously made the
     dialog itself scrollable, which pushed its scrollHeight past its own
     clientHeight at 1440x900. */
  max-height: min(820px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  /* One scroll owner only. The body scrolls; the dialog does not. Two nested
     scrollers is what produced the desktop overflow and the reflow anomaly. */
  overflow: hidden;
  border: 1px solid #c99a45;
  border-radius: 20px;
  background: #191918;
  color: #f8f3ea;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .46);
  font-family: 'DM Sans', Arial, Helvetica, sans-serif;
  scrollbar-color: #8f7040 #24231f;
  scrollbar-width: thin;
}

.ivris-proposal-v2::backdrop {
  background: rgba(15, 15, 14, .78);
  backdrop-filter: blur(3px);
}

.ivris-proposal-v2,
.ivris-proposal-v2 * {
  box-sizing: border-box;
}

.ivris-proposal-v2__frame,
.ivris-proposal-v2 form {
  display: flex;
  min-width: 0;
  /* min-height:0 lets a flex child shrink below its content size; without it
     the form cannot shrink and forces the dialog to overflow. */
  min-height: 0;
  max-height: inherit;
  flex-direction: column;
}

.ivris-proposal-v2 form {
  flex: 1 1 auto;
}

.ivris-proposal-v2__header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 18px;
  align-items: start;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(231, 190, 111, .22);
  background: #191918;
}

.ivris-proposal-v2__eyebrow {
  margin: 0 0 5px;
  color: #efbd62;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.35;
  text-transform: uppercase;
}

.ivris-proposal-v2__header h2 {
  max-width: 580px;
  margin: 0;
  color: #fffaf1;
  font-family: 'DM Sans', Arial, Helvetica, sans-serif;
  font-size: clamp(29px, 3vw, 34px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.ivris-proposal-v2__header p:last-child {
  max-width: 590px;
  margin: 8px 0 0;
  color: #d5cec3;
  font-size: 15px;
  line-height: 1.48;
}

.ivris-proposal-v2__close {
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 1px solid rgba(239, 189, 98, .58);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.ivris-proposal-v2__close::before,
.ivris-proposal-v2__close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: '';
}

.ivris-proposal-v2__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.ivris-proposal-v2__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.ivris-proposal-v2__body {
  min-width: 0;
  min-height: 0;
  padding: 17px 24px 19px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 12px;
}

.ivris-proposal-v2__notice {
  display: grid;
  gap: 3px;
  margin: 0 0 15px;
  padding: 10px 12px;
  border: 1px solid rgba(231, 190, 111, .28);
  border-radius: 10px;
  background: #22211f;
  color: #d7d0c5;
  font-size: 13px;
  line-height: 1.45;
}

.ivris-proposal-v2__notice strong { color: #fff8ed; }

.ivris-proposal-v2__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 17px;
  min-width: 0;
}

.ivris-proposal-v2__field {
  min-width: 0;
  scroll-margin-block: 14px;
}

.ivris-proposal-v2__field--full { grid-column: 1 / -1; }

.ivris-proposal-v2__field:has(> input[name='website']) { grid-column: 1 / -1; }

.ivris-proposal-v2__field > label:not(.ivris-proposal-v2__consent) {
  display: block;
  margin: 0 0 6px;
  color: #f8f3ea;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.ivris-proposal-v2__field > label span {
  color: #bbb4a9;
  font-size: 12px;
  font-weight: 600;
}

.ivris-proposal-v2 input:not([type='checkbox']),
.ivris-proposal-v2 select,
.ivris-proposal-v2 textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #6c675e;
  border-radius: 10px;
  background: #fffdf9;
  color: #171716;
  font: 400 16px/1.35 'DM Sans', Arial, Helvetica, sans-serif;
}

.ivris-proposal-v2 select { padding-right: 38px; }

.ivris-proposal-v2 textarea {
  min-height: 90px;
  resize: vertical;
}

.ivris-proposal-v2 input[aria-invalid='true'],
.ivris-proposal-v2 select[aria-invalid='true'],
.ivris-proposal-v2 textarea[aria-invalid='true'] {
  border-color: #ff8177;
  box-shadow: 0 0 0 3px rgba(255, 129, 119, .17);
}

.ivris-proposal-v2__help,
.ivris-proposal-v2__field-error {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.42;
}

.ivris-proposal-v2__help { color: #bbb4a9; }
.ivris-proposal-v2__field-error { color: #ffaaa3; font-weight: 700; }

.ivris-proposal-v2__consent {
  display: grid;
  min-height: 48px;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 12px 13px;
  border: 1px solid rgba(231, 190, 111, .31);
  border-radius: 10px;
  color: #ded7cc;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.ivris-proposal-v2__consent.is-invalid { border-color: #ff8177; }

.ivris-proposal-v2__consent input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #e9bd68;
}

.ivris-proposal-v2 a { color: #efc878; text-underline-offset: 3px; }

.ivris-proposal-v2__actions {
  position: static;
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 15px 24px 20px;
  border-top: 1px solid rgba(231, 190, 111, .22);
  background: #20201e;
  box-shadow: none;
}

.ivris-proposal-v2__actions > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.ivris-proposal-v2__actions p {
  max-width: 155px;
  margin: 0;
  color: #bbb4a9;
  font-size: 12px;
  line-height: 1.35;
}

.ivris-proposal-v2__secondary,
.ivris-proposal-v2__submit {
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 999px;
  font: 800 14px/1 'DM Sans', Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.ivris-proposal-v2__secondary {
  border: 1px solid #8d7b59;
  background: transparent;
  color: #fff8ed;
}

.ivris-proposal-v2__submit {
  border: 1px solid #e9bd68;
  background: #e9bd68;
  color: #141413;
}

.ivris-proposal-v2 :focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.ivris-proposal-v2__errors,
.ivris-proposal-v2__result {
  margin: 0 0 15px;
  padding: 13px 15px;
  border: 1px solid #e1948d;
  border-radius: 10px;
  background: #3b211f;
  color: #fff2ef;
  font-size: 13px;
  line-height: 1.45;
}

.ivris-proposal-v2__errors ul { margin: 6px 0 0; padding-left: 20px; }
.ivris-proposal-v2__result { border-color: #78a986; background: #1e3525; color: #effbf2; }
.ivris-proposal-v2__result p { margin: 4px 0 0; }
.ivris-proposal-v2__honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; }
.ivris-proposal-v2__noscript-note { width: min(720px, calc(100% - 24px)); margin: 30px auto 0; color: #675f59; font: 600 14px/1.5 'DM Sans', Arial, sans-serif; }

@media (max-width: 600px) {
  .ivris-proposal-v2 {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 16px;
  }

  .ivris-proposal-v2__header {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    padding: 15px 14px 13px;
  }

  .ivris-proposal-v2__eyebrow { margin-bottom: 4px; font-size: 11px; }
  .ivris-proposal-v2__header h2 { font-size: clamp(24px, 7vw, 27px); line-height: 1.13; }
  .ivris-proposal-v2__header p:last-child { margin-top: 6px; font-size: 13px; line-height: 1.42; }
  .ivris-proposal-v2__close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; }
  .ivris-proposal-v2__body { padding: 13px 14px 15px; }
  .ivris-proposal-v2__notice { margin-bottom: 12px; padding: 9px 11px; }
  .ivris-proposal-v2__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ivris-proposal-v2__field--full { grid-column: auto; }
  .ivris-proposal-v2 textarea { min-height: 86px; }
  .ivris-proposal-v2__consent { padding: 11px 12px; font-size: 13px; }
  .ivris-proposal-v2__actions { justify-content: space-between; gap: 9px; padding: 13px 14px calc(15px + env(safe-area-inset-bottom)); }
  .ivris-proposal-v2__actions > div { margin-left: auto; justify-content: flex-end; }
  .ivris-proposal-v2__actions p { display: none; }
  .ivris-proposal-v2__secondary,
  .ivris-proposal-v2__submit { min-height: 46px; padding-inline: 15px; }
}

@media (max-width: 340px) {
  .ivris-proposal-v2 { width: calc(100% - 8px); max-height: calc(100dvh - 8px); }
  .ivris-proposal-v2__header { padding-inline: 12px; }
  .ivris-proposal-v2__body { padding-inline: 12px; }
  .ivris-proposal-v2__actions { gap: 7px; padding-inline: 12px; }
  .ivris-proposal-v2__secondary,
  .ivris-proposal-v2__submit { padding-inline: 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: no-preference) {
  .ivris-proposal-v2[open] { animation: ivris-proposal-v2-in .18s ease-out; }
  @keyframes ivris-proposal-v2-in { from { opacity: 0; transform: scale(.99); } }
}

@media (prefers-reduced-motion: reduce) {
  .ivris-proposal-v2,
  .ivris-proposal-v2 * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
