/* A page in a panel: right-hand drawer on a computer, a sheet from the bottom on a phone.
   Opened by js/page-sheet.js from any link with data-page-sheet. The link keeps its href. */
.page-sheet {
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  width: min(40rem, 100%);
  height: 100%;
  max-height: 100%;
  max-width: none;
  background: #F4F2ED;
  color: var(--ink, #1E085D);
  box-shadow: -16px 0 40px rgba(30, 8, 93, .28);
  display: none;
}
.page-sheet[open] { display: flex; flex-direction: column; animation: page-sheet-in .28s ease; }
.page-sheet::backdrop { background: rgba(30, 8, 93, .45); }
.page-sheet-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #FDFCFA;
  border-bottom: 1px solid var(--warm-border, #DAD2CE);
}
.page-sheet-title { margin: 0; font-family: 'Lexend', 'DM Sans', sans-serif; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.page-sheet-close { flex-shrink: 0; min-height: 2.75rem; padding: 0.4rem 1rem; }
.page-sheet-status { margin: 1rem; font-size: 1rem; }
.page-sheet-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: #F4F2ED; }
.page-sheet-foot {
  flex: none;
  margin: 0;
  padding: 0.75rem 1rem;
  background: #FDFCFA;
  border-top: 1px solid var(--warm-border, #DAD2CE);
}
.page-sheet-full { font-weight: 700; }
@keyframes page-sheet-in { from { transform: translateX(1.5rem); } to { transform: none; } }
@media (max-width: 40em) {
  .page-sheet {
    width: 100%;
    height: min(88dvh, 100%);
    max-height: 88dvh;
    margin: auto 0 0;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -12px 40px rgba(30, 8, 93, .28);
  }
  @keyframes page-sheet-in { from { transform: translateY(1.5rem); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .page-sheet[open] { animation: none; }
}

.mem-callout {
  margin-top: 1.25rem;
  max-width: 42rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  background: #FBF6DA;
  border: 1px solid #E4D48A;
}
.mem-callout p { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: #1E085D; }
.mem-note { margin: 1.25rem 0 0; max-width: 42rem; font-size: 0.9375rem; line-height: 1.5; color: #5C6168; }
.mem-cross { display: none; margin: 1.5rem 0 0; font-size: 1.0625rem; line-height: 1.5; }
.mem-cross a { font-weight: 700; }
body.mem-alt .mem-cross--alt,
body.mem-help .mem-cross--help { display: block; }
#mem-prompt { max-height: 16rem; overflow: auto; }
