/* Notices stay legible above the form, the section stack and dialogs. */
#toast {
  position: fixed; inset: max(20px, env(safe-area-inset-top)) 24px auto auto;
  z-index: 20000; display: grid; grid-template-columns: 28px minmax(0, 1fr) 44px;
  gap: 12px; align-items: start; width: min(460px, calc(100vw - 48px)); max-width: none;
  padding: 18px 12px 18px 20px; border: 1px solid #b5afc8; border-left: 4px solid #685785;
  border-radius: 14px; background: #fff; color: #161616;
  box-shadow: 0 8px 28px #0000001f; font-size: 16px; line-height: 1.45; /* taste-skill-ignore: actual floating notice needs separation from the underlying form. */
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}
#toast[hidden] { display: none; }
#toast.show { opacity: 1; transform: none; pointer-events: auto; }
#toast[data-kind="error"] { border-color: #bd5965; border-left-color: #ac2336; }
#toast[data-kind="success"] { border-color: #81a18f; border-left-color: #246347; }
.feedback-icon { font-size: 22px; line-height: 28px; text-align: center; font-weight: 600; color: #685785; }
.feedback-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-kind="error"] .feedback-icon { color: #ac2336; }
[data-kind="success"] .feedback-icon { color: #246347; }
.feedback-content { display: grid; gap: 4px; min-width: 0; max-height: 50svh; overflow: auto; overflow-wrap: anywhere; }
.feedback-content strong { font-size: 17px; line-height: 1.4; font-weight: 600; }
#toast .feedback-close {
  display: grid; place-items: center; width: 44px; height: 44px; margin: -8px 0 0;
  padding: 0; border: 0; border-radius: 8px; background: transparent;
  color: #161616; font: 28px/1 Arial, sans-serif; cursor: pointer;
}
#toast .feedback-close:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
@media (hover:hover) { #toast .feedback-close:hover { background: #eeeaf5; } }
.field-feedback, .auth-message, .map-keyword-error {
  margin: 10px 0 0; padding: 12px 16px; border: 0; border-left: 3px solid #ac2336;
  border-radius: 0 8px 8px 0; background: #fff0f2; color: #831a2a;
  font-size: 16px; font-weight: 450; line-height: 1.5; overflow-wrap: anywhere;
}
.field-feedback[hidden], .auth-message[hidden], .map-keyword-error[hidden] { display: none; }
.auth-message.success { background: #edf6f0; color: #20533c; border-color: #246347; }
input.field-error, textarea.field-error { border: 2px solid #ac2336 !important; box-shadow: none !important; } /* taste-skill-ignore: removes inherited shadow. */
input.field-error:focus, textarea.field-error:focus { outline: 3px solid #ac233633; outline-offset: 2px; }
@media (max-width:640px) {
  #toast { inset: max(12px, env(safe-area-inset-top)) 12px auto 12px; width: auto; gap: 8px; padding: 16px 8px 16px 12px; grid-template-columns: 24px minmax(0,1fr) 44px; }
  .field-feedback, .auth-message, .map-keyword-error { padding: 12px; }
}
@media (prefers-reduced-motion:reduce) { #toast { transition: none; transform: none; } }
