body {
  margin: 0;
  font-family: "MS PGothic", "ＭＳ Ｐゴシック", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: #efefef;
  color: #000;
}
a { color: #0000ee; }
a:visited { color: #551a8b; }
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 12px 40px;
}
.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  padding: 4px 12px;
  background: #fff;
  border-bottom: 1px solid #ccc;
  font-size: 14px;
}
.topbar .brand { font-weight: bold; color: #800000; text-decoration: none; }
.menu { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.badge { margin-left: 4px; padding: 0 4px; border: 1px solid #c00; color: #c00; font-size: 12px; }
.board-head {
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px 12px;
  margin-bottom: 12px;
  text-align: center;
}
.board-head h1 { margin: 4px 0; color: #800000; font-size: 26px; }
.desc { margin: 4px 0; font-size: 14px; }
.search { display: flex; justify-content: center; gap: 6px; align-items: center; flex-wrap: wrap; }
.search input { width: 260px; max-width: 70%; }
.button { font-weight: bold; }
.thread-list {
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px 12px;
}
.thread-list ol { margin: 0; padding-left: 2.5em; }
.thread-list li { padding: 3px 0; word-break: break-all; }
.thread-list .count { color: #555; }
.thread-list .date { color: #777; font-size: 13px; margin-left: 6px; white-space: nowrap; }
.note { color: #555; }
.thread-title { color: #ff0000; font-size: 22px; font-weight: normal; margin: 8px 0 12px; word-break: break-all; }
.posts { margin: 0; }
.posts dt { margin-top: 12px; font-size: 15px; word-break: break-all; }
.posts dd {
  margin: 2px 0 0 1.5em;
  white-space: pre-wrap;
  word-break: break-all;
}
.num { font-weight: bold; }
.name { color: #008000; font-weight: bold; }
.anchor { color: #0000ee; }
form.inline { display: inline; margin-left: 8px; }
.post-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
  margin: 12px 0;
  padding: 10px;
  background: #fff;
  border: 1px solid #ccc;
}
.post-form label { display: flex; flex-direction: column; font-size: 14px; }
.post-form input[type="text"], .post-form textarea {
  font: inherit;
  padding: 4px;
  margin-top: 2px;
  border: 1px solid #999;
}
.post-form button { align-self: flex-start; padding: 4px 16px; font-size: 15px; }
button.danger { color: #c00; font-size: 12px; }
form.admin { margin: 20px 0; padding: 8px; border: 1px dashed #c00; background: #fff5f5; }
.confirm { font-size: 13px; margin-right: 8px; }
.closed { color: #c00; font-weight: bold; }
.login-note { background: #fff; border: 1px solid #ccc; padding: 10px; }
.error { color: #c00; }
.error-message { font-weight: bold; }
.footer { text-align: center; font-size: 12px; color: #777; padding: 12px; }

body.theme-dark { background: #1e1e1e; color: #ddd; }
.theme-dark a { color: #8ab4f8; }
.theme-dark a:visited { color: #c58af9; }
.theme-dark .topbar, .theme-dark .board-head, .theme-dark .thread-list,
.theme-dark .post-form, .theme-dark .login-note { background: #2a2a2a; border-color: #444; }
.theme-dark .board-head h1, .theme-dark .topbar .brand { color: #ff8a80; }
.theme-dark .name { color: #5fd35f; }
.theme-dark .thread-title { color: #ff6b6b; }
.theme-dark .thread-list .count, .theme-dark .note { color: #aaa; }
.theme-dark .post-form input[type="text"], .theme-dark .post-form textarea {
  background: #1e1e1e; color: #ddd; border-color: #666;
}
.theme-dark form.admin { background: #3a2020; }

@media (max-width: 600px) {
  body { font-size: 15px; }
  .board-head h1 { font-size: 22px; }
  .posts dd { margin-left: 0.5em; }
  .thread-list ol { padding-left: 2em; }
  .thread-list .date { display: block; margin-left: 0; }
}
