:root {
  --paper: #f3efe6;
  --ink: #1b1914;
  --pine: #1c4a38;
  --pine-deep: #123528;
  --signal: #e4451a;
  --card: #fffdf8;
  --line: #e4dccb;
  --good: #1d7a4a;
  --good-bg: #e7f6ee;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --bad: #9d2c1a;
  --bad-bg: #fdecea;
  --muted: #5e584e;
  color: var(--ink);
  background: var(--paper);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, .brand { font-family: Fraunces, Georgia, serif; font-weight: 560; letter-spacing: -0.03em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 0.4rem; }
h2 { margin: 0 0 0.6rem; font-size: 1.5rem; }
p { margin: 0 0 0.8rem; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--pine);
  color: #f6f3ec;
}
.brand { font-size: 1.6rem; text-decoration: none; }
nav { display: flex; gap: 8px; align-items: center; overflow-x: auto; }
nav a, .nav-out {
  color: #f6f3ec;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
  white-space: nowrap;
}
nav a:hover, .nav-out:hover { background: rgba(255, 255, 255, 0.1); }
.nav-out { border-color: rgba(255, 255, 255, 0.25); }

main { width: min(1080px, calc(100% - 32px)); margin: 28px auto 64px; }
.narrow { width: min(460px, 100%); margin-inline: auto; }
.center { text-align: center; }
.lede, .muted, small { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 650; color: var(--signal); margin-bottom: 0.3rem; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 650; }
input {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
}
.primary, .secondary, .danger, .choice {
  border-radius: 14px;
  padding: 12px 16px;
  min-height: 48px;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary { background: var(--signal); color: white; font-weight: 650; }
.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.danger { background: var(--bad); color: white; }
.choice {
  width: 100%;
  background: var(--card);
  border-color: var(--line);
  display: flex;
  justify-content: space-between;
  text-align: left;
}
.choices { display: grid; gap: 10px; margin: 18px 0; }
.other { margin-top: 8px; }
.card, .qr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(28, 25, 20, 0.05);
}
.qr-card { display: grid; justify-items: center; gap: 8px; }
.qr svg { width: min(280px, 80vw); height: auto; }
.code { font-weight: 650; }
.secret {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
}
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.banner { border-radius: 12px; padding: 12px 14px; }
.banner.good { background: var(--good-bg); color: var(--good); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.tabs { display: flex; gap: 8px; margin: 12px 0 18px; }
.tabs a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: white; }
.tabs a.on { background: var(--pine); color: white; border-color: var(--pine); }
.board { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.board li, .plain li, .people li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}
.board li.mine { outline: 2px solid var(--pine); }
.rank { font-family: Fraunces, Georgia, serif; font-size: 1.4rem; width: 2rem; }
.runs { font-weight: 650; }
.plain, .people { list-style: none; padding: 0; display: grid; gap: 8px; }
.plain li { align-items: center; }
.plain small, .people small, td small { display: block; color: var(--muted); font-weight: 400; }
.desk-head, .desk-grid, .split, .filters { display: grid; gap: 16px; }
.desk-grid { margin-top: 16px; }
.lookup { display: grid; gap: 8px; }
.lookup-hit { width: 100%; text-align: left; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.check { font-weight: 500; font-size: 0.9rem; display: flex; gap: 6px; align-items: center; }
.people li { align-items: flex-start; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
#reader { width: min(100%, 420px); }
#reader video { border-radius: 16px; }

@media (min-width: 800px) {
  .desk-grid, .split { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: repeat(4, 1fr) auto; align-items: end; }
}

@media print {
  .top, .noprint, .actions, form, nav { display: none !important; }
  body, main { background: white; margin: 0; width: auto; }
  .card { box-shadow: none; border: none; }
}
