html { scrollbar-gutter: stable; }
html:has(.planner-modal[open]) { overflow: hidden; }

.planner-modal {
  box-sizing: border-box;
  color: inherit;
  overscroll-behavior: contain;
}
.planner-modal:not([open]), .planner-modal[hidden] { display: none !important; }
.planner-modal::backdrop { background: rgb(18 35 31 / .46); backdrop-filter: blur(2px); }
.planner-modal:where([data-modal-viewport]) {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 20px;
  border: 0;
  background: transparent;
}
.planner-modal [data-modal-close] { flex-shrink: 0; }

.planner-modal-confirm {
  width: min(28rem, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 18px 20px;
  background: var(--surface, var(--bg-elevated, #fff));
  border: 1px solid var(--line, var(--border, #d9e2dd));
  border-radius: 12px;
}
.planner-modal-confirm h2 { margin: 0 0 8px; font-size: 16px; }
.planner-modal-confirm p { margin: 0; overflow-wrap: anywhere; }
.planner-modal-confirm footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.planner-modal-confirm button {
  padding: 6px 12px;
  color: inherit;
  background: var(--surface-alt, var(--bg-soft, #f5f7f6));
  border: 1px solid var(--line, var(--border, #d9e2dd));
  border-radius: 7px;
  font: inherit;
  cursor: pointer;
}
.planner-modal-confirm button[type="submit"] { background: var(--brand, #365fcc); border-color: transparent; color: #fff; }
.planner-modal-confirm button.is-danger { background: #a72b40; }
