.sheet-preview {
  display: block;
  max-width: 34rem;
  overflow: hidden;
  margin-block-start: 20px;
  background: white;
  border: 1px solid #abc0cb;
  border-radius: 10px;
}
.sheet-preview:hover { border-color: var(--brand); }
.sheet-preview-heading, .sheet-dialog .preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.sheet-preview-heading {
  min-height: 44px;
  padding: 8px 14px;
  background: #eaf2f5;
  color: var(--ink);
  font-size: 14px;
}
.sheet-preview-heading > span { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.sheet-preview img { display: block; width: 100%; height: auto; }
.sheet-dialog {
  width: min(74rem, calc(100% - 24px));
  max-height: 92dvh;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  box-shadow: 0 20px 80px #15283d44;
}
.sheet-dialog[open] { display: flex; flex-direction: column; }
.sheet-dialog::backdrop { background: #101f35b8; }
.sheet-dialog .preview-toolbar { padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.sheet-dialog h2 { font-size: clamp(20px, 3vw, 30px); }
.sheet-dialog form { display: flex; gap: 8px; margin: 0; }
.sheet-dialog button { min-height: 44px; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--rule); background: white; color: var(--brand-ink); cursor: pointer; }
.sheet-dialog button[type="submit"] { background: var(--ink); color: white; }
.sheet-dialog p { margin: 0; padding: 8px 16px; font-size: 14px; color: var(--ink-2); }
.sheet-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; background: #eef3f5; }
.sheet-scroll img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
.sheet-scroll[data-enlarged] img { width: auto; max-width: none; }
html:has(.sheet-dialog[open]) { overflow: hidden; }
.offer-summary { display: none; }
@media (max-width: 680px) {
  .offer-summary { display: table; width: 100%; margin-block: 16px 0; border-collapse: collapse; font-size: 14px; line-height: 1.35; font-variant-numeric: tabular-nums; background: #fff; color: var(--ink); }
  .offer-summary caption { padding: 9px 8px; color: var(--ink-2); font-weight: 600; text-align: start; background: #eaf2f5; }
  .offer-summary th, .offer-summary td { padding: 9px 6px; border-bottom: 1px solid var(--rule); text-align: end; }
  .offer-summary th:first-child { text-align: start; }
  .offer-summary td { white-space: nowrap; }
  .offer-summary td:last-child { color: var(--brand-ink); }
  .offer-summary small { display: block; color: var(--ink-2); font-size: 12px; }
  .offer-summary + .sheet-preview { margin-block-start: 8px; }
  .preview-summary .offer-summary { margin: 0; }
}
@media (max-height: 520px) {
  .sheet-dialog[open] { display: block; overflow: auto; }
  .sheet-dialog .preview-toolbar { position: sticky; top: 0; z-index: 1; background: white; }
}
