/* Shared content insets keep form text and controls clear of decorative frames.
   Loaded after theme skins: theme changes must not move the form's content edge. */
.theme-scene-page .calendar-main.editor-main {
  width: min(100% - 2rem, 52rem);
}

.theme-scene-page .calendar-panel.event-editor,
.theme-scene-page .calendar-panel.invitation-detail,
.theme-scene-page .account-card {
  padding: 2rem clamp(1.5rem, 4vw, 2rem);
  overflow-wrap: anywhere;
}

/* Corner ornaments extend farther inward than the straight side lace. */
.theme-scene-page .calendar-panel.event-editor,
.theme-scene-page .calendar-panel.invitation-detail {
  padding-block: clamp(3rem, 4.5vw, 3.5rem);
}

.invitation-detail > *,
.invitation-detail :is(.selected-event, .participant-list li, .cancelled-invitation) > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.invitation-detail :is(h1, p, a, button, .event-meta) { overflow-wrap: anywhere; }
.invitation-detail .cancel-button { display: inline-flex; align-items: center; min-height: 44px; }

/* A secondary close control beside the date, separate from day actions. */
html[data-theme] .day-sheet .day-sheet-heading {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
html[data-theme] .day-sheet-heading h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
html[data-theme] .day-sheet .day-sheet-close {
  flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px;
  margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent;
  color: inherit; box-shadow: none; font: 400 1.75rem/1 system-ui; cursor: pointer;
}
html[data-theme] .day-sheet .day-sheet-close:focus-visible {
  outline: 2px solid currentColor; outline-offset: 2px;
}
.day-sheet-navigation { margin: .25rem 0 .75rem; }
.day-sheet-navigation a { display: inline-flex; align-items: center; min-height: 44px; }

.event-editor .editor-heading-row > div {
  min-width: 0;
}

.event-editor .form-actions {
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .theme-scene-page .calendar-main.editor-main {
    width: min(100% - 1rem, 42rem);
  }
}
