:root {
  color-scheme: dark;
  --bg: #10131b;
  --panel: #181d29;
  --raised: #202634;
  --line: #394153;
  --ink: #f4eee1;
  --muted: #bbc2d2;
  --accent: #f0bd75;
  --on-accent: #25170b;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 1rem/1.48 var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font: 500 clamp(2.25rem, 5vw, 3.4rem)/1.1 var(--serif); letter-spacing: -.025em; }
h2 { font: 500 1.75rem/1.16 var(--serif); }
h3 { font: 500 1.25rem/1.3 var(--serif); }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.skip:focus { position: absolute; z-index: 2; padding: .65rem; background: var(--bg); }
.shell { width: min(1136px, calc(100% - 3rem)); margin-inline: auto; }
.header { background: #131722; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 66px; display: flex; align-items: center; gap: 1.25rem; }
.wordmark { display: inline-flex; gap: .65rem; align-items: center; font: bold 1.08rem/1 var(--serif); letter-spacing: .07em; white-space: nowrap; }
.wordmark small { display: block; margin-top: .32rem; color: var(--muted); font: 600 .7rem/1 var(--sans); letter-spacing: .18em; }
.accent, .crest { color: var(--accent); }
.crest { display: grid; place-items: center; width: 33px; height: 37px; border: 1px solid currentColor; border-radius: 4px 4px 12px 12px; font: 1.35rem/1 var(--serif); }
.nav { display: flex; gap: 1.25rem; margin-left: auto; color: var(--muted); font-size: .94rem; }
.nav a:hover, .text-button:hover { color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .48rem .82rem; border-radius: 6px; font-weight: 650; text-align: center; }
.outline { border: 1px solid #596174; background: var(--panel); color: var(--ink); }
.outline:hover { border-color: var(--accent); }
.primary { border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); }
.primary:hover { filter: brightness(1.08); }
.button:disabled { cursor: wait; opacity: .65; }
.layout { display: grid; gap: 2.25rem; padding-block: 1.8rem 3rem; }
section { min-width: 0; scroll-margin-top: .8rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: .8rem 1.2rem; margin-bottom: 1rem; }
.section-note, .status { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.status:empty { display: none; }
.report-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.forum-tools, .forum-filters, .forum-badges, .forum-byline, .forum-foot, .thread-actions, .reply-target {
  display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .75rem;
}
.forum-tools { justify-content: space-between; padding-block: .6rem; margin-block: .4rem .75rem; border-block: 1px solid var(--line); }
.forum-filters { gap: .25rem; }
.forum-filters button {
  padding: .4rem .68rem; min-height: 38px; border-radius: 5px; background: transparent;
  border: 1px solid transparent; color: var(--muted); font-weight: 650; font-size: .89rem;
}
.forum-filters button:hover { color: var(--ink); }
.forum-filters button[aria-pressed=true] { color: var(--accent); background: #2b251f; border-color: #745735; }
.forum-tools input {
  width: min(100%, 16rem); min-height: 40px; padding: .4rem .65rem; border-radius: 6px;
  color: var(--ink); background: var(--panel); border: 1px solid #596174;
}
.forum-list, .report-thread, .thread-replies { display: grid; gap: .75rem; }
.forum-card, .reply-card, .reply-form, .report-empty {
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  padding: clamp(.85rem, 2.8vw, 1.3rem); min-width: 0; overflow-wrap: anywhere;
}
.forum-card { display: grid; gap: .6rem; }
.forum-card:has(.forum-title:hover) { border-color: #88653b; }
.forum-title:hover, .forum-back:hover { color: var(--accent); }
.forum-title { font-size: clamp(1.25rem, 3vw, 1.55rem); }
.forum-badges { gap: .45rem; }
.forum-badge {
  width: fit-content; padding: .16rem .5rem; border-radius: 4px; font-size: .75rem;
  font-weight: 750; line-height: 1.35; background: #26334b; color: #cedcff;
}
.forum-badge.followup { background: #3a2d20; color: #f5c88e; }
.forum-badge.fixed { background: #20382e; color: #b8e7c6; }
.forum-badge.priority { background: #432b2d; color: #ffc3b8; }
.forum-byline, .forum-foot, .thread-actions, .reply-context {
  color: var(--muted); font-size: .84rem;
}
.forum-byline strong { color: var(--ink); }
.forum-avatar {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  color: var(--accent); border: 1px solid #674f37; background: #302923;
  border-radius: 50%; font-weight: 700; flex-shrink: 0;
}
.forum-role { color: #f4c68b; }
.forum-preview {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  color: var(--muted); white-space: pre-line;
}
.forum-foot { gap: .2rem .75rem; }
.forum-foot span + span::before { content: '·'; margin-right: .5rem; color: #8692a8; }
.report-empty { color: var(--muted); }
.forum-back { width: fit-content; color: var(--muted); font-weight: 650; }
.thread-root { border-top: 2px solid #a8814d; gap: .75rem; }
.thread-root h2 { font-size: clamp(1.65rem, 4vw, 2.25rem); }
.thread-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-actions .button { min-height: 36px; margin-left: auto; font-size: .85rem; }
.reply-heading { margin-top: .35rem; }
.thread-replies:empty { display: none; }
.reply-card { display: grid; gap: .65rem; padding-block: .83rem; }
.reply-card:focus { border-color: var(--accent); }
.reply-card.depth-1, .reply-card.depth-2, .reply-card.depth-3 { border-inline-start: 2px solid #7f623e; }
.reply-card.depth-1 { margin-inline-start: clamp(.65rem, 3vw, 2rem); }
.reply-card.depth-2 { margin-inline-start: clamp(1.3rem, 6vw, 4rem); }
.reply-card.depth-3 { margin-inline-start: clamp(1.7rem, 7vw, 5rem); }
.reply-target { justify-content: space-between; color: var(--accent); font-size: .88rem; }
.reply-form { margin-top: .25rem; }
.text-button { padding: 0; color: var(--ink); background: transparent; border: 0; text-decoration: underline; text-underline-offset: .2em; }
.report-image { display: block; max-width: 100%; max-height: 70vh; border-radius: 6px; object-fit: contain; }
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .8rem; }
.card { display: grid; gap: .55rem; justify-items: start; align-content: start; padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.card p, .dialog-note { color: var(--muted); font-size: .91rem; }
.card .button { margin-top: .15rem; }

dialog { width: min(540px, calc(100% - 2rem)); max-height: 86vh; overflow: auto; padding: 1.2rem; color: var(--ink); background: var(--panel); border: 1px solid #556079; border-radius: 10px; }
dialog::backdrop { background: #080a10c4; }
.dialog-top { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: .8rem; }
.dialog-top form { flex-shrink: 0; }
.close { width: 37px; height: 37px; color: var(--ink); background: var(--raised); border: 1px solid #596174; border-radius: 5px; font-size: 1.7rem; line-height: 1; }
.dialog-note { margin-bottom: .8rem; }
.dialog-form, .report-form { display: grid; gap: .75rem; }
.dialog-form label, .report-form label { display: grid; gap: .3rem; color: var(--muted); }
.dialog-form input, .report-form input, .report-form textarea, .report-form select { width: 100%; min-width: 0; padding: .52rem; color: var(--ink); background: var(--bg); border: 1px solid #596174; border-radius: 5px; }
.report-form input[type=file] { padding: .4rem; }
.report-form textarea { min-height: 108px; resize: vertical; }
.dialog-form .button, .report-form .button { justify-self: start; }
.form-error { color: #ffaaa0; }
.form-error:empty { display: none; }
.report-form .report-fixed { display: flex; align-items: center; gap: .5rem; }
.report-fixed input { width: auto; }

@media (max-width: 640px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; justify-content: space-between; gap: .55rem; padding-block: .7rem; }
  .nav { width: 100%; order: 1; margin-left: 0; }
  .layout { padding-top: 1.1rem; gap: 1.7rem; }
  .section-head { align-items: start; flex-direction: column; }
  .downloads { grid-template-columns: 1fr; }
  .forum-tools input { flex-basis: 100%; }
  .report-actions .button { min-height: 40px; }
  .reply-card .thread-actions .text-button { min-height: 36px; }
}
