.diary-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.diary-modal-frame {
  flex: 1;
  border: 0;
  background: #fff;
  display: block;
}

.diary-modal-close {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  line-height: 36px;
  cursor: pointer;
}
.diary-modal-close:hover { background: rgba(0,0,0,0.9); }

/* Scheduler overlay (Diary Wide View from a Book button): the Scheduler owns the
   top-right corner (collapse / Today / view controls), so drop our × to the
   bottom-right — mirrors the Diary Wide View tile's ✕ Exit. That corner is free
   on the plain diary, but it is where the Scheduler's pop-ups put their MAIN
   button (2026-10-02: "Change appointment"), so .is-busy steps the × aside while
   one is open — every pop-up has its own Done/Cancel. */
.diary-modal-overlay--scheduler .diary-modal-close {
  top: auto;
  bottom: calc(10px + env(safe-area-inset-bottom));
  right: calc(14px + env(safe-area-inset-right));
}
.diary-modal-overlay--scheduler.is-busy .diary-modal-close { display: none; }

.diary-modal-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  padding: 8px 56px 8px 14px;
  background: #fef3c7;
  color: #78350f;
  font-size: 13px;
  border-bottom: 1px solid #fbbf24;
  text-align: center;
}
.diary-modal-banner[hidden] { display: none; }
