:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
  background: #f0efe7;
  font-size: 12px;
  --accent: #a33135;
  --accent-gradient: linear-gradient(#bd5257, #922c32);
  --page-width: 760px;
  --border: #d7d7c5;
  --link: #295c89;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid #c59094;
  background: linear-gradient(#fff, #e9e9dc);
  padding: 4px 10px;
  border-radius: 2px;
}
button:hover {
  background: #fae9e9;
}
button:active {
  background: #efcccc;
}
input,
select {
  border: 1px solid #aaa;
  background: #fff;
  padding: 4px;
  min-width: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #1a71b2;
  outline-offset: 2px;
}
.site {
  width: var(--page-width);
  min-width: var(--page-width);
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  min-height: 100vh;
}
.skip {
  position: absolute;
  top: -60px;
  background: #fff;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 0;
}
.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;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.main-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  background: var(--accent-gradient);
  margin-top: 5px;
  border: 1px solid #8e2d32;
  min-height: 28px;
}
.main-nav a,
.main-nav button {
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: bold;
}
.main-nav [aria-current] {
  background: #762128;
}
.main-nav button {
  border: 0;
  border-left: 1px solid #ce8185;
  background: transparent;
  margin-left: 0;
  border-radius: 0;
}
.utility-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 6px 0 0;
}
.utility-bar form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: 0;
}
.utility-bar input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 7px 8px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: #fff;
  font-size: 11px;
}
.utility-bar input:focus { outline: 0; box-shadow: inset 0 0 0 1px var(--accent); }
.utility-bar form > button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-left: 0;
  border-radius: 0;
  background: #fff;
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
}
.signup-strip {
  border: 1px solid #dddca3;
  background: linear-gradient(#ffffe2, #ffffbc);
  text-align: center;
  padding: 5px 3px;
  font-size: 11px;
}
.signup-strip button {
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  color: #922c32;
}
.signup-strip button:hover {
  text-decoration: underline;
}
.page-layout {
  margin-top: 10px;
}
main {
  min-width: 0;
  outline: none;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 5px 9px;
  color: #fff;
  background: var(--accent-gradient);
  border-top: 1px solid #d68a8e;
}
.section-title h2 {
  margin: 0;
  font-size: 13px;
}
.section-title a {
  color: inherit;
  font-size: 10px;
}
.section-title button {
  font-size: 10px;
  padding: 2px 7px;
}
/* The fixed canvas preserves photo-left/forum-right composition on phones.
   Ten previews remain two columns and five rows inside the photo panel. */
.forum-home {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.forum-photos { min-width: 0; }
.photo-panel {
  padding: 4px;
  background: #faf5d3;
  border: 1px solid #e5dfa9;
}
.photo-panel .section-title {
  background: linear-gradient(#fffbe4, #eee4a0);
  color: #484738;
  border: 0;
}
.photo-panel .section-title h2 {
  font: bold 15px Georgia, serif;
}
.photo-empty {
  margin: 12px 5px;
  color: #666044;
  font-size: 11px;
}
.forum-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: 11px;
}
.forum-table td {
  padding: 5px 5px;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}
.forum-table tr:nth-child(even) {
  background: #fafafa;
}
.forum-table tr:hover {
  background: #f1f1f1;
}
.topic-title a {
  display: block;
  color: #333;
  line-height: 1.35;
}
.topic-title .thread-link { font-weight: normal; white-space: normal; overflow-wrap: anywhere; }
.forum-table .author-col { width: 86px; }
.forum-table .row-author { font-size: 9px; color: #555; overflow-wrap: anywhere; }
.topic-title .thread-link.unread { font-weight: bold; }
.forum-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px 0; }
.forum-photo-grid a { min-width: 0; color: #484738; font-size: 10px; }
.forum-photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 4px; }
.thread-photo { display: block; max-width: 100%; height: auto; margin: 10px 0; }
.topic-title small {
  display: block;
  color: #888;
  font-size: 9px;
}
.forum-table .row-replies {
  width: 24px;
  text-align: right;
  font-size: 10px;
  color: #777;
}

.empty {
  padding: 20px 8px;
  line-height: 1.6;
}
.prose {
  padding: 15px 10px;
  max-width: 760px;
  line-height: 1.7;
}
.prose h1 {
  font-size: 22px;
}
.prose h2 {
  font-size: 17px;
  margin-top: 24px;
  border-bottom: 1px solid #ddd;
}
.search-title {
  font-size: 18px;
  margin: 16px 5px 8px;
}
.search-title + p {
  margin-left: 5px;
}
.subheading {
  font-size: 14px;
  background: #f1f1e6;
  border-bottom: 1px solid #ddd;
  padding: 5px;
  margin-top: 15px;
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}
.search-results li {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}
.search-results small {
  display: block;
  color: #777;
  font-size: 10px;
  margin-top: 3px;
}
.search-results p {
  margin: 5px 0 0;
  font-size: 11px;
}
footer {
  border-top: 1px solid #ddd;
  margin-top: 18px;
  padding: 12px 8px;
  font-size: 10px;
  color: #777;
  line-height: 1.5;
}
footer p {
  margin-bottom: 3px;
}
dialog {
  border: 1px solid #bf7377;
  border-top: 6px solid #a33135;
  max-width: 410px;
  width: calc(100% - 32px);
  padding: 25px;
  box-shadow: 0 10px 45px #0005;
}
dialog::backdrop {
  background: #0005;
}
dialog h2 {
  font-size: 19px;
}
dialog p {
  line-height: 1.6;
}
.dialog-close {
  position: absolute;
  right: 7px;
  top: 7px;
  border: 0;
  background: none;
  font-size: 20px;
  padding: 0 5px;
}
.notice {
  padding: 12px;
  background: #fffbdc;
  border: 1px solid #e1dcae;
  margin: 14px 0;
}
.notice p {
  margin: 5px 0 0;
}
.thread-heading {
  background: var(--accent-gradient);
  border-top: 1px solid #d68a8e;
  color: #fff;
  padding: 8px 10px;
}
.thread-heading h1 {
  font-size: 18px;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.thread-heading p {
  font-size: 11px;
  margin: 0;
}
.thread-heading a {
  color: #fff;
}
.thread-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  font-size: 10px;
}
.reply-button {
  background: linear-gradient(#d2666c, #b63a43);
  color: #fff;
  border: 1px solid #9b3038;
  padding: 2px 18px;
  font-size: 10px;
}

.legacy-post {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 12px 0;
}
.author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.author-portrait > span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  background: #f7e6e7;
  font: bold 18px Georgia;
  color: var(--accent);
}
.author-details { min-width: 0; }
.author-details strong { color: var(--accent); font-size: 12px; overflow-wrap: anywhere; }
.thread-body {
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.thread-body p {
  margin: 10px 0 18px;
}
.replies {
  margin-top: 14px;
}
.no-replies {
  padding: 25px 10px;
  background: #f5f5ee;
  border: 5px solid #fafaf5;
  color: #777;
  font-size: 11px;
}
.reply-area {
  margin-top: 14px;
  background: #eeeee5;
  padding-bottom: 8px;
}
.reply-area > p {
  font-size: 10px;
  margin: 6px;
}
.reply-placeholder {
  margin: 8px 5px;
  background: #ffffef;
  border: 1px solid #d4d4bd;
  min-height: 95px;
  padding: 12px;
  color: #8b8b77;
}
.reply-area > button {
  margin-left: 5px;
}

/* One full-width shell on every route. Wiki menu cells follow the stock
   menu composition, with equal widths, square borders and an active marker. */
.section-menu {
  display: grid;
  grid-template-columns: repeat(var(--menu-columns), minmax(0, 1fr));
  border: 1px solid var(--border);
  background: #f2f2f2;
  margin-bottom: 10px;
}
.section-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  padding: 7px 3px;
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 10px;
  font-weight: bold;
  overflow-wrap: anywhere;
  color: var(--accent);
}
.section-menu a:last-child { border-right: 0; }
.section-menu a:hover { background: #fff; }
.section-menu a.active { background: #fff; box-shadow: inset 0 3px var(--accent); }
.wiki-layout {
  background: #fff;
}

.wiki-page {
  padding: 0 12px 18px;
  min-height: 580px;
  color: #202122;
  line-height: 1.6;
  font-size: 13px;
}
.wiki-page a {
  color: #365e9d;
}
.wiki-page h1 {
  font:
    normal 28px Georgia,
    "Times New Roman",
    serif;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 5px;
  margin: 15px 0 0;
  overflow-wrap: anywhere;
}
.wiki-subtitle {
  font-size: 11px;
  color: #666;
  margin: 4px 0 14px;
}
.wiki-page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #a7bfd5;
  min-height: 33px;
  font-size: 11px;
}
.wiki-page-top nav {
  display: flex;
  gap: 12px;
}
.wiki-page-top .active {
  color: #202122;
  font-weight: bold;
}
.wiki-page-top button {
  font-size: 10px;
}
.wiki-welcome {
  border: 1px solid #b7c8d2;
  background: linear-gradient(#edf5fa, #f6fafc);
  padding: 12px 15px;
  margin-bottom: 15px;
}
.wiki-welcome h2 {
  font:
    normal 21px Georgia,
    serif;
  color: #3c5266;
  margin: 0 0 8px;
}
.wiki-welcome p {
  margin: 5px 0;
  font-size: 12px;
}
.wiki-category-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.wiki-category {
  border: 1px solid #c8ccd1;
  background: #fbfbfb;
}
.wiki-category h2 {
  font:
    normal 20px Georgia,
    serif;
  margin: 0;
  background: #eaf0f5;
  border-bottom: 1px solid #c8ccd1;
  padding: 5px 12px;
}
.wiki-category ul {
  padding-left: 30px;
  margin-right: 12px;
}
.wiki-category li {
  padding: 3px 0;
}
.wiki-category p {
  font-size: 12px;
  margin: 2px 0 8px;
  color: #666;
}
.article-notice {
  background: #fff8df;
  border: 1px solid #d7c589;
  font-size: 11px;
  padding: 8px 10px;
  margin: 12px 0 18px;
}
.infobox {
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  padding: 5px;
  width: 100%;
  max-width: 290px;
  margin: 12px 0 18px;
  font-size: 11px;
}
.infobox h2 {
  font-size: 15px;
  text-align: center;
  background: #f2d9d9;
  padding: 5px;
  margin: 0;
}
.infobox-symbol {
  text-align: center;
  font-size: 64px;
  color: #b27733;
  padding: 8px;
  background: radial-gradient(#f5edbd, transparent);
}
.infobox dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  margin: 0;
}
.infobox dt,
.infobox dd {
  margin: 0;
  padding: 5px 3px;
  border-top: 1px solid #e4e5e7;
}
.infobox dt {
  font-weight: bold;
}
.article-lead {
  font-size: 14px;
}
.contents {
  display: table;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  padding: 10px 14px;
  font-size: 12px;
  min-width: 200px;
  margin: 15px 0 25px;
}
.contents > b {
  display: block;
  text-align: center;
}
.contents ol {
  padding-left: 20px;
  margin: 6px 0 0;
}
.contents li {
  padding: 2px 0;
}
.article-section {
  scroll-margin-top: 15px;
}
.article-section h2 {
  font:
    normal 23px Georgia,
    serif;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 3px;
  margin: 24px 0 10px;
}
.article-section p {
  margin-bottom: 15px;
}
.article-section ul {
  padding-left: 24px;
}
.wiki-page-footer {
  clear: both;
  margin-top: 30px;
  border: 1px solid #c8ccd1;
  background: #f8f9fa;
  padding: 8px;
  font-size: 11px;
}
.wiki-page-footer p {
  margin: 6px 0 0;
}
.text-button {
  padding: 0;
  background: none;
  border: 0;
  color: #365e9d;
}
.text-button:hover {
  background: none;
  text-decoration: underline;
}
.history-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  margin: 20px 0;
}
.history-table th,
.history-table td {
  border: 1px solid #a2a9b1;
  padding: 8px;
  text-align: left;
}
.history-table th {
  background: #eaecf0;
}
.utility-bar form {
  flex: 1;
  width: auto;
}
.wiki-category-grid {
  grid-template-columns: 1fr 1fr;
}
.infobox {
  float: right;
  width: 240px;
  margin: 0 0 20px 22px;
}
.site {
  padding: 10px;
}
.main-nav {
  margin-top: 5px;
}

.forum-table td {
  padding-top: 6px;
  padding-bottom: 6px;
}


.signup-strip {
  font-size: 12px;
}
@media (prefers-reduced-motion: no-preference) {
  a,
  button {
    transition: background-color 0.12s;
  }
}

/* Fixed table column widths leave the thread title the remaining space. */
.forum-table .replies-col {
  width: 20px;
}
.section-title button {
  color: #333;
}
.forum-table .replies-col {
  width: 24px;
}


.utility-bar form {
  flex: 1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
}

#composer-dialog { max-width: 620px; }
form[data-contribution] { display: grid; gap: 8px; padding: 10px 0; }
form[data-contribution] label { font-weight: bold; }
form[data-contribution] input, form[data-contribution] select, form[data-contribution] textarea { width: 100%; min-width: 0; }
form[data-contribution] textarea { resize: none; padding: 8px; border: 1px solid #aaa; background: #fffff3; }
form[data-contribution] button { justify-self: start; }

.photo-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }
.photo-gallery img { width: 100%; max-height: 220px; object-fit: contain; }

.wiki-editor-page h1 { margin: 18px 0 6px; font-family: Georgia, 'Times New Roman', serif; font-size: 28px; font-weight: normal; border-bottom: 1px solid #a2a9b1; }
#wiki-edit-form { display: block; }
.wiki-page-top button { background: transparent; border: 0; border-radius: 0; padding: 8px; color: var(--accent); }
.wiki-page-top button[aria-pressed="true"] { border-bottom: 2px solid #202122; color: #202122; }
.wiki-edit-preview { min-height: 450px; border: 1px solid #a2a9b1; padding: 20px; }
.wiki-edit-preview h2 { font: 24px Georgia, serif; border-bottom: 1px solid #a2a9b1; padding-bottom: 6px; margin-top: 20px; }
.wiki-edit-summary { padding: 16px 0; }
.wiki-edit-summary label { display: block; margin-bottom: 6px; }
.wiki-edit-summary input { width: 100%; padding: 8px; }
.wiki-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0; border-top: 1px solid #eaecf0; }
.wiki-editor-actions button { padding: 9px 14px; border-radius: 2px; }
.wiki-editor-actions .wiki-save { color: #fff; background: #36c; border-color: var(--accent); font-weight: bold; }



.nav-page-actions { display: flex; flex-wrap: nowrap; align-items: stretch; margin-left: auto; }
.main-nav .nav-page-actions a, .main-nav .nav-page-actions button { white-space: nowrap; }
.main-nav .nav-page-actions a { border-left: 1px solid #ce8185; }

.main-nav [hidden] { display: none; }

.main-nav .nav-page-actions [aria-pressed="true"] { background: #762128; }

.forum-home.is-balanced .forum-photo-grid { grid-template-rows: repeat(5, minmax(0, 1fr)); }
.forum-home.is-balanced .forum-photo-grid a { display: flex; flex-direction: column; }
.forum-home.is-balanced .forum-photo-grid img { flex: 1; min-height: 0; height: 0; aspect-ratio: auto; }
.forum-pagination { display: flex; height: 34px; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; }
.forum-pagination[hidden] { display: none; }
.thread-pagination { display: flex; gap: 6px; padding: 10px 0; }
.thread-pagination a, .thread-pagination span { padding: 4px 8px; border: 1px solid #ddd; }
.thread-pagination [aria-current] { color: #fff; background: var(--accent); }
.thread-posts .legacy-post + .legacy-post { margin-top: 10px; }

.author-details { display: flex; flex-direction: column; gap: 3px; }
.author-details time { font-size: 10px; color: #666; }
.author-server-tag { font-size: 10px; color: #555; overflow-wrap: anywhere; }

.reply-editor {
  width: 100%; min-width: 0; min-height: 84px;
  padding: 8px; border: 1px solid #aaa; background: #fffff3;
  font: inherit; line-height: 1.5; overflow-wrap: anywhere;
}
.reply-editor img { display: inline; max-width: 100%; width: auto; height: auto; vertical-align: middle; }
.reply-editor:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
.reply-actions { display: flex; justify-content: flex-start; gap: 6px; }
.reply-image-status:empty { display: none; }
.reply-image-status { font-size: 11px; color: var(--accent); margin: 0; }

/* Dedicated same-tab login uses the shared page frame. */
.login-page { max-width: 480px; margin: 24px auto; }
#shared-login { --login-min-height: 0px; --login-inset-top: 0px; --login-inset-bottom: 0px; }

.thread-editor { min-height: 160px; }

.memory-directory { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.memory-directory th, .memory-directory td { padding: 8px; text-align: left; border-bottom: 1px solid #d8d8d8; overflow-wrap: anywhere; vertical-align: top; }
.memory-directory th { background: #f2f1eb; color: #333; }
.memory-directory tbody tr:nth-child(even) { background: #f8f8f8; }
.memory-directory th:nth-child(2), .memory-directory td:nth-child(2) { width: 110px; }

.profile-content { display: flow-root; font-size: 12px; font-weight: normal; }
.profile-content .profile-field, .profile-content .profile-photo, .profile-story { position: relative; }
.profile-field .profile-field-value { display: block; padding-right: 16px; font-size: 12px; font-weight: normal; }
.profile-content .infobox th, .profile-content .infobox td { font-size: 12px; font-weight: normal; }
.profile-content .infobox-title .profile-field-value { font-weight: normal; }
.profile-content .profile-pencil, .profile-heading .profile-pencil { position: absolute; right: 4px; top: 5px; min-width: 0; padding: 2px; border: 0; border-radius: 0; box-shadow: none; background: none; color: #666; line-height: 1; }
.profile-content .profile-pencil:hover { color: var(--accent); background: #eee; }
.profile-content .profile-pencil:focus-visible { outline: 1px solid var(--accent); }
.profile-field input, .profile-story textarea { width: 100%; min-width: 0; font: inherit; font-weight: normal; }
.profile-field-value button { margin: 5px 4px 0 0; }
.profile-photo img { max-width: 100%; max-height: 112px; width: auto; height: auto; }
.profile-story { display: table; max-width: 100%; font-size: 12px; font-weight: normal; padding-right: 18px; }
.profile-story .profile-field-value { white-space: pre-wrap; }
.profile-story textarea { min-height: 100px; resize: none; padding: 8px; }
.profile-status:empty { display: none; }

.profile-heading .profile-pencil { position: static; margin-left: 7px; vertical-align: middle; }
.profile-heading .profile-field-value { display: inline; }
.profile-heading input { max-width: 320px; font: inherit; }
.profile-heading .profile-field-value button { font: 12px Arial, sans-serif; }

.profile-field-value[contenteditable] { border: 0; outline: 0; background: transparent; padding-top: 0; padding-bottom: 0; min-height: 1lh; }
.profile-field-value[contenteditable]:focus-visible { outline: 1px dotted var(--accent); outline-offset: 1px; }
.profile-edit-form { display: contents; }
.profile-edit-actions { position: absolute; top: 100%; left: 0; z-index: 20; display: flex; justify-content: flex-start; gap: 6px; margin-top: 4px; padding: 4px; background: #fff; border: 1px solid #ddd; width: max-content; font: 12px Arial, sans-serif; white-space: nowrap; }
.profile-field .profile-meta-actions, .profile-photo .profile-meta-actions { left: auto; right: 0; }
.profile-heading { position: relative; }
.profile-edit-actions button { margin: 0; }
.profile-story .profile-field-value img { display: inline; max-width: 100%; width: auto; height: auto; }
