:root {
  color-scheme: light;
  --paper: #f4efe4;
  --paper-2: #fffdf8;
  --ink: #1c2430;
  --muted: #5d6b66;
  --line: #e3d7c4;
  --ivy: #1f6b45;
  --ivy-deep: #143528;
  --clay: #b8612f;
  --danger: #8d2f2f;
  --ok: #1f6b45;
  --shadow: 0 16px 40px rgba(28, 36, 48, 0.08);
  --serif: "Iowan Old Style", Palatino, "Songti SC", "Noto Serif SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(31, 107, 69, 0.16), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(184, 97, 47, 0.12), transparent 24%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}
body:focus { outline: none; }
a { color: var(--ivy-deep); }
button, input, select, textarea { font: inherit; }
button, .tap {
  min-height: 48px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}
button.primary { background: var(--ivy); color: white; }
button.quiet { background: transparent; border-color: var(--line); color: var(--ink); }
button.danger { background: transparent; color: var(--danger); border-color: #e7c4c4; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 2px;
}
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c9bba6;
  border-radius: 12px;
  background: white;
  font-size: 1rem;
}
textarea { min-height: 6rem; resize: vertical; }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--danger); }
label { display: block; font-weight: 650; margin-bottom: 0.25rem; }
.field { margin-bottom: 1rem; }
.hint, .muted { color: var(--muted); }
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.65rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; color: var(--muted); font-weight: 650; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.banner {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #f7e7d8;
}
dialog {
  border: none;
  border-radius: 18px;
  padding: 1.2rem;
  width: min(32rem, calc(100vw - 2rem));
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(20, 53, 40, 0.45); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.toast {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  margin-inline: auto;
  max-width: 36rem;
  padding: 0.8rem 1rem;
  background: var(--ivy-deep);
  color: white;
  border-radius: 12px;
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
