:root {
  --rtf-page: #77746c;
  --rtf-line: #4a473f;
  --rtf-cell: #6d6a64;
  --rtf-cell-dark: #615f55;
  --rtf-heading: #a7a58f;
  --rtf-text: #d0ceb8;
  --rtf-muted: #b7b39f;
  --rtf-black: #312f29;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--rtf-page);
  color: var(--rtf-text);
  font: 10px Verdana, Helvetica, Arial, sans-serif;
}

a:link,
a:visited,
a:active {
  color: var(--rtf-heading);
  text-decoration: none;
}

a:hover {
  color: var(--rtf-text);
  text-decoration: underline;
}

hr {
  height: 0;
  border: 0;
  border-top: 1px solid #d1d7dc;
}

input,
select,
textarea,
button {
  font: 10px Verdana, Helvetica, Arial, sans-serif;
}

input,
textarea,
select {
  max-width: 100%;
  color: #1d1b17;
  background: #d0ceb8;
  border: 1px solid var(--rtf-line);
}

textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}

button,
input[type='submit'],
input[type='button'] {
  color: var(--rtf-text);
  background: linear-gradient(#77746c, #4f4c43);
  border: 1px solid var(--rtf-black);
  padding: 2px 7px;
  cursor: pointer;
}

.bodyline {
  width: 70%;
  min-width: 760px;
  max-width: 1110px;
  margin: 0 auto;
  background: var(--rtf-page);
}

.legacy-frame {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
}

.legacy-border {
  background:
    repeating-linear-gradient(
      90deg,
      #4c493f 0 4px,
      #6b675a 4px 7px,
      #312f29 7px 10px
    );
}

.legacy-border.right {
  transform: scaleX(-1);
}

.legacy-header {
  min-height: 170px;
  background: #2c2c29;
  text-align: center;
}

.legacy-header img {
  display: block;
  width: 100%;
  max-width: 869px;
  height: auto;
  margin: 0 auto;
  border: 0;
}

.topbar-shell {
  padding: 2px;
  background: var(--rtf-line);
}

.topbar {
  display: grid;
  grid-template-columns: 170px 1fr 170px;
  align-items: center;
  min-height: 20px;
  color: var(--rtf-text);
  background:
    linear-gradient(180deg, #747168 0%, #59564c 50%, #4a473f 100%);
  border: 1px solid #3c3932;
}

.topbar-center {
  text-align: center;
  white-space: nowrap;
}

.topbar-left,
.topbar-right {
  padding: 0 4px;
  white-space: nowrap;
}

.topbar-right {
  text-align: right;
}

.portal-grid {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 170px;
  align-items: start;
}

.column {
  width: 170px;
}

.main-column {
  min-width: 0;
}

.block-wrap {
  width: 170px;
  padding: 7px;
}

.main-column .block-wrap {
  width: 100%;
}

.forumline {
  width: 100%;
  border: 1px solid var(--rtf-line);
  background: var(--rtf-line);
  border-spacing: 1px;
}

.block,
.story-block {
  width: 100%;
  border: 1px solid var(--rtf-line);
  background: var(--rtf-line);
}

.block-title,
.storytitle {
  min-height: 28px;
  padding: 6px 7px 5px;
  color: var(--rtf-heading);
  font-size: 12px;
  font-weight: bold;
  background:
    linear-gradient(180deg, #7b776c 0%, #555147 54%, #454137 100%);
  border-bottom: 1px solid var(--rtf-line);
}

.storytitle {
  background:
    linear-gradient(180deg, #5b574c 0%, #4d493f 50%, #3a372f 100%);
}

.block-content,
.story-content {
  color: var(--rtf-text);
  background: var(--rtf-cell);
  padding: 6px;
  line-height: 1.35;
}

.story-content {
  min-height: 120px;
  background:
    linear-gradient(rgba(109, 106, 100, 0.97), rgba(109, 106, 100, 0.97)),
    repeating-linear-gradient(45deg, #77746c 0 12px, #6c6962 12px 24px);
  font-size: 10px;
}

.story-content p {
  margin: 0 0 10px;
}

.story-meta {
  padding: 6px;
  text-align: center;
  background: var(--rtf-cell);
  border-top: 1px solid var(--rtf-line);
}

.content,
.storycontent,
.tiny {
  color: var(--rtf-text);
  font-size: 10px;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

.small {
  color: var(--rtf-text);
  font-size: 9px;
}

.block-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.block-menu li::before {
  content: '\00b7';
  font-weight: bold;
  font-size: 16px;
  line-height: 0;
  margin-right: 2px;
}

.separator {
  display: block;
  margin: 4px 0;
  color: var(--rtf-text);
}

.user-line {
  display: block;
  margin: 2px 0;
}

.legacy-icon {
  display: inline-block;
  width: 14px;
  height: 10px;
  margin-right: 3px;
  vertical-align: -1px;
  background: #a7a58f;
  border: 1px solid #312f29;
  box-shadow: inset 0 0 0 1px #6d6a64;
}

.legacy-icon.group {
  width: 17px;
  height: 14px;
  border-radius: 1px;
}

.marquee-list {
  max-height: 160px;
  overflow: hidden;
}

.marquee-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  animation: legacy-scroll 24s linear infinite;
}

.marquee-list:hover ul {
  animation-play-state: paused;
}

@keyframes legacy-scroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-45%);
  }
}

.donation-table,
.compact-table {
  width: 100%;
  border-collapse: collapse;
}

.donation-table td,
.compact-table td,
.compact-table th {
  padding: 2px;
  vertical-align: top;
}

.compact-table th {
  color: var(--rtf-text);
  text-align: left;
  background:
    linear-gradient(180deg, #747168 0%, #59564c 50%, #4a473f 100%);
}

.server-panel {
  min-height: 220px;
  padding: 5px;
  text-align: center;
  color: #d0ceb8;
  background:
    linear-gradient(180deg, #514d44, #312f29);
  border: 1px solid #312f29;
}

.server-panel strong {
  display: block;
  color: #a7a58f;
  margin-bottom: 4px;
}

.status-light {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  background: #88a35b;
  border: 1px solid #25231f;
}

.shout-feed {
  height: 150px;
  overflow: hidden;
  margin-bottom: 5px;
  border: 1px solid #5c584d;
}

.shout-feed-inner {
  animation: legacy-scroll 36s linear infinite;
}

.shout-feed:hover .shout-feed-inner {
  animation-play-state: paused;
}

.shout {
  padding: 4px;
  background: var(--rtf-cell);
  border-bottom: 1px solid var(--rtf-line);
  overflow-wrap: anywhere;
}

.shout time {
  display: block;
  margin-top: 2px;
  color: var(--rtf-muted);
  font-size: 9px;
}

.album-thumb {
  display: block;
  width: 120px;
  max-height: 120px;
  object-fit: cover;
  height: auto;
  margin: 8px auto;
  border: 1px solid var(--rtf-line);
}

.join-badge {
  display: inline-grid;
  place-items: center;
  width: 120px;
  min-height: 52px;
  color: #d0ceb8;
  font-weight: bold;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  background:
    linear-gradient(180deg, #77746c, #4a473f);
  border: 2px outset #77746c;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
}

.score-grid img {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--rtf-line);
}

.notice {
  margin-bottom: 8px;
  padding: 5px;
  color: #1d1b17;
  background: #d0ceb8;
  border: 1px solid var(--rtf-line);
}

.form-grid {
  display: grid;
  gap: 5px;
}

.form-grid label {
  display: grid;
  gap: 2px;
}

.form-actions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.forum-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 110px;
  gap: 1px;
  background: var(--rtf-line);
  border: 1px solid var(--rtf-line);
}

.forum-index-row,
.topic-row {
  display: grid;
  gap: 1px;
  background: var(--rtf-line);
  border: 1px solid var(--rtf-line);
}

.forum-index-row {
  grid-template-columns: minmax(0, 1fr) 50px 50px 150px;
}

.forum-section-heading {
  padding: 6px;
  color: var(--rtf-text);
  font-weight: bold;
  background:
    linear-gradient(180deg, #747168 0%, #59564c 50%, #4a473f 100%);
  border: 1px solid var(--rtf-line);
}

.topic-row {
  grid-template-columns: minmax(0, 1fr) 50px 95px 50px 145px;
}

.forum-row > div,
.forum-row > a,
.forum-index-row > div,
.forum-index-row > a,
.topic-row > div,
.topic-row > a {
  display: block;
  padding: 6px;
  background: var(--rtf-cell);
  min-width: 0;
  overflow-wrap: anywhere;
}

.forum-row.header > div,
.forum-index-row.header > div,
.topic-row.header > div {
  color: var(--rtf-text);
  font-weight: bold;
  background:
    linear-gradient(180deg, #747168 0%, #59564c 50%, #4a473f 100%);
}

.post {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 1px;
  margin-bottom: 7px;
  background: var(--rtf-line);
  border: 1px solid var(--rtf-line);
}

.post-author,
.post-body {
  padding: 6px;
  background: var(--rtf-cell);
}

.post-body {
  white-space: pre-wrap;
}

.archive-post-body {
  white-space: normal;
}

.archive-post-body blockquote {
  margin: 6px 0;
  padding: 5px 8px;
  background: #646158;
  border: 1px solid var(--rtf-line);
}

.archive-post-body pre {
  white-space: pre-wrap;
}

.footer-strip {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  height: 17px;
}

.footer-strip > div {
  background:
    linear-gradient(180deg, #4a473f, #312f29);
}

@media (max-width: 1080px) {
  .bodyline {
    width: 94%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  body {
    background: #6d6a64;
  }

  .bodyline {
    width: 100%;
  }

  .legacy-frame {
    grid-template-columns: minmax(0, 1fr);
  }

  .legacy-border,
  .footer-strip {
    display: none;
  }

  .legacy-header {
    min-height: 0;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 3px 0;
  }

  .topbar-left,
  .topbar-center,
  .topbar-right {
    text-align: center;
    white-space: normal;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .column,
  .block-wrap {
    width: 100%;
  }

  .left-column {
    order: 2;
  }

  .main-column {
    order: 1;
  }

  .right-column {
    order: 3;
  }

  .score-grid {
    grid-template-columns: 1fr;
  }

  .forum-row {
    grid-template-columns: 1fr;
  }

  .forum-index-row,
  .topic-row {
    grid-template-columns: 1fr;
  }

  .forum-row.header,
  .forum-index-row.header,
  .topic-row.header {
    display: none;
  }

  .post {
    grid-template-columns: 1fr;
  }
}
