:root {
  --ink: #090909;
  --ink-soft: #292929;
  --paper: #f3efe4;
  --paper-deep: #ded7c8;
  --paper-light: #fffdf6;
  --rust: #e11b22;
  --rust-dark: #971217;
  --brass: #f4c430;
  --green: #34765c;
  --muted: #746c60;
  --line: rgba(9, 9, 9, .28);
  --shadow: 9px 9px 0 rgba(9, 9, 9, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  color: var(--ink);
  background:
    linear-gradient(rgba(9,9,9,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9,9,9,.035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font: 400 16px/1.5 "DM Sans", system-ui, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  background: radial-gradient(rgba(49,39,27,.12) .55px, transparent .55px);
  background-size: 5px 5px;
}
body.dialog-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--brass);
}
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: 12px;
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.forum-header {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 26px;
  padding: 13px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(243,239,228,.92);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; }
.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: var(--paper-light);
  background: var(--rust);
  font: 700 24px/1 serif;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.brand b { display: block; font-size: 14px; letter-spacing: .2em; }
.brand small { display: block; color: #777064; font-size: 10px; letter-spacing: .06em; }
.desktop-nav { display: flex; align-items: center; gap: 28px; color: #6b6459; font-size: 13px; }
.desktop-nav a { position: relative; padding: 10px 0; }
.desktop-nav a.active { color: var(--ink); font-weight: 700; }
.desktop-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 2px; background: var(--rust); }
.header-actions { justify-self: end; display: flex; gap: 9px; align-items: center; }
.account-button, .icon-button {
  min-height: 44px;
  border: 2px solid var(--ink);
  background: var(--paper-light);
  cursor: pointer;
  font-weight: 800;
}
.account-button { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; font-size: 12px; }
.account-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  font-weight: 800;
}
.icon-button { width: 44px; position: relative; padding: 0; }
.notification-button b {
  position: absolute;
  right: -6px;
  top: -7px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--ink);
  color: white;
  background: var(--rust);
  font-size: 10px;
}

.forum-hero {
  min-height: 555px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr);
  align-items: center;
  gap: clamp(42px, 8vw, 130px);
  overflow: hidden;
  position: relative;
  padding: clamp(58px, 8vw, 104px) clamp(20px, 7vw, 112px) 78px;
}
.forum-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .12;
  background: repeating-conic-gradient(from 205deg at 77% 53%, transparent 0 4deg, #000 4.4deg 4.8deg);
  mask-image: linear-gradient(90deg, transparent 38%, #000);
}
.forum-hero::after {
  content: "討議";
  position: absolute;
  z-index: -1;
  left: -8px;
  bottom: -45px;
  color: rgba(225,27,34,.065);
  font: 900 min(28vw, 370px)/.8 serif;
  letter-spacing: -.15em;
}
.hero-copy { max-width: 820px; }
.eyebrow { margin: 0; color: #766c5e; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; }
.eyebrow span { display: inline-block; width: 30px; height: 2px; margin: 0 10px 3px 0; background: var(--rust); vertical-align: middle; }
.hero-copy h1 {
  margin: 25px 0 23px;
  font: 400 clamp(72px, 8vw, 124px)/.79 "Bebas Neue", Impact, sans-serif;
  letter-spacing: -.02em;
  text-transform: uppercase;
  transform: skewY(-2deg);
  text-shadow: 5px 5px 0 rgba(225,27,34,.14);
}
.hero-copy h1 em { color: var(--rust); font-style: normal; }
.hero-copy > p:last-of-type { max-width: 720px; color: #5f584e; font-size: 17px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 31px; }
.impact-button, .outline-button, .text-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--ink);
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 800;
}
.impact-button { color: white; background: var(--rust); box-shadow: 5px 5px 0 var(--ink); text-transform: uppercase; letter-spacing: .04em; }
.impact-button:hover { background: var(--rust-dark); transform: translate(-1px,-1px); box-shadow: 7px 7px 0 var(--ink); }
.impact-button span { margin-left: 20px; color: var(--brass); }
.outline-button { background: var(--paper-light); box-shadow: 4px 4px 0 var(--brass); }
.text-button { min-height: 44px; border: 0; padding: 8px 0; color: #625b51; background: transparent; justify-content: flex-start; }
.text-button.danger { color: var(--rust-dark); }
.impact-button.compact { min-height: 44px; padding: 8px 14px; box-shadow: 4px 4px 0 var(--ink); font-size: 12px; }
.hero-casefile {
  position: relative;
  max-width: 390px;
  border: 4px solid var(--ink);
  padding: 34px 27px 27px;
  color: var(--paper-light);
  background: var(--ink);
  box-shadow: 12px 12px 0 var(--rust);
  transform: rotate(1deg);
}
.case-tab {
  display: inline-block;
  padding: 7px 10px 5px;
  color: white;
  background: var(--rust);
  font: 400 16px/1 "Bebas Neue", Impact, sans-serif;
  letter-spacing: .09em;
}
.hero-casefile .case-tab { position: absolute; left: -4px; top: -18px; border: 3px solid var(--ink); }
.case-kanji { position: absolute; right: 14px; top: 8px; color: rgba(244,196,48,.18); font: 700 94px/1 serif; }
.hero-casefile h2 { position: relative; margin: 19px 0 17px; max-width: 260px; font: 400 37px/1 "Bebas Neue", Impact, sans-serif; text-transform: uppercase; }
.hero-casefile ul { margin: 0; padding-left: 18px; color: #cec5b5; font-size: 13px; line-height: 1.6; }
.hero-casefile li + li { margin-top: 10px; }

.forum-search-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 0 clamp(20px, 5vw, 72px);
  transform: translateY(28px);
  position: relative;
  z-index: 3;
}
.forum-search {
  min-height: 68px;
  max-width: 1020px;
  width: 100%;
  justify-self: center;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 4px solid var(--ink);
  padding: 8px 8px 8px 20px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}
.forum-search > span { color: var(--rust); font-size: 27px; }
.forum-search input {
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}
.forum-search button, .filter-toggle {
  min-height: 46px;
  border: 0;
  padding: 0 18px;
  color: white;
  background: var(--ink);
  cursor: pointer;
  font-weight: 800;
}
.filter-toggle { display: none; border: 3px solid var(--ink); position: relative; }
.filter-toggle b { margin-left: 5px; color: var(--brass); }

.forum-layout {
  display: grid;
  grid-template-columns: minmax(220px, .58fr) minmax(430px, 1.5fr) minmax(230px, .7fr);
  gap: clamp(18px, 3vw, 42px);
  align-items: start;
  padding: 78px clamp(18px, 5vw, 72px) 95px;
  background: rgba(222,215,200,.46);
  border-top: 1px solid var(--line);
}
.board-rail, .forum-sidebar { position: sticky; top: 102px; }
.rail-heading span, .feed-head p, .reply-heading p {
  margin: 0;
  color: var(--rust);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.rail-heading h2, .feed-head h2, .reply-heading h2 { margin: 3px 0 0; font: 400 31px/1 "Bebas Neue", Impact, sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.board-list { display: grid; gap: 7px; margin-top: 20px; }
.board-link {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  grid-template-rows: auto auto;
  gap: 1px 8px;
  align-items: center;
  border: 2px solid transparent;
  padding: 10px;
  color: #61594f;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.board-link > span {
  grid-row: 1 / 3;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  color: var(--rust);
  font-size: 9px;
  font-weight: 800;
}
.board-link b { font-size: 13px; color: var(--ink); }
.board-link small { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.board-link em { grid-column: 3; grid-row: 1 / 3; font-style: normal; font-size: 11px; font-weight: 800; }
.board-link:hover, .board-link.active { border-color: var(--ink); background: var(--paper-light); box-shadow: 4px 4px 0 var(--rust); }
.rail-note { margin-top: 25px; padding: 14px; border-left: 5px solid var(--brass); background: rgba(255,253,246,.7); }
.rail-note b { font-size: 11px; text-transform: uppercase; }
.rail-note p { margin: 6px 0 0; color: #6d6458; font-size: 10px; line-height: 1.55; }

.thread-feed { min-width: 0; }
.feed-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.sort-select { display: grid; gap: 3px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.sort-select select {
  min-height: 44px;
  border: 2px solid var(--ink);
  padding: 7px 34px 7px 10px;
  color: var(--ink);
  background: var(--paper-light);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.status-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 17px 3px 12px; scrollbar-width: thin; }
.status-tabs button {
  min-height: 42px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  padding: 7px 13px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.status-tabs button.active { color: white; background: var(--ink); box-shadow: 3px 3px 0 var(--brass); }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.filter-chip { min-height: 34px; border: 2px solid var(--rust); padding: 5px 9px; color: var(--rust-dark); background: #fff3e6; font-size: 10px; font-weight: 800; cursor: pointer; }
.feed-state { min-height: 48px; display: grid; place-items: center; padding: 12px; color: var(--muted); font-size: 13px; }
.feed-state.error { border: 2px solid var(--rust); color: var(--rust-dark); background: #fff3e6; }
.thread-list, .reply-list { margin: 0; padding: 0; list-style: none; }
.thread-list { display: grid; gap: 14px; }
.thread-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  position: relative;
  border: 3px solid var(--ink);
  padding: 14px;
  background: var(--paper-light);
  box-shadow: 7px 7px 0 rgba(9,9,9,.14);
}
.thread-card:hover { transform: translate(-1px,-1px); box-shadow: 9px 9px 0 rgba(225,27,34,.23); }
.thread-thumb {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  color: rgba(255,255,255,.84);
  background: var(--ink);
  font: 700 44px/1 serif;
}
.thread-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thread-content { min-width: 0; }
.thread-topline, .thread-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 2px solid var(--ink);
  padding: 3px 7px;
  color: var(--ink);
  background: var(--brass);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .09em;
}
.status-badge.identified { color: white; background: var(--green); }
.status-badge.disputed { color: white; background: var(--rust); }
.status-badge.locked { color: white; background: #666; }
.thread-title { display: inline-block; margin: 8px 0 3px; font-size: 18px; font-weight: 800; line-height: 1.25; }
.thread-title:hover { color: var(--rust-dark); text-decoration: underline; text-decoration-thickness: 2px; }
.thread-mark { margin: 1px 0 7px; color: var(--rust-dark); font: 700 19px/1.3 serif; letter-spacing: .06em; }
.thread-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #625b51;
  font-size: 12px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.thread-meta { margin-top: 10px; text-transform: none; letter-spacing: 0; }
.thread-meta span + span::before { content: "·"; margin-right: 8px; }
.thread-card.pinned::after { content: "PINNED"; position: absolute; right: -3px; top: -13px; border: 2px solid var(--ink); padding: 3px 7px; color: white; background: var(--rust); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.load-more {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border: 3px solid var(--ink);
  background: var(--paper-light);
  cursor: pointer;
  font-weight: 800;
}
.thread-skeleton { min-height: 144px; border: 3px solid rgba(9,9,9,.18); background: linear-gradient(105deg, #e6dece 25%, #f5efe3 36%, #e6dece 47%); background-size: 250% 100%; animation: shimmer 1.4s linear infinite; }

.forum-sidebar { display: grid; gap: 18px; }
.sidebar-card { border: 3px solid var(--ink); padding: 20px; background: var(--paper-light); box-shadow: 6px 6px 0 var(--brass); }
.sidebar-card.dark { color: var(--paper-light); background: var(--ink); box-shadow: 6px 6px 0 var(--rust); }
.mini-label { color: var(--rust); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.sidebar-card.dark .mini-label { color: var(--brass); }
.sidebar-card h2 { margin: 9px 0 12px; font: 400 27px/1 "Bebas Neue", Impact, sans-serif; text-transform: uppercase; }
.sidebar-card p, .sidebar-card li { color: #665f54; font-size: 11px; line-height: 1.55; }
.sidebar-card.dark p { color: #c7bdad; }
.sidebar-card ol { margin: 0; padding-left: 18px; }
.sidebar-card li + li { margin-top: 7px; }
.sidebar-card button { min-height: 44px; border: 0; border-bottom: 2px solid var(--brass); padding: 5px 0; color: var(--paper-light); background: none; cursor: pointer; font-size: 11px; font-weight: 800; }

.thread-detail { max-width: 1120px; margin: 0 auto; padding: 64px clamp(16px, 5vw, 72px) 110px; }
.back-button { min-height: 44px; border: 0; border-bottom: 2px solid var(--ink); padding: 7px 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.thread-sheet { margin-top: 28px; border: 4px solid var(--ink); background: var(--paper-light); box-shadow: 11px 11px 0 var(--rust); }
.thread-sheet-head { padding: clamp(22px, 4vw, 42px); border-bottom: 3px solid var(--ink); }
.thread-sheet-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.thread-sheet h1 { margin: 18px 0 8px; font: 400 clamp(44px, 7vw, 78px)/.9 "Bebas Neue", Impact, sans-serif; text-transform: uppercase; transform: none; text-shadow: none; }
.detail-mark { margin: 0 0 13px; color: var(--rust); font: 700 clamp(24px, 4vw, 38px)/1.25 serif; letter-spacing: .08em; }
.detail-submeta { display: flex; flex-wrap: wrap; gap: 7px 15px; color: var(--muted); font-size: 11px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-actions button, .post-actions button {
  min-height: 42px;
  border: 2px solid var(--ink);
  padding: 6px 10px;
  background: var(--paper);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.case-facts { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 3px solid var(--ink); }
.case-fact { min-height: 84px; padding: 14px 16px; border-right: 2px solid var(--ink); }
.case-fact:last-child { border-right: 0; }
.case-fact small { display: block; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.case-fact b { display: block; margin-top: 7px; font-size: 13px; overflow-wrap: anywhere; }
.original-post { padding: clamp(22px, 4vw, 42px); }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; color: #433e37; line-height: 1.75; }
.post-byline { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.member-line { display: flex; align-items: center; gap: 10px; }
.member-avatar { width: 40px; height: 40px; display: grid; place-items: center; color: white; background: var(--ink); font-size: 14px; font-weight: 800; }
.member-line b, .member-line small { display: block; }
.member-line small { color: var(--muted); font-size: 9px; }
.photo-gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 24px; }
.gallery-item { margin: 0; min-width: 0; }
.gallery-item > a { width: 100%; display: block; border: 3px solid var(--ink); padding: 0; background: var(--ink); cursor: zoom-in; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; }
.gallery-item figcaption { padding: 5px 2px; color: var(--muted); font-size: 9px; }
.resolution-banner { margin: 0 0 20px; border: 3px solid var(--green); padding: 15px; color: #184a38; background: #e7f1e9; }
.resolution-banner b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.resolution-banner p { margin: 5px 0 0; }
.reply-section { margin-top: 60px; }
.reply-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 18px; }
.reply-list { display: grid; gap: 14px; }
.reply-card { border: 3px solid var(--ink); padding: clamp(18px, 3vw, 28px); background: var(--paper-light); box-shadow: 6px 6px 0 rgba(9,9,9,.13); }
.reply-card.accepted { border-color: var(--green); box-shadow: 7px 7px 0 var(--green); }
.accepted-label { display: inline-block; margin: -8px 0 16px; padding: 4px 8px; color: white; background: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.post-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.post-actions button[aria-pressed="true"] { color: white; background: var(--green); }
.empty-replies { border: 2px dashed #8e8475; padding: 30px; color: var(--muted); text-align: center; }

.forum-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(90vh, 900px);
  overflow: auto;
  border: 4px solid var(--ink);
  padding: 0;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 13px 13px 0 var(--rust);
}
.forum-dialog::backdrop { background: rgba(9,9,9,.74); backdrop-filter: blur(4px); }
.compose-dialog { width: min(880px, calc(100vw - 28px)); }
.edit-dialog { width: min(760px, calc(100vw - 28px)); }
.dialog-close-row { height: 0; display: flex; justify-content: flex-end; position: sticky; top: 0; z-index: 5; }
.dialog-close-row button { width: 48px; height: 48px; border: 0; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); color: white; background: var(--ink); cursor: pointer; font-size: 24px; }
.dialog-heading { padding: 32px 34px 22px; border-bottom: 2px solid var(--ink); }
.dialog-heading h2 { margin: 13px 52px 5px 0; font: 400 clamp(36px, 7vw, 56px)/.9 "Bebas Neue", Impact, sans-serif; text-transform: uppercase; }
.dialog-heading p { margin: 9px 48px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 2px solid var(--ink); }
.account-tabs button { min-height: 48px; border: 0; background: var(--paper); cursor: pointer; font-weight: 800; }
.account-tabs button + button { border-left: 2px solid var(--ink); }
.account-tabs button.active { color: white; background: var(--ink); }
.dialog-form { display: grid; gap: 17px; padding: 25px 34px 34px; }
.dialog-form > div[role="tabpanel"] { display: grid; gap: 17px; }
.dialog-form label, .mobile-filter-sheet label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; }
.dialog-form label > span, .photo-fieldset legend span { color: var(--muted); font-size: 9px; font-weight: 500; }
.dialog-form input:not([type="checkbox"]), .dialog-form textarea, .dialog-form select, .mobile-filter-sheet select {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}
.dialog-form textarea { resize: vertical; line-height: 1.5; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-row { display: grid !important; grid-template-columns: 24px 1fr; align-items: start; gap: 9px !important; font-weight: 500 !important; }
.check-row input { width: 22px; height: 22px; accent-color: var(--rust); }
.check-row span { color: #514a41 !important; font-size: 11px !important; line-height: 1.45; }
.photo-fieldset { margin: 0; border: 3px solid var(--ink); padding: 15px; }
.photo-fieldset legend { padding: 0 7px; font-size: 12px; font-weight: 800; }
.photo-fieldset > p { margin: 0 0 12px; color: var(--muted); font-size: 10px; }
.photo-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-buttons button { min-height: 44px; padding: 8px 12px; font-size: 10px; }
.photo-queue { display: grid; gap: 9px; margin-top: 12px; }
.queued-photo { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 10px; border: 2px solid var(--ink); padding: 7px; background: var(--paper); }
.queued-photo img { width: 72px; height: 58px; object-fit: cover; background: var(--ink); }
.queued-photo label { gap: 3px; }
.queued-photo select { min-height: 38px !important; padding: 5px 8px !important; font-size: 12px !important; }
.queued-photo button { width: 42px; height: 42px; border: 2px solid var(--ink); background: white; cursor: pointer; }
.submit-button { width: 100%; margin-top: 4px; }
.form-message { min-height: 20px; margin: 0; color: var(--rust-dark); font-size: 11px; }
.privacy-note { margin: 0; padding: 10px; border-left: 4px solid var(--brass); color: var(--muted); background: #fff7d5; font-size: 10px; }
.honeypot { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.recovery-dialog { text-align: center; }
.recovery-key { display: block; width: calc(100% - 68px); min-height: 84px; margin: 26px 34px 15px; border: 3px dashed var(--rust); padding: 18px; resize: none; overflow-wrap: anywhere; text-align: center; color: var(--rust-dark); background: var(--paper); font: 800 16px/1.55 ui-monospace, monospace; }
.dialog-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 34px 30px; }
.recovery-dialog .form-message { padding: 0 34px 20px; color: var(--green); }
.notification-list, .moderation-list, .guidelines-copy, #profile-summary { display: grid; gap: 10px; padding: 22px 34px; }
.notification-item, .moderation-item { border: 2px solid var(--ink); padding: 13px; background: var(--paper); }
.notification-item.unread { border-left: 7px solid var(--rust); }
.notification-item p, .moderation-item p { margin: 0; font-size: 12px; }
.notification-item small, .moderation-item small { color: var(--muted); font-size: 9px; }
.notification-item a { font-weight: 800; text-decoration: underline; }
.utility-dialog > .outline-button { margin: 0 34px 30px; }
.account-utilities { display: grid; gap: 5px; padding: 0 34px 30px; }
.account-utilities .outline-button { width: 100%; }
.guidelines-copy { gap: 4px; }
.guidelines-copy h3 { margin: 15px 0 2px; font-size: 14px; text-transform: uppercase; }
.guidelines-copy p { margin: 0; color: #5e574d; font-size: 12px; line-height: 1.65; }
.moderation-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.moderation-actions button { min-height: 40px; border: 2px solid var(--ink); background: white; cursor: pointer; font-size: 10px; font-weight: 800; }
.moderation-preview { display: block; width: min(100%, 420px); max-height: 260px; margin-top: 12px; border: 2px solid var(--ink); object-fit: contain; background: var(--ink); }
.moderation-context-link { display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 800; text-decoration: underline; }
.moderation-toolbar { display: flex; gap: 6px; padding: 14px 34px 0; overflow-x: auto; }
.moderation-toolbar button { flex: 0 0 auto; min-height: 44px; border: 2px solid var(--ink); background: var(--paper); padding: 0 12px; font: 800 10px/1 var(--sans); text-transform: uppercase; cursor: pointer; }
.moderation-toolbar button.active { color: white; background: var(--ink); }
.manual-moderation { margin: 14px 34px 0; border: 2px solid var(--ink); background: var(--paper); }
.manual-moderation summary { min-height: 44px; padding: 13px; font-size: 11px; font-weight: 900; cursor: pointer; }
.compact-form { padding-top: 4px; }
.moderation-evidence { display: grid; gap: 10px; margin-top: 14px; padding: 12px; border: 2px dashed var(--ink); background: #f4efe3; }
.moderation-evidence > p, .evidence-entry p { margin: 0; }
.evidence-entry { display: grid; gap: 5px; padding: 9px; border-left: 4px solid var(--brass); background: white; }
.evidence-entry.revision { border-left-color: var(--red); }
.evidence-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.evidence-gallery figure { margin: 0; }
.evidence-gallery img { width: 100%; max-height: 260px; object-fit: contain; border: 2px solid var(--ink); background: var(--ink); }
.evidence-gallery figcaption { overflow-wrap: anywhere; font-size: 9px; }

.mobile-nav { display: none; }
.mobile-filter-sheet {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  width: 100%;
  max-width: none;
  max-height: 75vh;
  margin: auto 0 0;
  overflow: auto;
  border: 0;
  border-top: 4px solid var(--ink);
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 0 -12px 40px rgba(0,0,0,.25);
}
.mobile-filter-sheet:not([open]) { display: none; }
.mobile-filter-sheet::backdrop { background: rgba(9,9,9,.55); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sheet-head h2 { margin: 0; font: 400 34px/1 "Bebas Neue", Impact, sans-serif; text-transform: uppercase; }
.sheet-head button { width: 44px; height: 44px; border: 2px solid var(--ink); background: var(--paper); font-size: 22px; }
.mobile-filter-sheet label { margin-bottom: 14px; }
.mobile-filter-sheet .impact-button { width: 100%; }
.mobile-filter-sheet .text-button { width: 100%; justify-content: center; }
.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  border: 3px solid var(--ink);
  padding: 13px 16px;
  color: white;
  background: var(--ink);
  box-shadow: 6px 6px 0 var(--rust);
  font-size: 12px;
  font-weight: 700;
}
.forum-footer { min-height: 160px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 25px; padding: 35px clamp(20px, 5vw, 72px); color: #bfb6a8; background: var(--ink); }
.forum-footer p { text-align: center; font-size: 11px; }
.forum-footer > div { display: flex; justify-content: flex-end; gap: 18px; font-size: 11px; }

@keyframes shimmer { to { background-position-x: -250%; } }

@media (max-width: 1120px) {
  .forum-layout { grid-template-columns: minmax(200px,.55fr) minmax(430px,1.45fr); }
  .forum-sidebar { display: none; }
}

@media (max-width: 860px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .forum-header { grid-template-columns: 1fr auto; min-height: 66px; padding: 10px 14px; }
  .desktop-nav { display: none; }
  .brand small { display: none; }
  .account-button { width: 44px; padding: 5px; justify-content: center; }
  .account-button > span:last-child { display: none; }
  .forum-hero { min-height: 0; grid-template-columns: 1fr; gap: 46px; padding: 47px 18px 70px; }
  .hero-copy h1 { font-size: clamp(58px, 14vw, 91px); }
  .hero-casefile { max-width: 100%; transform: none; }
  .forum-search-shell { padding: 0 14px; }
  .filter-toggle { display: block; }
  .forum-search { min-height: 60px; padding: 6px 6px 6px 13px; }
  .forum-search button { padding: 0 12px; }
  .forum-layout { grid-template-columns: 1fr; padding: 72px 14px 75px; }
  .board-rail { display: none; }
  .feed-head { align-items: center; }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: calc(62px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 3px solid var(--ink);
    background: var(--paper-light);
  }
  .mobile-nav a, .mobile-nav button {
    min-width: 0;
    min-height: 58px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 0;
    border-right: 1px solid var(--line);
    padding: 4px;
    background: transparent;
    font-size: 9px;
  }
  .mobile-nav span { font-size: 19px; line-height: 1; }
  .mobile-nav .active { color: white; background: var(--ink); }
  .thread-detail { padding: 42px 14px 85px; }
  .forum-footer { display: none; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .forum-header .brand-mark { width: 39px; height: 39px; }
  .header-actions { gap: 6px; }
  .forum-hero { padding-top: 38px; }
  .hero-copy h1 { margin: 20px 0 17px; font-size: clamp(51px, 16vw, 76px); }
  .hero-copy > p:last-of-type { font-size: 15px; line-height: 1.6; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions > * { width: 100%; }
  .hero-casefile { padding: 29px 20px 22px; }
  .forum-search-shell { grid-template-columns: 1fr auto; gap: 8px; }
  .forum-search { grid-template-columns: auto 1fr; }
  .forum-search button { grid-column: 1 / -1; min-height: 42px; }
  .filter-toggle { align-self: stretch; padding: 0 10px; }
  .feed-head { align-items: flex-end; }
  .feed-head h2 { font-size: 27px; }
  .sort-select { max-width: 145px; }
  .sort-select select { width: 100%; }
  .thread-card { grid-template-columns: 92px 1fr; gap: 12px; padding: 11px; }
  .thread-thumb { width: 92px; height: 92px; }
  .thread-title { font-size: 15px; }
  .thread-excerpt { -webkit-line-clamp: 2; font-size: 11px; }
  .thread-mark { font-size: 17px; }
  .thread-meta { grid-column: 1 / -1; }
  .thread-sheet-head { padding: 20px 16px; }
  .thread-sheet-top { display: grid; }
  .thread-sheet h1 { font-size: 43px; }
  .case-facts { grid-template-columns: 1fr 1fr; }
  .case-fact { border-bottom: 2px solid var(--ink); }
  .case-fact:nth-child(2) { border-right: 0; }
  .case-fact:nth-last-child(-n+2) { border-bottom: 0; }
  .original-post { padding: 19px 16px; }
  .post-byline { align-items: flex-start; }
  .photo-gallery { grid-template-columns: 1fr; }
  .reply-card { padding: 16px; }
  .forum-dialog {
    width: 100vw;
    max-width: none;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
    border-width: 0;
    border-top: 4px solid var(--ink);
    box-shadow: none;
  }
  .dialog-heading { padding: 27px 18px 18px; }
  .dialog-form { padding: 21px 18px calc(28px + env(safe-area-inset-bottom)); }
  .two-column { grid-template-columns: 1fr; }
  .recovery-key { width: calc(100% - 36px); margin-inline: 18px; }
  .dialog-actions { padding-inline: 18px; }
  .notification-list, .moderation-list, .guidelines-copy, #profile-summary { padding-inline: 18px; }
  .moderation-toolbar { padding-inline: 18px; }
  .manual-moderation { margin-inline: 18px; }
  .account-utilities { padding-inline: 18px; }
  .queued-photo { grid-template-columns: 60px 1fr auto; }
  .queued-photo img { width: 60px; height: 52px; }
}

@media (max-width: 360px) {
  .thread-card { grid-template-columns: 1fr; }
  .thread-thumb { width: 100%; height: 128px; }
  .feed-head { display: grid; }
  .sort-select { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .thread-card:hover, .impact-button:hover { transform: none; }
}

@media (forced-colors: active) {
  * { box-shadow: none !important; }
  :focus-visible { outline: 3px solid Highlight; }
  .status-badge, .case-tab, .mobile-nav .active { border: 2px solid CanvasText; }
}
