:root { color-scheme: light dark; --bg: #fbfaf8; --surface: #ffffff; --border: #e4e0d8;
  --text: #1d1b18; --muted: #6d675d; --accent: #7a5c2e; --chip: #f1ede4; --danger: #a8321f; }
@media (prefers-color-scheme: dark) { :root { --bg: #16151a; --surface: #1e1d23;
  --border: #32303a; --text: #ece9e4; --muted: #9c968c; --accent: #d9b071; --chip: #2a2831; --danger: #e5826f; } }

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/24px system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
h1 { font-size: 24px; line-height: 32px; margin: 0 0 16px; }
.muted { color: var(--muted); }

.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 8px 24px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 600; color: var(--text); text-decoration: none; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.topbar nav a { padding: 8px 12px; border-radius: 4px; color: var(--muted); text-decoration: none;
  transition: color 120ms, background-color 120ms; }
.topbar nav a:hover { color: var(--text); background: var(--chip); }
.topbar nav a[aria-current="page"] { color: var(--accent); background: var(--chip); }

.page { padding: 24px; }
.notice { margin: 0 0 16px; padding: 8px 16px; background: var(--chip);
  border: 1px solid var(--border); border-radius: 6px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 24px; }

label { display: block; font-size: 13px; line-height: 16px; margin: 0 0 4px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  display: block; width: 100%; min-height: 40px; padding: 8px 12px; margin: 0 0 16px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 4px;
  font: inherit; transition: border-color 120ms; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-error { margin: -12px 0 16px; font-size: 13px; line-height: 16px; color: var(--danger); }
.btn { min-height: 40px; padding: 8px 16px; background: var(--accent); color: var(--surface);
  border: 1px solid var(--accent); border-radius: 4px; font: inherit; cursor: pointer;
  transition: background-color 120ms, border-color 120ms; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: none; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--chip); filter: none; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 13px; line-height: 16px; color: var(--muted); font-weight: 400; }

.guest { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.guest .card { width: 100%; max-width: 400px; }
.guest h1 { text-align: center; }

/* Entries page (task 4) */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 16px; margin: 0 0 24px; }
.filters input, .filters select { margin: 0; }
.day h2 { font-size: 13px; line-height: 16px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin: 24px 0 8px; }
.entry { margin: 0 0 16px; }
.entry h3 { font-size: 16px; line-height: 24px; margin: 0; }
.entry .meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 4px 0 16px; font-size: 13px; }
.chip { padding: 0 8px; border-radius: 999px; background: var(--chip); color: var(--accent); }
.entry .body { max-width: 72ch; margin: 0 0 8px; }
.entry .body p { margin: 0 0 8px; }
.empty { padding: 40px 16px; text-align: center; border: 1px dashed var(--border); border-radius: 6px; }

form.inline { display: inline; }
