.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-sheet {
  width: 100%;
  max-width: 540px;
  max-height: 90dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #131c31;
  border-top: 1px solid var(--border-highlight);
  border-radius: 28px 28px 0 0;
  padding: 22px 20px calc(var(--safe-bottom) + 24px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.hidden .modal-sheet {
  transform: translateY(100%);
}

@media (min-width: 600px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
  .modal-sheet {
    border-radius: 26px;
    border: 1px solid var(--border-highlight);
    padding: 24px;
  }
}

.sheet-handle {
  width: 42px;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  margin: 0 auto 16px;
}

.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-error {
  border-color: rgba(244, 63, 94, 0.55);
  color: #fecdd3;
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.55);
  color: #a7f3d0;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
