:root {
  --ink: #1f1d1a;
  --muted: #6c675f;
  --line: #dfddd6;
  --accent: #2f46c8;
  --paper: #f7f7f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.page h1 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.page p {
  color: var(--muted);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  padding: 0.55rem 1rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.btn:focus-visible,
.toast__close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(360px, calc(100vw - 2rem));
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem 0.8rem 1rem;
  color: #fff;
  background: #2b3040;
  border-left: 4px solid #8fa2ff;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 18, 24, 0.25);
  animation: toast-in 0.25s ease-out;
}

.toast--success {
  border-left-color: #5cc98a;
}

.toast--error {
  border-left-color: #ff7a80;
}

.toast__close {
  padding: 0 0.4rem;
  font-size: 1.3rem;
  line-height: 1;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}
