:root {
  --bg: #0b0b0b;
  --paper: #141414;
  --ink: #e7e1d4;
  --muted: #a89d87;
  --accent: #a02a2a;
  --border: #3a3226;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Tahoma", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.3)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 4px),
    var(--bg);
}
.site-header {
  background: linear-gradient(180deg, #0b0b0b 0%, #1c1c1c 100%);
  color: #f6efe0;
  border-bottom: 4px solid var(--accent);
}
.header-inner, .container, .site-footer {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}
.header-inner { padding: 1rem 0 1.2rem; }
.brand {
  display: inline-block;
  text-decoration: none;
  color: #f5e8c8;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000, 0 0 14px rgba(160, 42, 42, 0.35);
  line-height: 1;
  margin-bottom: 0.45rem;
}
.subtitle {
  margin: 0.35rem 0 0.9rem;
  color: #d5c8ac;
}
.search-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid #4b4032;
  background: #fff9ef;
  color: #111;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
}
.search-box button {
  border: 1px solid #761b1b;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  cursor: pointer;
}
.quick-links { margin: 0.5rem 0 0; }
.quick-links a { color: #d8c6a3; text-decoration: underline; }
.search-results {
  margin-top: 0.6rem;
  border: 1px solid #4f4538;
  background: #1f1f1f;
  border-radius: 8px;
  max-height: 360px;
  overflow: auto;
}
.search-item {
  display: block;
  text-decoration: none;
  color: #efe3c8;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #353535;
}
.search-item:last-child { border-bottom: none; }
.search-item strong { color: #fff; }
.search-item small { color: #c6b79b; display: block; margin-top: 0.2rem; }
.container { padding: 1.2rem 0 2rem; }
.hero {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #181818, #111111);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.tech-note {
  margin-top: 1rem;
  border: 1px dashed #4b4032;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  color: #948b79;
  font-size: 0.9rem;
}
.tech-note h2 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #a79e8b;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.stats span {
  background: #1e1e1e;
  border: 1px solid #433827;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.9rem;
}
.card {
  margin-top: 1rem;
  border: 1px solid var(--border);
  background: var(--paper);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.board-row {
  border-top: 1px dashed #c9baa0;
  padding: 0.75rem 0;
}
.board-row:first-child { border-top: 0; }
.board-link {
  color: #efe6d1;
  font-weight: 700;
  text-decoration: none;
}
.board-link:hover { color: var(--accent); }
.board-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}
.board-desc {
  color: #d2c8b3;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}
.crumbs {
  margin-bottom: 0.8rem;
  color: #4b453c;
  font-size: 0.95rem;
}
.crumbs a { color: #d6c7a3; }
.topic-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
}
.topic-table th,
.topic-table td {
  border-top: 1px solid #d8ccb6;
  padding: 0.6rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
.topic-table th {
  border-top: 0;
  background: #1d1d1d;
}
.topic-table td a {
  color: #f0e8d6;
  font-weight: 700;
}
.topic-extra {
  margin-top: 0.2rem;
  color: #9f947f;
  font-size: 0.85rem;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.8rem 0;
}
.pager a,
.pager-current {
  border: 1px solid #52442d;
  background: #201c16;
  color: #dcccaf;
  border-radius: 6px;
  padding: 0.18rem 0.55rem;
  text-decoration: none;
}
.pager-current {
  background: #8f1f1f;
  color: #fff;
  border-color: #8f1f1f;
}
.post {
  border: 1px solid #433827;
  border-radius: 8px;
  background: #171717;
  margin-bottom: 0.8rem;
  padding: 0.8rem;
}
.post header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  color: #2f2b26;
  font-size: 0.95rem;
}
.post-time { color: #665f54; }
.post h3 {
  margin: 0.5rem 0;
  font-size: 1rem;
}
.post-body {
  line-height: 1.45;
  font-size: 0.98rem;
  word-break: break-word;
}
.post-body blockquote {
  margin: 0.6rem 0;
  padding: 0.5rem 0.65rem;
  border-left: 4px solid #9f8b68;
  background: #211c15;
}
.post-body pre {
  white-space: pre-wrap;
  background: #1e1a14;
  padding: 0.5rem;
  border-radius: 6px;
  overflow: auto;
}
.post-attachments {
  margin-top: 0.7rem;
  border-top: 1px dashed #4a3d2b;
  padding-top: 0.6rem;
}
.post-attachments h4 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: #bcae92;
}
.post-attachments ul {
  margin: 0;
  padding-left: 1.2rem;
}
.post-attachments li {
  margin-bottom: 0.45rem;
}
.post-attachments a {
  color: #e6d8bc;
}
.att-meta {
  color: #9e927c;
  font-size: 0.85rem;
}
.att-image {
  margin-top: 0.4rem;
}
.att-image img {
  max-width: 320px;
  width: 100%;
  height: auto;
  border: 1px solid #5a4a30;
  border-radius: 4px;
}
.advanced-search {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.advanced-search label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.95rem;
}
.advanced-search input,
.advanced-search select {
  border: 1px solid #5a4a30;
  border-radius: 6px;
  padding: 0.55rem 0.6rem;
  background: #181818;
  color: #e8decb;
}
.advanced-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
}
.advanced-actions button {
  border: 1px solid #761b1b;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
}
.advanced-actions button[type="reset"] {
  background: #5a5448;
  border-color: #4f4a40;
}
.advanced-summary {
  margin-top: 0.8rem;
  color: #5f584d;
}
.advanced-results {
  margin-top: 0.8rem;
}
.advanced-item {
  border-top: 1px dashed #ccbda3;
  padding: 0.65rem 0;
}
.advanced-item:first-child { border-top: 0; }
.advanced-item a {
  color: #1e1a15;
  font-weight: 700;
  text-decoration: none;
}
.advanced-item .meta {
  color: #6a6257;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}
.site-footer {
  border-top: 1px solid #cfbf9f;
  color: #5e584f;
  padding: 1rem 0 1.6rem;
  font-size: 0.9rem;
  text-align: center;
}
.footer-note {
  margin: 0.35rem 0 0;
  color: #a99c83;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  font-size: 1rem;
}
@media (max-width: 760px) {
  .topic-table th:nth-child(4),
  .topic-table td:nth-child(4),
  .topic-table th:nth-child(5),
  .topic-table td:nth-child(5) {
    display: none;
  }
  .post header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .advanced-search {
    grid-template-columns: 1fr;
  }
}
