/* Scoped API response shell; approved page and validation dialogs stay intact. */
html.api-response-open { overflow: hidden; }
.api-response-dialog {
  position: fixed;
  inset: 0;
  width: min(calc(100% - 32px), 400px);
  max-width: 400px;
  max-height: calc(100svh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--navy);
  background: var(--cream);
  box-shadow: 0 16px 48px rgb(6 38 83 / 24%);
  text-align: center;
}
.api-response-dialog[open] { display: flex; flex-direction: column; }
.api-response-dialog::backdrop { background: rgb(6 38 83 / 65%); }
.api-response-dialog__art {
  flex-shrink: 0;
  display: block;
  width: 100%;
  height: auto;
  max-height: min(32svh, 260px);
  max-height: min(32dvh, 260px);
  object-fit: cover;
  object-position: center bottom;
}
.api-response-dialog__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px;
  overflow: hidden;
}
.api-response-dialog__title {
  flex-shrink: 0;
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.api-response-dialog__text {
  min-height: 0;
  margin: 0 0 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.api-response-dialog__accept {
  flex-shrink: 0;
  appearance: none;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--blue);
  border-radius: 17px;
  color: var(--white);
  background: var(--blue);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  touch-action: manipulation;
}
.api-response-dialog__accept:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

/* Preserve the complete approved artwork at the existing desktop breakpoint. */
@media (min-width: 1200px) {
  .api-response-dialog {
    /* Include the two 1px shell borders in the proportional width limit. */
    width: min(calc(100% - 32px), 400px, calc(48svh * 326 / 300 + 2px));
    width: min(calc(100% - 32px), 400px, calc(48dvh * 326 / 300 + 2px));
  }
  .api-response-dialog__art {
    height: auto;
    max-height: none;
    aspect-ratio: 326 / 300;
    object-fit: contain;
    object-position: center;
  }
}
