/* ═══ 16. MODALS / TOAST ═════════════════════════════════════════════ */

.scrim {
  position: absolute; inset: 0;
  background: var(--scrim);
  /* Blur the app behind the modal, not just darken it. */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 50;
}
/* Backdrop fades with the modal instead of snapping in on the display:none →
   flex toggle — the hard cut was most visible on mobile once the sheet below
   started sliding in on its own beat. display:none → flex always restarts
   this (same mechanism the popover entrances rely on), so it replays
   correctly on every open with no JS changes. */
@keyframes scrim-in { from { opacity: 0; } }
@keyframes scrim-out { to { opacity: 0; } }
.scrim.open { display: flex; animation: scrim-in var(--dur-fast) ease; }
.scrim.closing { animation: scrim-out var(--dur-fast) ease forwards; }
.modal {
  background: var(--panel-bg);
  border-radius: var(--radius-md);
  width: 420px; max-width: calc(100% - 80px);
  max-height: 82%;
  display: flex; flex-direction: column;
  animation: modal-in var(--dur-base) ease-out;
}
.scrim.closing .modal { animation: modal-out var(--dur-fast) ease forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(6px) scale(.99); } }
.modal-full { width: 720px; height: 82%; max-height: 82%; }
.modal-confirm { width: 360px; }
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line-strong);
}
.modal-head h3 { font-size: var(--text-lg); font-weight: 400; letter-spacing: .2px; flex: 1; }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; min-height: 0; line-height: var(--lh-body); }
.modal-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
}
.foot-spacer { flex: 1; }
.frow {
  display: grid; grid-template-columns: 130px 1fr;
  align-items: center; gap: 12px;
  margin-bottom: 11px;
}
.frow label { font-size: var(--text-sm); color: var(--ink-soft); }
.frow-tall { align-items: start; }
.frow-tall label { padding-top: 6px; }

/* Locked "SR-" prefix: the field only ever collects the digits. */
.prefixed-input {
  display: flex; align-items: center;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.prefixed-input:hover { border-color: var(--fg); background: var(--hover-bg); }
.prefixed-input .prefix {
  padding: 5px 0 5px 8px;
  color: var(--ink-faint);
  user-select: none;
}
.prefixed-input input {
  flex: 1; min-width: 0;
  border: none; background: transparent;
  padding: 5px 8px 5px 2px;
}
.prefixed-input input:hover { background: transparent; }

.toast {
  position: absolute;
  left: 50%; bottom: 34px;
  transform: translate(-50%, 12px);
  background: var(--fg); color: var(--bg);
  border-radius: var(--radius-md);
  padding: 9px 18px;
  font-size: var(--text-base);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) ease-out, transform var(--dur-base) ease-out;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ═══ 17. CREDIT ═════════════════════════════════════════════════════ */

.credit {
  position: absolute;
  /* abspos containing block is #artboard's PADDING box (outer edge at 0), so
     to line up with content (logo, headings — which sit inside the content
     box after the padding) the offset must equal the padding itself. */
  left: var(--ab-pad-x); bottom: 22px;
  font-size: var(--text-sm); color: var(--ink-faint);
  letter-spacing: .2px;
}

