.toast { position: fixed; inset-inline: var(--space-16); bottom: 64px; z-index: 30; max-width: 420px; margin: 0 auto; background: var(--color-error-bg); color: var(--color-error); border-radius: var(--radius-control); padding: var(--space-12) var(--space-16); font-size: 14px; font-weight: 500; text-align: center; box-shadow: var(--shadow-card); }
.toast.success { background: var(--color-success-bg); color: var(--color-success); }

/* Success message in the middle of the screen (see Toast.js). The leaving animation ends just before the element is emptied. */
.ok-pop { position: fixed; inset: 0; z-index: 99; display: none; align-items: center; justify-content: center; pointer-events: none; }
.ok-pop.show { display: flex; }
.ok-pop.with-photo { background: rgba(7, 17, 29, 0.55); animation: ok-fade 0.25s both, ok-out 0.35s ease 2.45s forwards; }
.ok-pop.plain { animation: ok-out 0.35s ease 1.85s forwards; }
.ok-mark { display: grid; place-items: center; flex: none; border-radius: 50%; background: #9ad8bd; color: #0f2b22; }
.ok-mark svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: ok-draw 0.45s ease forwards; }
.ok-photo { position: relative; width: 228px; padding: 10px 10px 14px; border-radius: 5px; background: var(--polaroid, #f4efe6); color: #17222e; text-align: center; box-shadow: 0 22px 44px rgba(0, 0, 0, 0.6); transform: rotate(-2deg); animation: ok-drop 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.ok-tape { position: absolute; top: -11px; left: 50%; z-index: 1; width: 84px; height: 22px; margin-left: -42px; background: rgba(235, 203, 136, 0.9); transform: rotate(-3deg); }
.ok-pic { position: relative; display: grid; place-items: center; height: 150px; border-radius: 2px; background: var(--surface-1); }
.ok-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.ok-emoji { font-size: 64px; }
.ok-pic .ok-mark { position: absolute; left: -24px; bottom: -14px; width: 54px; height: 54px; box-sizing: border-box; border: 3px solid var(--polaroid, #f4efe6); animation: ok-stamp 0.35s cubic-bezier(0.2, 1.5, 0.4, 1) 0.35s both; }
.ok-pic .ok-mark svg { width: 28px; height: 28px; }
.ok-pic .ok-mark svg path { animation-delay: 0.55s; }
.ok-photo > b { display: block; margin-top: 14px; font-size: 20px; font-weight: 600; line-height: 1.25; }
.ok-photo > span:last-child { display: block; font-size: 13px; color: #52606c; overflow-wrap: anywhere; }
.ok-pill { display: flex; align-items: center; min-height: 56px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 8px; border-radius: 999px; background: var(--polaroid, #f4efe6); color: #17222e; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55); animation: ok-pop 0.3s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.ok-pill .ok-mark { width: 40px; height: 40px; }
.ok-pill .ok-mark svg { width: 24px; height: 24px; }
.ok-pill .ok-mark svg path { animation-delay: 0.2s; }
.ok-pill b { display: block; overflow: hidden; max-width: 280px; font-size: 17px; font-weight: 600; white-space: nowrap; animation: ok-grow 0.4s ease 0.35s both; }
.ok-pill i { display: block; padding: 0 12px; font-style: normal; }
@keyframes ok-fade { from { opacity: 0; } }
@keyframes ok-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes ok-pop { from { opacity: 0; transform: scale(0.7); } }
@keyframes ok-drop { from { opacity: 0; transform: translateY(-60px) rotate(-9deg); } }
@keyframes ok-stamp { from { opacity: 0; transform: scale(2.2); } }
@keyframes ok-draw { to { stroke-dashoffset: 0; } }
@keyframes ok-grow { from { max-width: 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ok-pop, .ok-pop * { animation: none !important; }
  .ok-mark svg path { stroke-dashoffset: 0; }
}
