:root {
  color-scheme: light;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --paper: #fff;
  --bg: #f5f5f4;
  --brand: #c2410c;
  --ok: #166534;
  --ok-bg: #dcfce7;
  --err: #991b1b;
  --err-bg: #fee2e2;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.45 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: 76px;
}
.top, .tabs, main { max-width: 720px; margin: 0 auto; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 8px;
}
.brand { font-weight: 700; font-size: 20px; }
.who, .hint, small { color: var(--muted); }
.who { font-size: 13px; }
main { padding: 8px 16px 24px; }
h1 { font-size: 22px; margin: 8px 0 12px; }
.card, .row, .tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.card { padding: 16px; }
label { display: block; margin: 12px 0; font-size: 14px; color: var(--muted); }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
button, .primary {
  font: inherit;
}
.primary, .tile, .link, .toolbar button {
  border: 0;
  cursor: pointer;
}
.primary {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.link {
  background: transparent;
  color: var(--brand);
  padding: 8px;
}
.minor { color: var(--brand); text-decoration: none; font-size: 14px; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tile {
  min-height: 112px;
  padding: 14px;
  text-align: left;
}
.tile b { display: block; font-size: 18px; }
.tile.leaf { box-shadow: inset 4px 0 0 var(--brand); }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.toolbar button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  text-decoration: none;
  color: inherit;
}
.row small { display: block; margin-top: 4px; }
.pill {
  flex: none;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: #e7e5e4;
}
.pill.s0 { background: #ffedd5; color: #9a3412; }
.pill.s1 { background: #dbeafe; color: #1d4ed8; }
.pill.s2 { background: var(--ok-bg); color: var(--ok); }
.banner { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.err { background: var(--err-bg); color: var(--err); }
.facts { display: grid; grid-template-columns: 72px 1fr; gap: 8px 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; margin: 0; }
.tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.tabs a {
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  padding: 8px;
  border-radius: 12px;
}
.tabs a.on { color: var(--brand); background: #fff7ed; font-weight: 700; }
