.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(61, 40, 23, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 998;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--paper);
  border-radius: 24px;
  padding: 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border: 2px solid var(--cream-dark);
}
.modal-title {
  font-family: 'Klee One', serif;
  font-size: 20px;
  margin-bottom: 6px;
}
.modal-subtitle {
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 18px;
}
.pin-input {
  font-family: 'Klee One', serif;
  font-size: 28px;
  font-weight: 600;
  padding: 12px;
  border: 2px solid var(--cream-dark);
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  width: 100%;
  text-align: center;
  letter-spacing: 0.4em;
  outline: none;
  margin-bottom: 14px;
}
.pin-input:focus { border-color: var(--gold); }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--ink);
  color: var(--cream);
  padding: 14px 24px;
  border-radius: 16px;
  font-family: 'Klee One', serif;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast .toast-emoji { font-size: 24px; }

.star-burst {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  font-size: 48px;
  animation: burst 1.5s ease-out forwards;
}
@keyframes burst {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.5) rotate(180deg); opacity: 1; }
  100% { transform: scale(2) rotate(360deg) translateY(-100px); opacity: 0; }
}
