
:root {
  --bg: #f6f7f9;
  --card: #fff;
  --text: #1a1d21;
  --muted: #5c6570;
  --border: #d8dee6;
  --accent: #0b5fff;
  --banner: #fff6e5;
  --banner-border: #f0d9a8;
  --code-bg: #f0f2f5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.site-header { background: var(--card); border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.banner {
  margin: 0;
  padding: 0.65rem 0;
  background: var(--banner);
  border-bottom: 1px solid var(--banner-border);
  font-size: 0.95rem;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; gap: 1rem; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
nav a { margin-left: 1rem; color: var(--accent); }
.prototype { color: #8a5a00; font-size: 0.9rem; margin: 0 0 0.75rem; }
h1 { font-size: 1.6rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.muted { color: var(--muted); }
.breadcrumbs { font-size: 0.95rem; margin-bottom: 1rem; color: var(--muted); }
.breadcrumbs a { color: var(--accent); }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}
.board-list, .topic-list { list-style: none; padding: 0; margin: 0; }
.board-list li, .topic-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}
.board-list a, .topic-list a { color: var(--accent); font-weight: 600; text-decoration: none; }
.board-list a:hover, .topic-list a:hover { text-decoration: underline; }
.meta { font-size: 0.9rem; color: var(--muted); margin-top: 0.25rem; }
.post {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.post-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #eef2f7;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.post-author { font-weight: 700; }
.post-body { padding: 1rem; overflow-wrap: anywhere; }
.post-body pre.code, .post-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
}
.post-body blockquote.quote {
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border-left: 4px solid #9db7e8;
  background: #f3f7fd;
}
.post-body img { max-width: 100%; height: auto; }
.post-body img.inline-attach {
  max-width: min(100%, 720px);
  height: auto;
  display: block;
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}
.attachments {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}
.attachments ul {
  margin: 0.35rem 0 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.attachments li {
  max-width: 280px;
  font-size: 0.92rem;
}
.attachments img.attach-thumb {
  display: block;
  max-width: 260px;
  max-height: 200px;
  width: auto;
  height: auto;
  margin: 0 0 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}
.missing { color: #a33; }
.missing-attach { color: #a33; font-style: italic; }
.search-box { display: flex; gap: 0.5rem; margin: 1rem 0; }
.search-box input[type=search] {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
.search-box button {
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
#search-results .hit {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}
#search-results .hit a { color: var(--accent); font-weight: 600; text-decoration: none; }
.site-footer { margin: 2rem auto 2.5rem; color: var(--muted); font-size: 0.9rem; }
