:root {
  --paper: #f5f4ef;
  --ink: #191918;
  --red: #b83123;
  --red-soft: #f1ded9;
  --muted: #65655f;
  --line: #c8c8c0;
  --panel: #ecece6;
  --panel-light: #faf9f5;
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:hover { color: var(--red); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
.shell { width: min(1320px, 90%); margin-inline: auto; }

.skip-link { position: absolute; z-index: 10; top: -100px; left: 20px; padding: 14px 18px; background: var(--paper); border: 1px solid var(--ink); }
.skip-link:focus { top: 12px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 0; padding-block: 0; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand-logo { display: block; width: clamp(220px, 27vw, 350px); line-height: 0; }
.brand-logo img, .footer-logo img { width: 100%; mix-blend-mode: multiply; }
.archive-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: clamp(20px, 3vw, 40px); font-size: 14px; }
.archive-nav a { text-decoration: none; }
.archive-nav span { color: var(--red); }
.archive-nav .is-current { padding-bottom: 5px; border-bottom: 1px solid var(--ink); }

main.shell { min-height: 70vh; padding-block: clamp(44px, 6vw, 86px) 80px; }
.site-footer { border-top: 1px solid var(--ink); }
.footer-inner { min-height: 118px; padding-block: 28px 35px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-logo { display: block; width: 155px; flex: 0 0 auto; }
.footer-inner > span { font-size: 11px; letter-spacing: 1.2px; text-align: center; }
.back-to-top { font-size: 13px; white-space: nowrap; }

h1, h2, h3 { color: var(--ink); }
h1 { margin: 0; font-size: clamp(42px, 5.6vw, 78px); font-weight: 600; letter-spacing: -.06em; line-height: 1.03; }
h2 { margin: 0 0 28px; font-size: clamp(30px, 4vw, 50px); font-weight: 500; letter-spacing: -.045em; line-height: 1.08; }
h3 { margin: 16px 0; font-size: 26px; font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.eyebrow { margin: 0 0 22px; color: var(--red); font-size: 12px; font-weight: 500; letter-spacing: 1.7px; text-transform: uppercase; }

.breadcrumbs { display: flex; min-width: 0; flex-wrap: wrap; gap: 9px; margin-bottom: 36px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.breadcrumbs a { color: inherit; }
.breadcrumbs a, .breadcrumbs span { min-width: 0; overflow-wrap: anywhere; }
.hero { padding: clamp(12px, 2vw, 28px) 0 clamp(56px, 7vw, 92px); border-bottom: 1px solid var(--ink); margin-bottom: clamp(48px, 6vw, 76px); }
.hero h1 { max-width: 1000px; font-size: clamp(48px, 7.2vw, 100px); }
.hero > p:last-child { max-width: 740px; margin: 32px 0 0; color: #50504c; font-family: Georgia, "Times New Roman", serif; font-size: clamp(20px, 2.1vw, 30px); line-height: 1.35; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; padding-bottom: 25px; border-bottom: 1px solid var(--ink); }
.page-heading h1 { max-width: 24ch; font-size: clamp(2.4rem, 5vw, 4.5rem); overflow-wrap: anywhere; text-wrap: balance; }
.page-heading > strong { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.thread-meta, .forum-description { color: var(--muted); }
.thread-meta { margin: 16px 0 32px; font-size: 13px; letter-spacing: .035em; }
.forum-description { max-width: 850px; margin-block: 22px 38px; font-family: Georgia, "Times New Roman", serif; font-size: 18px; }

.forum-tree, .forum-tree ul, .thread-list, .recent-list, .attachments ul, .album-grid { list-style: none; padding: 0; }
.forum-tree { margin: 0; border-top: 1px solid var(--ink); }
.forum-tree > li { margin: 0; }
.forum-tree li > a { display: flex; justify-content: space-between; align-items: baseline; gap: 22px; padding: 21px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.forum-tree li > a span { font-family: Georgia, "Times New Roman", serif; font-size: clamp(19px, 2vw, 27px); }
.forum-tree li > a strong { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.forum-tree .forum-tree { margin: 0 0 12px clamp(24px, 4vw, 60px); padding-left: clamp(16px, 2.4vw, 30px); border-top: 0; border-left: 1px solid var(--line); }
.forum-tree .forum-tree li > a { position: relative; padding-block: 15px; }
.forum-tree .forum-tree li > a::before { content: ""; position: absolute; top: 50%; left: clamp(-30px, -2.4vw, -16px); width: clamp(10px, 1.5vw, 18px); border-top: 1px solid var(--line); }
.forum-tree .forum-tree li > a span { font-family: Arial, Helvetica, sans-serif; font-size: 16px; }
.forum-tree .forum-tree .forum-tree { margin-left: clamp(14px, 2vw, 26px); padding-left: clamp(14px, 2vw, 24px); border-left-color: #aaa9a1; }
.forum-tree .forum-tree .forum-tree li > a { padding-block: 12px; }
.forum-tree .forum-tree .forum-tree li > a::before { left: clamp(-24px, -2vw, -14px); }
.forum-tree .forum-tree .forum-tree li > a span { color: #42423f; font-size: 14px; }

.thread-list { margin: 0; border-top: 1px solid var(--ink); }
.thread-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 20px 4px; border-bottom: 1px solid var(--line); }
.thread-row > * { min-width: 0; }
.thread-row > div:first-child { overflow-wrap: anywhere; }
.thread-row > div:first-child > a { font-family: Georgia, "Times New Roman", serif; font-size: 19px; text-decoration: none; overflow-wrap: anywhere; }
.thread-stats { display: grid; grid-template-columns: repeat(3, minmax(74px, auto)); gap: 18px; color: var(--muted); font-size: 12px; text-align: right; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 9px; }
.badge { display: inline-block; padding: 3px 7px; color: var(--red); background: transparent; border: 1px solid #d2a39a; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.posts { display: grid; gap: 24px; margin-top: 28px; }
.post { scroll-margin-top: 24px; overflow: hidden; background: var(--panel-light); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.post:target { border-color: var(--red); box-shadow: 0 0 0 3px rgba(184, 49, 35, .12); }
.post-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 20px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 13px; }
.post-header div { display: flex; flex-wrap: wrap; gap: 12px; }
.post-header span { color: var(--muted); }
.post-header > a { color: var(--red); text-decoration: none; }
.post-body { overflow-wrap: anywhere; padding: clamp(20px, 3vw, 36px); }
.post-body h3 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; }
.bbcode-quote { margin: 20px 0; padding: 18px 20px; background: var(--paper); border-left: 3px solid var(--red); }
.bbcode-quote cite { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.bbcode-code, .raw-bbcode pre { overflow: auto; white-space: pre-wrap; padding: 16px; background: var(--ink); color: var(--paper); }
.bbcode-underline { text-decoration: underline; }
.bbcode-image { display: block; max-height: 720px; margin: 18px 0; object-fit: contain; }
.attachments { padding: 0 clamp(20px, 3vw, 36px) 26px; }
.attachments h3 { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.attachments ul { display: flex; flex-wrap: wrap; gap: 14px; }
.attachment a { display: grid; gap: 7px; max-width: 240px; font-size: 12px; }
.attachment img { width: auto; max-width: 240px; height: auto; max-height: 260px; object-fit: contain; background: var(--panel); border: 1px solid var(--line); }
.missing-attachment { color: #8b4a21; }
.raw-bbcode { padding: 9px clamp(20px, 3vw, 36px) 12px; border-top: 1px solid var(--line); color: #7a7a74; font-size: 11px; }
.raw-bbcode summary { cursor: pointer; font-weight: 400; letter-spacing: .015em; }
.raw-bbcode[open] { padding-bottom: 16px; }

.stat-cards { display: flex; flex-wrap: wrap; gap: 0; margin: 30px 0 48px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.stat-cards div { display: grid; min-width: 180px; padding: 24px 42px 24px 0; }
.stat-cards div + div { padding-left: 42px; border-left: 1px solid var(--line); }
.stat-cards strong { font-size: 32px; font-weight: 500; letter-spacing: -.04em; }
.stat-cards span { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.recent-list { margin: 0; border-top: 1px solid var(--ink); }
.recent-list li { display: flex; justify-content: space-between; gap: 24px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.recent-list span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.album-grid a { display: grid; gap: 8px; font-size: 12px; }
.album-grid img { width: 100%; height: auto; max-height: 360px; object-fit: contain; background: var(--panel); }
.notice, .empty { padding: 28px; background: var(--panel); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }

@media (min-width: 1467px) {
  .site-header .shell { width: 1320px; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 1320px); }
  .header-inner { min-height: 0; padding-block: 4px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .brand-logo { width: min(270px, 82vw); }
  .archive-nav { justify-content: flex-start; gap: 22px; font-size: 13px; }
  main.shell { padding-block: 38px 60px; }
  .hero { padding-top: 0; }
  .hero h1 { font-size: clamp(42px, 13vw, 68px); }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .thread-row { grid-template-columns: 1fr; gap: 10px; }
  .thread-stats { grid-template-columns: repeat(3, 1fr); text-align: left; }
  .forum-tree li > a { align-items: flex-start; }
  .post-header { align-items: flex-start; }
  .recent-list li { align-items: flex-start; flex-direction: column; gap: 4px; }
  .stat-cards div + div { padding-left: 22px; }
  .footer-inner { align-items: flex-start; flex-wrap: wrap; }
  .footer-inner > span { display: none; }
}

@media (max-width: 440px) {
  .thread-stats { grid-template-columns: 1fr; gap: 3px; }
  .stat-cards { display: grid; }
  .stat-cards div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
