* { box-sizing: border-box; min-width: 0; }
html { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root { --app-on-brand: var(--surface-2); --app-coral-ink: var(--coral-700); }
:root[data-theme="dark"] { --app-on-brand: var(--ink); --app-coral-ink: var(--coral-400); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --app-on-brand: var(--ink); --app-coral-ink: var(--coral-400); }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: var(--leading-snug); }
.display { font-family: var(--font-display); }
.numeric { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.stack { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
.cluster { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.card {
  background: var(--surface);
  border: calc(var(--s1) / 4) solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  padding: var(--s5);
  min-width: 0;
}
button.card { text-align: left; width: 100%; }
.btn {
  align-items: center;
  background: var(--froyo);
  border: 0;
  border-radius: var(--r-pill);
  color: var(--app-on-brand);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: var(--s2);
  justify-content: center;
  min-height: var(--s12);
  padding: var(--s3) var(--s6);
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur) var(--ease);
}
.btn:hover { box-shadow: var(--shadow-md); transform: translateY(calc(var(--s1) / -2)); }
.btn:active { transform: scale(.98); }
.btn.glow { background: var(--glow-gradient); box-shadow: var(--glow-magenta); }
.btn.coral { background: var(--coral); box-shadow: var(--glow-coral); }
.btn.ghost { background: transparent; border: calc(var(--s1) / 2) solid var(--froyo); color: var(--froyo); }
.btn.quiet { background: var(--green-100); color: var(--froyo); }
.btn.danger { background: var(--danger); }
.btn.small { min-height: var(--s10); padding: var(--s2) var(--s4); font-size: var(--text-sm); }
.btn.block { width: 100%; }
.btn:disabled { box-shadow: none; cursor: not-allowed; opacity: .6; transform: none; }
.icon-btn {
  background: var(--surface);
  border: calc(var(--s1) / 4) solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  min-height: var(--s10);
  min-width: var(--s10);
  place-items: center;
}
.field { display: grid; gap: var(--s2); }
.field label { color: var(--muted); font-size: var(--text-sm); font-weight: 700; }
input, select, textarea {
  background: var(--surface-2);
  border: calc(var(--s1) / 4) solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  min-height: var(--s12);
  padding: var(--s3) var(--s4);
  width: 100%;
}
textarea { min-height: var(--s20); resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--froyo); outline: 0; }
:focus-visible { outline: calc(var(--s1) / 2) solid var(--froyo); outline-offset: var(--s1); }
.pill {
  align-items: center;
  background: var(--green-100);
  border-radius: var(--r-pill);
  color: var(--froyo);
  display: inline-flex;
  font-size: var(--text-sm);
  font-weight: 700;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
}
.pill.coral { background: var(--coral-100); color: var(--app-coral-ink); }
.empty { color: var(--muted); padding: var(--s12) var(--s4); text-align: center; }
.toast {
  background: var(--ink);
  border-radius: var(--r-pill);
  bottom: var(--s20);
  box-shadow: var(--shadow-lg);
  color: var(--paper);
  left: 50%;
  max-width: calc(100% - var(--s8));
  padding: var(--s3) var(--s5);
  position: fixed;
  transform: translateX(-50%);
  z-index: 100;
}
.hidden { display: none !important; }
p, h1, h2, h3, small, strong { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
