.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s4); box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin: var(--s5) 0; }
.stack > * + * { margin-top: var(--s4); }

.badge {
  display: inline-block; padding: 2px var(--s2); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 600;
}

.banner {
  padding: var(--s2) var(--s4); text-align: center; font-size: .9rem;
  background: var(--warn); color: #fff;
}

.field { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.field legend, .field label.title { font-weight: 600; }
fieldset.field { border: 0; padding: 0; margin: 0 0 var(--s4); }
.choice { display: flex; align-items: center; gap: var(--s2); min-height: 44px; }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 44px; }

.reader-preview { font-family: var(--font-read); font-size: var(--reader-font-size); line-height: 1.7; }

.toasts {
  position: fixed; z-index: 50; left: var(--s4); right: var(--s4);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--s3));
  display: grid; gap: var(--s2); justify-items: center; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s3);
  max-width: 28rem; padding: var(--s3) var(--s4);
  background: var(--text); color: var(--bg); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.toast button { min-height: 36px; padding: 0 var(--s3); border: 1px solid currentColor; border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; cursor: pointer; }
@media (min-width: 900px) { .toasts { bottom: var(--s5); } }
