:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #5c564c;
  --paper: #f4f1ea;
  --card: #fffdf8;
  --line: #d9d2c5;
  --green: #0f6e56;
  --warn: #8a4b08;
  --bad: #8d1d1d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.45 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--green); }
button, .button, input, select {
  font: inherit;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
nav { display: flex; gap: 1rem; align-items: center; }
nav form { margin: 0; }
main { padding: 1.25rem; max-width: 1100px; }
.card, table {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.card { padding: 1rem 1.1rem; margin: 0.75rem 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.toolbar, .inline { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.inline { display: inline; }
button, .button {
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  cursor: pointer;
}
button[type="submit"] { margin-top: 0.4rem; }
label { display: block; margin: 0.4rem 0; }
.muted { color: var(--muted); }
.warn { color: var(--warn); margin-left: 0.4rem; }
.error { color: var(--bad); }
.notice { color: var(--green); }
.plain { list-style: none; padding: 0; }
.crumbs { color: var(--muted); }
#viewer { min-height: 240px; background: #e7e1d6; border-radius: 8px; position: relative; }
#viewer canvas { width: 100%; height: 480px; display: block; background:
  linear-gradient(45deg, #d9d3c8 25%, transparent 25%),
  linear-gradient(-45deg, #d9d3c8 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, #d9d3c8 75%),
  linear-gradient(-45deg, transparent 75%, #d9d3c8 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.viewer-bar { display: flex; gap: 1rem; padding: 0.5rem; }
.missing { color: var(--warn); }
