/* Shared in-page notices. All text stays readable; no image/font/network dependency. */
.toast {
  --notice-ink: #245546;
  --notice-tint: #edf4e8;
  --notice-line: #cbddcd;
  position: fixed;
  inset-inline: 0;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(440px, calc(100% - 24px));
  max-height: min(42dvh, 280px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 12px;
  padding: 15px 12px 15px 16px;
  border: 1px solid var(--notice-line);
  border-inline-start: 4px solid var(--notice-ink);
  border-radius: 22px 10px 22px 22px;
  background: #fffdf8;
  color: #263f39;
  box-shadow: 0 12px 36px #163c3026, 0 2px 6px #163c3010;
  z-index: 2100;
  text-align: start;
  line-height: 1.7;
  isolation: isolate;
  animation: notice-arrive 220ms ease-out both;
}
.toast[hidden] { display: none; }
.toast::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 116px;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(ellipse at top, var(--notice-tint), transparent 74%);
  z-index: -1;
  pointer-events: none;
}
.toast-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--notice-ink);
  background: var(--notice-tint);
  border: 1px solid var(--notice-line);
  border-radius: 15px 8px 15px 8px;
}
.toast-symbol .icon { width: 22px; height: 22px; stroke-width: 2; }
.toast-copy { min-width: 0; max-height: calc(min(42dvh, 280px) - 32px); overflow: auto; overflow-wrap: anywhere; }
.toast-copy strong { display: block; font-size: .86rem; color: var(--notice-ink); margin-bottom: 3px; }
.toast-copy p { margin: 0; font-size: .86rem; white-space: pre-line; }
.toast-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #53675f;
}
.toast-close:hover, .toast-close:focus-visible { background: var(--notice-tint); }
.toast-close .icon { width: 18px; height: 18px; }
.toast[data-tone="info"] { --notice-ink: #345b78; --notice-tint: #eaf2f7; --notice-line: #cddde7; }
.toast[data-tone="warning"] { --notice-ink: #815319; --notice-tint: #fff2d9; --notice-line: #e8d4b4; }
.toast[data-tone="error"] { --notice-ink: #914431; --notice-tint: #fbece5; --notice-line: #ebcbbf; }
[data-visual-style="PLAYFUL"] .toast { border-radius: 18px; box-shadow: 4px 5px 0 var(--notice-line), 0 12px 30px #392f541c; }
[data-visual-style="PLAYFUL"] .toast-symbol { border-radius: 40% 55% 38% 50%; transform: rotate(-5deg); }
[data-visual-style="PLAYFUL"] .toast-symbol .icon { transform: rotate(5deg); }
[data-visual-style="QUIET"] .toast { border-radius: 12px; background: #fff; box-shadow: 0 6px 24px #22333b1c; }
[data-visual-style="QUIET"] .toast::before { display: none; }
[data-visual-style="QUIET"] .toast-symbol { border-radius: 50%; border: 0; }
@keyframes notice-arrive { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 700px) {
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); gap: 9px; padding: 12px 10px; grid-template-columns: 36px minmax(0, 1fr) 40px; }
  .toast-symbol { width: 36px; height: 38px; }
  dialog > .toast { bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (forced-colors: active) { .toast, .toast-symbol { border: 1px solid CanvasText; } }
