dialog.section-popup {
  box-sizing: border-box;
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 1090;
  margin: 0;
  width: min(760px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 20px;
  overflow: auto;
  border: 1px solid #ccd9d4;
  border-radius: 14px;
  background: white;
  color: #172b24;
  box-shadow: 0 24px 80px #102b2259;
}
dialog.section-popup::backdrop { background: #102b2270; }
.section-popup-title { margin: 0 0 16px; font-size: 1.2rem; overflow-wrap: anywhere; }
.section-popup-body { min-width: 0; overflow-wrap: anywhere; }
.section-popup > footer { display: flex; justify-content: flex-end; margin-top: 18px; }
.section-popup-close {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  padding: 8px 16px;
  background: #eaf1ed;
  color: #274439;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.section-popup-movable > .section-popup-title { cursor: move; touch-action: none; user-select: none; }

/* Give bookkeeping decisions room even when the group was opened from the
   notice window; on phones stack the fields instead of clipping table cells. */
.bookkeeping-notice-group > dialog.section-popup {
  width: min(1100px, calc(100vw - 24px));
}
@media (max-width: 760px) {
  .bookkeeping-notice-group .section-popup .table-wrap { overflow: visible; }
  .bookkeeping-notice-group .section-popup table,
  .bookkeeping-notice-group .section-popup tbody,
  .bookkeeping-notice-group .section-popup tr,
  .bookkeeping-notice-group .section-popup td { display: block; width: 100%; }
  .bookkeeping-notice-group .section-popup thead { display: none; }
  .bookkeeping-notice-group .section-popup tr { border-bottom: 1px solid #ccd9d4; padding: 8px 0; }
  .bookkeeping-notice-group .section-popup td { box-sizing: border-box; padding: 6px 0; }
  .bookkeeping-notice-group .section-popup select,
  .bookkeeping-notice-group .section-popup textarea { width: 100%; min-width: 0; }
}
