:root {
  --bg: #f5f4f0;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --line: #e3e1dc;
  --accent: #c2410c;
  --ok: #15803d;
  --err: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; font-size: 17px; text-decoration: none; color: var(--text); }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav a { color: var(--accent); text-decoration: none; }
.me { color: var(--muted); }

main { max-width: 940px; margin: 0 auto; padding: 24px; }

h1.day { font-size: 22px; margin: 0 0 20px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.count { color: var(--text); background: var(--bg); border-radius: 10px; padding: 1px 8px; font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.card.narrow { max-width: 380px; margin: 48px auto; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 720px) { .columns { grid-template-columns: 1fr; } }

label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
input, select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

button {
  font: inherit;
  padding: 8px 16px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
button.link { background: none; color: var(--muted); padding: 8px 4px; text-decoration: underline; }
form { margin: 0; }

.choice { display: flex; gap: 20px; margin-bottom: 14px; }
.radio { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 15px; }
.radio input { width: auto; margin: 0; }
.fields { display: flex; gap: 16px; flex-wrap: wrap; }
.fields label { flex: 0 0 150px; }
.fields label.grow { flex: 1 1 240px; }
.actions { display: flex; align-items: center; gap: 12px; }
.inline-form { display: flex; gap: 12px; align-items: center; }
.inline-form input { margin: 0; }

.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.people .time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); min-width: 46px; }
.people .with, .people .comment { color: var(--muted); font-size: 13px; }
.people.muted .name { color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
th, td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }

.hint { color: var(--muted); font-size: 13px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--card); }
.flash-success { color: var(--ok); border-color: #bbf7d0; background: #f0fdf4; }
.flash-error { color: var(--err); border-color: #fecaca; background: #fef2f2; }

.row-actions { display: flex; gap: 12px; align-items: center; }

.suggestion { border-left: 4px solid var(--accent); }
.suggestion.ok { border-left-color: var(--ok); }
.suggestion .headline { margin: 0 0 4px; font-size: 18px; }
.suggestion .headline strong { font-variant-numeric: tabular-nums; }
.suggestion p:last-child { margin-bottom: 0; }
.people .time { min-width: 108px; }
.suggestion .pending { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.options { list-style: none; margin: 0 0 20px; padding: 0; }
.options li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.options li:last-child { border-bottom: 0; }
.options li.chosen { background: #f0fdf4; border-radius: 8px; padding-left: 10px; padding-right: 10px; }
.option-body { flex: 1; }
.option-body .title { font-weight: 600; }
.option-body .comment { color: var(--muted); }
.option-body .hint { margin-top: 2px; }
.vote {
  min-width: 56px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.vote.voted { background: var(--ok); border-color: var(--ok); color: #fff; }
.badge { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--bg); color: var(--muted); }
.badge-order { background: #fff7ed; color: var(--accent); }
.option-form { border-top: 1px solid var(--line); padding-top: 16px; }
.option-form .choice { margin-bottom: 10px; }

.narrow-form { max-width: 620px; }
.topbar a.me { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }
.topbar a.me:hover { color: var(--text); }
.reset-link { margin-top: 6px; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand img { display: block; border-radius: 5px; }
