:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f2ea;
  color: #17140f;
}

body {
  margin: 0;
}

main {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(40, 36, 28, 0.18);
  padding: 12px 16px;
}

header p {
  margin: 0;
  color: #7a5f2d;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0 auto 0 0;
  font-size: 20px;
}

button {
  border: 1px solid rgba(40, 36, 28, 0.2);
  border-radius: 6px;
  background: #fff8ec;
  color: inherit;
  padding: 6px 10px;
}

.layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
}

aside {
  border-right: 1px solid rgba(40, 36, 28, 0.16);
  overflow: auto;
  padding: 16px;
}

section {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

h2 {
  margin: 0 0 12px;
  font-size: 14px;
}

.book-row {
  border: 1px solid rgba(40, 36, 28, 0.16);
  border-radius: 6px;
  margin-bottom: 8px;
  padding: 8px;
}

.book-row strong {
  display: block;
}

.book-row span {
  color: #676052;
  font-size: 12px;
}

textarea {
  flex: 1;
  min-height: 0;
  resize: none;
  border: 1px solid rgba(40, 36, 28, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  padding: 12px;
}

#status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #6c5a2e;
  font-size: 13px;
}

@media (prefers-color-scheme: dark) {
  :root {
    background: #171613;
    color: #f4efe6;
  }

  header,
  aside,
  textarea,
  .book-row,
  button {
    border-color: rgba(235, 220, 190, 0.18);
  }

  button,
  textarea {
    background: rgba(255, 255, 255, 0.06);
  }
}
