* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans CJK JP", sans-serif;
  color: #222;
  background: #fafafa;
  line-height: 1.5;
}
.container { max-width: 900px; margin: 0 auto; padding: 0 1rem; }

.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.site-title { font-weight: 700; text-decoration: none; color: #222; }
.site-header nav { display: flex; gap: 1rem; align-items: center; }
.site-header nav a { text-decoration: none; color: #0366d6; }
.user-info { color: #666; font-size: 0.9rem; }

.inline-form { display: inline; margin: 0; }
.link-button {
  background: none; border: none; padding: 0;
  color: #0366d6; cursor: pointer; font: inherit;
}

main.container { padding-top: 2rem; padding-bottom: 3rem; }

h1 { margin-top: 0; }

.form { display: flex; flex-direction: column; gap: 1rem; max-width: 360px; }
.form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; color: #333; }
.form input {
  padding: 0.5rem; font-size: 1rem;
  border: 1px solid #ccc; border-radius: 4px;
}
.form button {
  padding: 0.6rem 1rem; font-size: 1rem;
  background: #0366d6; color: #fff; border: none; border-radius: 4px;
  cursor: pointer;
}
.form button:hover { background: #024ea4; }

.error {
  background: #fde2e1; color: #8a1f1c;
  padding: 0.75rem 1rem; border-radius: 4px;
  margin-bottom: 1rem; max-width: 360px;
}

.site-footer { border-top: 1px solid #e5e5e5; margin-top: 2rem; padding: 1rem 0; color: #888; }

/* Page header with action button */
.page-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.button, a.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #0366d6; color: #fff;
  text-decoration: none; border-radius: 4px;
  border: none; font: inherit; cursor: pointer;
}
.button:hover, a.button:hover { background: #024ea4; }

.form.wide { max-width: 560px; }
.form textarea {
  padding: 0.5rem; font-size: 1rem;
  border: 1px solid #ccc; border-radius: 4px;
  font-family: inherit;
}
.form select {
  padding: 0.5rem; font-size: 1rem;
  border: 1px solid #ccc; border-radius: 4px;
  background: #fff;
}
.form small { color: #888; font-size: 0.8rem; }
.form .req { color: #c00; }
.form-actions { display: flex; gap: 1rem; align-items: center; }
.hint { color: #666; font-size: 0.95rem; margin-top: -0.5rem; }

/* Book list */
.book-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}
.book-card a {
  display: block; text-decoration: none; color: inherit;
}
.book-cover {
  display: block; width: 100%; aspect-ratio: 2/3;
  object-fit: cover; border-radius: 4px;
  background: #e5e5e5;
}
.book-cover.placeholder { background: linear-gradient(135deg,#e5e5e5,#cfcfcf); }
.book-cover.large { width: 220px; }
.book-meta { margin-top: 0.5rem; }
.book-title { font-weight: 600; }
.book-lang { color: #888; font-size: 0.85rem; }

/* Book show */
.book-show { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.book-show-cover { flex-shrink: 0; }
.book-show-info { flex: 1; min-width: 280px; }
.book-meta-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; }
.book-meta-list dt { color: #888; font-size: 0.9rem; }
.book-meta-list dd { margin: 0; }
.other-editions { margin-top: 1.5rem; }
.other-editions h2 { font-size: 1.1rem; }
.other-editions ul { list-style: none; padding: 0; }
.other-editions li { padding: 0.25rem 0; }

/* Status banner */
.banner {
  padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem;
}
.banner-pending { background: #fff4d1; color: #6b5000; }
.banner-rejected { background: #fde2e1; color: #8a1f1c; }
