/* Foundation */
a {
  color: var(--sv-accent);
  text-decoration: none;
  transition: color var(--sv-motion), background-color var(--sv-motion), border-color var(--sv-motion), opacity var(--sv-motion), transform var(--sv-motion);
}

a:hover {
  color: var(--sv-header);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(var(--sv-accent-rgb), 0.28);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

#body {
  min-height: calc(100vh - var(--sv-header-height));
  padding: 20px 0 34px;
}

.container {
  width: min(100% - 32px, var(--sv-content-width));
  max-width: var(--sv-content-width);
  padding-right: 0;
  padding-left: 0;
}

.text-muted,
.text-grey {
  color: var(--sv-muted) !important;
}

.card {
  color: var(--sv-ink);
  background: var(--sv-paper);
  border: 1px solid var(--sv-line);
  border-radius: var(--sv-radius);
  box-shadow: var(--sv-shadow);
}

.card-header,
.card-footer {
  background: var(--sv-paper-alt);
  border-color: var(--sv-line);
}

.btn {
  min-height: 40px;
  border-radius: var(--sv-radius-small);
  font-weight: 650;
}

.btn-primary {
  color: #fff;
  background: var(--sv-accent);
  border-color: var(--sv-accent);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  color: #fff;
  background: var(--sv-header-soft);
  border-color: var(--sv-header-soft);
}

.btn-outline-primary {
  color: var(--sv-accent);
  border-color: var(--sv-accent);
}

.btn-outline-primary:hover {
  color: #fff;
  background: var(--sv-accent);
  border-color: var(--sv-accent);
}

.form-control,
.form-select,
.input-group-text {
  min-height: 42px;
  color: var(--sv-ink);
  background-color: #fff;
  border-color: #cbd2c8;
  border-radius: var(--sv-radius-small);
}

.form-control:focus,
.form-select:focus {
  color: var(--sv-ink);
  border-color: var(--sv-accent);
  box-shadow: 0 0 0 3px rgba(var(--sv-accent-rgb), 0.16);
}

.dropdown-menu {
  padding: 6px;
  color: var(--sv-ink);
  background: var(--sv-paper);
  border: 1px solid var(--sv-line);
  border-radius: var(--sv-radius);
  box-shadow: 0 8px 24px rgba(29, 45, 35, 0.12);
}

.dropdown-item {
  min-height: 40px;
  padding: 8px 10px;
  color: var(--sv-ink);
  border-radius: var(--sv-radius-small);
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--sv-header);
  background: var(--sv-sky);
}

/* Header */
.sv-header {
  position: relative;
  z-index: 1030;
  height: var(--sv-header-height);
  color: #fff;
  background: var(--sv-header);
  border-bottom: 3px solid var(--sv-gold);
  transition: transform var(--sv-motion);
}

.sv-header-sticky {
  position: sticky;
  top: 0;
}

.sv-header.is-hidden {
  transform: translateY(calc(-100% - 4px));
}

.sv-header-inner {
  display: flex;
  align-items: center;
  min-height: calc(var(--sv-header-height) - 3px);
  gap: 18px;
}

.sv-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #fff;
  flex: 0 0 auto;
}

.sv-brand:hover {
  color: #fff;
}

.sv-brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: cover;
  image-rendering: pixelated;
}

.sv-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 0;
  line-height: 1.15;
}

.sv-brand-copy strong {
  overflow: hidden;
  max-width: 190px;
  color: #fff7d6;
  font-family: var(--sv-font-display);
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-brand-copy small {
  overflow: hidden;
  max-width: 190px;
  margin-top: 3px;
  color: #c9e1df;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-primary-nav {
  align-self: stretch;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}

.sv-primary-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 108px;
  padding: 0 12px;
  overflow: hidden;
  color: #dcebea;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-primary-link::after {
  position: absolute;
  right: 12px;
  bottom: 7px;
  left: 12px;
  height: 3px;
  content: "";
  background: transparent;
}

.sv-primary-link:hover,
.sv-primary-link.active {
  color: #fff7d6;
  background: rgba(255, 255, 255, 0.06);
}

.sv-primary-link.active::after {
  background: var(--sv-gold);
}

.sv-header-search {
  display: flex;
  align-items: center;
  width: min(260px, 21vw);
  height: 38px;
  margin-left: auto;
  color: #d9e9e8;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--sv-radius-small);
}

.sv-header-search .bi {
  margin-left: 12px;
  font-size: 15px;
}

.sv-header-search input {
  width: 100%;
  height: 100%;
  padding: 0 10px;
  color: #fff;
  background: transparent;
  border: 0;
  outline: 0;
}

.sv-header-search input::placeholder {
  color: #c2d9d7;
  opacity: 1;
}

.sv-header-search:focus-within {
  background: rgba(255, 255, 255, 0.15);
  border-color: #e7ca72;
}

.sv-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.sv-header-plugin-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-header-plugin-actions > li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-header-plugin-actions::marker,
.sv-header-plugin-actions > li::marker {
  content: "";
  display: none;
}

.sv-header-plugin-actions:empty {
  display: none;
}

.sv-header-user-hooks {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-header-user-hooks > li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-header-user-hooks::marker,
.sv-header-user-hooks > li::marker {
  content: "";
  display: none;
}

.sv-header-user-hooks .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  gap: 5px;
  padding: 0 8px;
  color: #eff7f4;
  border: 0;
  font-size: 13px;
  font-weight: 650;
}

.sv-header-plugin-actions .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  gap: 5px;
  padding: 0 8px;
  color: #eff7f4;
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 650;
}

.sv-header-plugin-actions .nav-link:hover,
.sv-header-plugin-actions .nav-link:focus {
  color: #fff7d6;
  background: rgba(255, 255, 255, 0.1);
}

.sv-header-search + .sv-header-actions {
  margin-left: 0;
}

.sv-icon-button,
.sv-avatar-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: var(--sv-radius-small);
}

.sv-icon-button:hover,
.sv-avatar-button:hover {
  color: #fff7d6;
  background: rgba(255, 255, 255, 0.1);
}

.sv-icon-button .bi {
  font-size: 21px;
}

.sv-icon-button img,
.sv-avatar-button img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.sv-avatar-button img {
  border: 2px solid rgba(255, 247, 214, 0.72);
}

.sv-text-action,
.sv-compose-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  gap: 6px;
  padding: 0 13px;
  border-radius: var(--sv-radius-small);
  font-size: 14px;
  font-weight: 700;
}

.sv-text-action {
  color: #eff7f4;
}

.sv-text-action:hover {
  color: #fff7d6;
  background: rgba(255, 255, 255, 0.08);
}

.sv-compose-button {
  color: #33270d;
  background: #efc85d;
}

.sv-compose-button:hover {
  color: #211a08;
  background: #f6d77c;
}

/* Home landmark */
.sv-valley-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  height: 178px;
  margin-bottom: 14px;
  overflow: hidden;
  color: #fff;
  background: #65b9c3;
  border-radius: var(--sv-radius);
  box-shadow: var(--sv-shadow);
  isolation: isolate;
}

.sv-valley-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: rgba(13, 48, 48, 0.08);
  pointer-events: none;
}

.sv-valley-hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  image-rendering: pixelated;
}

.sv-valley-hero-copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 650px;
  padding: 20px 30px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(16, 42, 35, 0.7);
}

.sv-season-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 5px;
  color: #fff2bb;
  font-size: 13px;
  font-weight: 750;
}

.sv-valley-hero h1 {
  margin: 0;
  color: #fff;
  font-family: var(--sv-font-display);
  font-size: 30px;
  font-weight: 850;
  line-height: 1.25;
}

.sv-valley-hero-copy > p {
  display: -webkit-box;
  max-width: 560px;
  margin: 6px 0 0;
  overflow: hidden;
  color: #f6fbf5;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sv-hero-stats {
  display: flex;
  align-self: end;
  margin: 0 18px 18px 0;
  padding: 10px 4px;
  color: var(--sv-ink);
  background: rgba(255, 253, 247, 0.94);
  border-radius: var(--sv-radius-small);
}

.sv-hero-stats > div {
  min-width: 74px;
  padding: 0 13px;
  text-align: center;
}

.sv-hero-stats > div + div {
  border-left: 1px solid #d7ddd3;
}

.sv-hero-stats dt,
.sv-hero-stats dd {
  margin: 0;
}

.sv-hero-stats dt {
  color: var(--sv-muted);
  font-size: 11px;
  font-weight: 600;
}

.sv-hero-stats dd {
  color: var(--sv-header);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.sv-announcement {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 10px;
  margin-bottom: 12px;
  padding: 9px 14px;
  color: #49370e;
  background: #fff4c7;
  border-left: 4px solid var(--sv-gold);
  border-radius: 0 var(--sv-radius-small) var(--sv-radius-small) 0;
}

.sv-announcement .bi {
  flex: 0 0 auto;
  color: #8a5f0b;
  font-size: 17px;
}

.sv-announcement span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sv-forum-rail {
  display: flex;
  min-height: 58px;
  margin-bottom: 14px;
  overflow-x: auto;
  color: var(--sv-muted);
  background: var(--sv-paper);
  border-bottom: 1px solid var(--sv-line);
  scrollbar-width: none;
}

.sv-forum-rail::-webkit-scrollbar {
  display: none;
}

.sv-forum-rail a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  gap: 8px;
  padding: 8px 17px;
  color: var(--sv-muted);
  font-size: 14px;
  font-weight: 650;
}

.sv-forum-rail a::after {
  position: absolute;
  right: 15px;
  bottom: 0;
  left: 15px;
  height: 3px;
  content: "";
  background: transparent;
}

.sv-forum-rail a:hover,
.sv-forum-rail a.active {
  color: var(--sv-header);
  background: var(--sv-paper-alt);
}

.sv-forum-rail a.active::after {
  background: var(--sv-accent);
}

.sv-forum-rail img,
.sv-rail-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 4px;
  object-fit: cover;
}

.sv-rail-icon {
  display: grid;
  color: #fff;
  background: var(--sv-berry);
  place-items: center;
}

/* Feed */
.sv-home-layout {
  align-items: flex-start;
}

.sv-thread-panel {
  overflow: hidden;
}

.sv-feed-header {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 12px 0 8px;
  background: var(--sv-paper);
}

.sv-feed-tabs {
  display: flex;
  align-self: stretch;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.sv-feed-tablist {
  min-width: 0;
  align-self: stretch;
  overflow: hidden;
}

.sv-feed-tabs > li {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
  list-style: none;
}

.sv-feed-tabs::-webkit-scrollbar {
  display: none;
}

.sv-feed-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  gap: 7px;
  padding: 0 13px;
  color: var(--sv-muted);
  font-size: 14px;
  font-weight: 650;
}

.sv-feed-tab::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 3px;
  content: "";
  background: transparent;
}

.sv-feed-tab:hover,
.sv-feed-tab.active {
  color: var(--sv-accent);
}

.sv-feed-tab.active::after {
  background: var(--sv-accent);
}

.sv-feed-tab .bi {
  font-size: 15px;
}

.sv-feed-tabs > .nav-item > .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  min-height: 42px;
  padding: 0 12px;
  color: #626d66;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 13px;
  font-weight: 650;
}

.sv-feed-tabs > .nav-item > .nav-link::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  content: "";
  background: transparent;
  border-radius: 2px 2px 0 0;
}

.sv-feed-tabs > .nav-item > .nav-link:hover,
.sv-feed-tabs > .nav-item > .nav-link.active {
  color: var(--sv-accent);
}

.sv-feed-tabs > .nav-item > .nav-link.active::after {
  background: var(--sv-accent);
}

.sv-feed-tabs .nav-link i,
.sv-forum-tabs .nav-link i {
  display: none !important;
}

.sv-feed-compose {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 6px;
  margin-left: auto;
  padding: 0 11px;
  color: #fff;
  background: var(--sv-accent);
  border-radius: var(--sv-radius-small);
  font-size: 13px;
  font-weight: 700;
}

.sv-feed-compose:hover {
  color: #fff;
  background: var(--sv-header-soft);
}

.threadlist > .thread,
.sv-thread-panel .threadlist > .thread {
  position: relative;
  min-width: 0;
  min-height: 82px;
  padding: 14px 16px;
  color: var(--sv-ink);
  background: var(--sv-paper);
  border-bottom: 1px solid var(--sv-line);
  transition: background-color var(--sv-motion);
}

.threadlist > .thread:last-child,
.sv-thread-panel .threadlist > .thread:last-child {
  border-bottom: 0;
}

.threadlist > .thread:hover,
.sv-thread-panel .threadlist > .thread:hover {
  background: #fbfcf7;
}

.threadlist > .thread > a,
.sv-thread-panel .threadlist > .thread > a {
  flex: 0 0 auto;
}

.threadlist > .thread > a img.avatar-3,
.sv-thread-panel .threadlist > .thread > a img.avatar-3 {
  width: 44px;
  height: 44px;
  border: 2px solid #e2c56b;
  border-radius: 5px;
  object-fit: cover;
  background: var(--sv-paper-alt);
}

.threadlist > .thread > .flex-grow-1,
.sv-thread-panel .threadlist > .thread > .flex-grow-1 {
  min-width: 0;
}

.threadlist .subject {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  color: var(--sv-ink);
  font-size: 16px;
  font-weight: 690;
  line-height: 1.45;
}

.threadlist .subject > a:not(.sv-thread-badge) {
  min-width: 0;
  overflow: hidden;
  color: var(--sv-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.threadlist .thread:hover .subject > a:not(.sv-thread-badge) {
  color: var(--sv-accent);
}

.threadlist .thread > .flex-grow-1 > .d-flex {
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.threadlist .thread > .flex-grow-1 > .d-flex > div:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.threadlist .username,
.threadlist .date {
  color: var(--sv-muted) !important;
  font-size: 12px;
}

.threadlist .thread > .flex-grow-1 > .d-flex > .text-muted {
  min-width: 42px;
  flex: 0 0 auto;
  text-align: right;
}

.threadlist .thread > .flex-grow-1 > .d-flex > .text-muted span:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 25px;
  padding: 0 8px;
  color: #526058;
  background: #edf1e9;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

.threadlist .thread > .flex-grow-1 > .d-flex > .text-muted .icon-comment-o {
  display: none;
}

.sv-thread-badge {
  display: inline-flex;
  align-items: center;
  max-width: 92px;
  min-height: 21px;
  padding: 2px 7px;
  overflow: hidden;
  color: #375a47;
  background: #e4efe6;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-thread-badge:hover { color: #284735; }
.sv-thread-badge-tone-1 { color: #315a6d; background: #e2eff3; }
.sv-thread-badge-tone-2 { color: #765515; background: #f8edc9; }
.sv-thread-badge-tone-3 { color: #833d48; background: #f6e4e7; }
.sv-thread-badge-tone-4 { color: #5a507a; background: #ece8f4; }

.sv-thread-type-badge {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  padding: 2px 7px;
  color: #355367;
  background: #e8f1f5;
  border: 1px solid #d3e2e9;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.sv-thread-type-badge .bi {
  font-size: 11px;
  line-height: 1;
}

.sv-thread-type-bounty {
  color: #765515;
  background: #fff5d8;
  border-color: #ead8a0;
}

.sv-thread-type-poll {
  color: #315a6d;
  background: #e5f1f5;
  border-color: #cfe1e8;
}

.sv-thread-mobile-time {
  display: none;
}

body.sv-hide-thread-type-badges .threadlist .sv-thread-type-badge,
body.sv-hide-thread-type-badges .threadlist .xqa-thread-badge {
  display: none !important;
}

body.sv-home-page.sv-hide-home-author .threadlist .username,
body.sv-home-page.sv-hide-home-author .threadlist .thread > .flex-grow-1 > .d-flex > div:first-child > span > .text-grey.mx-2 {
  display: none !important;
}

body.sv-density-compact .threadlist > .thread {
  min-height: 70px;
  padding-top: 9px;
  padding-bottom: 9px;
}

/* Aside */
.sv-home-aside {
  position: sticky;
  top: calc(var(--sv-header-height) + 14px);
}

.sv-new-thread {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 8px;
  margin-bottom: 12px;
  color: #fff;
  background: var(--sv-accent);
  border-radius: var(--sv-radius-small);
  font-weight: 750;
}

.sv-new-thread:hover {
  color: #fff;
  background: var(--sv-header-soft);
  transform: translateY(-1px);
}

.sv-widget {
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: none;
}

.sv-widget .card-header {
  min-height: 45px;
  padding: 11px 14px;
  background: var(--sv-paper-alt);
}

.sv-widget .card-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--sv-header);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.sv-widget .card-header .bi {
  color: var(--sv-berry);
  font-size: 16px;
}

.sv-widget .card-body {
  padding: 14px;
}

.sv-site-note p {
  margin: 0 0 13px;
  color: var(--sv-muted);
  font-size: 13px;
  line-height: 1.7;
}

.sv-side-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--sv-line);
}

.sv-side-stats > div {
  text-align: center;
}

.sv-side-stats dt,
.sv-side-stats dd {
  margin: 0;
}

.sv-side-stats dt {
  color: var(--sv-muted);
  font-size: 11px;
}

.sv-side-stats dd {
  color: var(--sv-header);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sv-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sv-tag-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  color: #4e5c53;
  background: #edf1e9;
  border-radius: 3px;
  font-size: 12px;
}

.sv-tag-cloud a:nth-child(3n+2) {
  color: #6d5017;
  background: #f8edc9;
}

.sv-tag-cloud a:nth-child(3n) {
  color: #76414b;
  background: #f6e4e7;
}

.sv-tag-cloud a:hover {
  color: #fff;
  background: var(--sv-accent);
}

.sv-user-list {
  padding: 4px 12px !important;
}

.sv-user-list a,
.sv-quick-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  gap: 9px;
  color: var(--sv-ink);
  border-bottom: 1px solid var(--sv-line);
}

.sv-user-list a:last-child,
.sv-quick-links a:last-child {
  border-bottom: 0;
}

.sv-user-list a:hover,
.sv-quick-links a:hover {
  color: var(--sv-accent);
}

.sv-user-list img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 4px;
  object-fit: cover;
}

.sv-user-list span,
.sv-quick-links span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-user-list .bi,
.sv-quick-links .bi {
  flex: 0 0 auto;
  color: #98a099;
  font-size: 12px;
}

.sv-quick-links {
  padding: 4px 14px;
}

/* Mobile navigation */
.sv-forum-sheet {
  height: min(78vh, 620px) !important;
  color: var(--sv-ink);
  background: var(--sv-paper);
  border-top: 3px solid var(--sv-gold);
  border-radius: 8px 8px 0 0;
}

.sv-forum-sheet .offcanvas-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--sv-line);
}

.sv-forum-sheet .offcanvas-title {
  color: var(--sv-header);
  font-family: var(--sv-font-display);
  font-size: 18px;
  font-weight: 800;
}

.sv-forum-sheet-subtitle {
  margin: 2px 0 0;
  color: var(--sv-muted);
  font-size: 12px;
}

.sv-forum-sheet .offcanvas-body {
  padding: 0 18px calc(18px + env(safe-area-inset-bottom));
}

.sv-forum-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.sv-forum-item {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 70px;
  gap: 11px;
  color: var(--sv-ink);
  border-bottom: 1px solid var(--sv-line);
}

.sv-forum-item:hover {
  color: var(--sv-accent);
}

.sv-forum-icon,
.sv-forum-symbol {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 5px;
  object-fit: cover;
}

.sv-forum-symbol {
  display: grid;
  color: #fff;
  background: var(--sv-berry);
  place-items: center;
}

.sv-forum-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.sv-forum-copy strong,
.sv-forum-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-forum-copy strong {
  font-size: 14px;
  font-weight: 750;
}

.sv-forum-copy small {
  margin-top: 2px;
  color: var(--sv-muted);
  font-size: 11px;
}

.sv-forum-item > .bi {
  flex: 0 0 auto;
  color: #9ba29b;
  font-size: 12px;
}

.sv-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1025;
  display: grid;
  grid-template-columns: 1fr 1fr 68px 1fr 1fr;
  height: calc(var(--sv-bottom-nav-height) + env(safe-area-inset-bottom));
  padding: 4px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
  background: rgba(255, 253, 247, 0.98);
  border-top: 1px solid var(--sv-line);
  transition: transform var(--sv-motion);
}

.sv-bottom-nav.is-hidden {
  transform: translateY(calc(100% + 22px));
}

.sv-bottom-nav > a,
.sv-bottom-nav > button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
  padding: 0;
  color: #67716a;
  background: transparent;
  border: 0;
  font-size: 10px;
}

.sv-bottom-nav .bi {
  font-size: 20px;
  line-height: 1.2;
}

.sv-bottom-nav > a.active,
.sv-bottom-nav > button.active {
  color: var(--sv-accent);
  font-weight: 750;
}

.sv-bottom-nav .sv-bottom-create {
  align-self: start;
  width: 52px;
  height: 52px;
  margin: -16px auto 0;
  color: #fff;
  background: var(--sv-berry);
  border: 4px solid var(--sv-paper);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(80, 41, 45, 0.18);
}

.sv-bottom-nav .sv-bottom-create .bi {
  font-size: 25px;
}

.sv-bottom-notice {
  position: relative;
}

.sv-bottom-notice-badge {
  position: absolute;
  top: 1px;
  left: calc(50% + 7px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #fff;
  background: #c53d4b;
  border: 2px solid var(--sv-paper);
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Core pages */
.breadcrumb {
  margin-bottom: 12px;
  color: var(--sv-muted);
  font-size: 13px;
}

.sv-desktop-forums {
  margin-left: 10px;
}

.sv-desktop-forums-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  gap: 6px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 680;
}

.sv-desktop-forums-toggle:hover,
.sv-desktop-forums-toggle[aria-expanded="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sv-desktop-forums-toggle .bi {
  font-size: 10px;
}

.sv-desktop-forums-menu {
  width: 232px;
  max-height: min(68vh, 520px);
  overflow-y: auto;
}

.sv-desktop-forums-menu .dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sv-desktop-forums-menu .dropdown-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-desktop-forums-menu .dropdown-item small {
  flex: 0 0 auto;
  color: var(--sv-muted);
  font-size: 10px;
}

.breadcrumb a {
  color: var(--sv-muted);
}

.breadcrumb a:hover {
  color: var(--sv-accent);
}

.card-thread,
.card-postlist,
.card-threadlist,
.card-user-info,
.card-body > form,
#body .main > .card {
  border-color: var(--sv-line);
}

.card-thread .card-header,
.card-postlist .card-header,
.card-threadlist .card-header {
  color: var(--sv-ink);
}

.card-thread .card-title,
.card-postlist .card-title,
.card-thread h1,
.card-thread h2 {
  color: var(--sv-ink);
  font-family: var(--sv-font-display);
  font-weight: 800;
}

.card-thread .card-body > .d-flex > .flex-grow-1,
.card-thread .card-body > .d-flex > div:last-child {
  min-width: 0;
}

.card-postlist > .card-body {
  padding: 0 18px;
}

.card-postlist .postlist > li {
  min-width: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--sv-line);
}

.card-postlist .postlist > li:last-child {
  border-bottom: 0;
}

.card-postlist .postlist > li > a:first-child img.avatar-3 {
  width: 46px;
  height: 46px;
  border: 2px solid #e2c56b;
  border-radius: 5px;
  object-fit: cover;
}

.card-postlist .postlist > li > .flex-grow-1,
.card-postlist .newpost > .flex-grow-1 {
  min-width: 0;
}

.card-postlist .username a {
  color: var(--sv-header) !important;
  font-weight: 750;
}

.card-postlist .postlist .message,
#quick_reply_form .message,
.card-thread .message {
  color: #303631;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.message h1,
.message h2,
.message h3,
.message h4,
.message h5,
.message h6 {
  margin: 1.35em 0 0.55em;
  color: var(--sv-ink);
  font-family: var(--sv-font-display);
  font-weight: 800;
  line-height: 1.35;
}

.message img,
.message video,
.message iframe,
.message pre,
.message table {
  max-width: 100%;
}

.message img,
.message video {
  height: auto;
  border-radius: var(--sv-radius-small);
}

.message blockquote {
  margin: 1em 0;
  padding: 10px 14px;
  color: #55615a;
  background: var(--sv-paper-alt);
  border-left: 4px solid var(--sv-gold);
}


.message pre,
.message code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.message pre {
  padding: 14px;
  overflow: auto;
  color: #edf5ef;
  background: #25352f;
  border-radius: var(--sv-radius-small);
}

/* xmd_editor 的 editor.css 用同优先级的 .xmd-prose pre 设置浅色背景，
   加载顺序在主题之后时会覆盖深色背景，但文字颜色仍取自上面规则，形成白底白字。
   用组合选择器提高优先级，保证主题样式不依赖插件加载顺序；border:0 去掉 editor.css 的浅色描边。 */
.message .xmd-prose pre {
  color: #edf5ef;
  background: #25352f;
  border: 0;
}
 
 
.message :not(pre) > code {
  padding: 2px 5px;
  color: #7e3943;
  background: #f6e7e8;
  border-radius: 3px;
}

.message table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.message th,
.message td {
  padding: 8px 10px;
  border: 1px solid var(--sv-line);
}

.message th {
  background: var(--sv-paper-alt);
}

#quick_reply_form textarea,
.card-postlist .newpost textarea {
  min-height: 130px;
  resize: vertical;
}

.pagination {
  gap: 4px;
}

.page-link {
  min-width: 38px;
  min-height: 38px;
  display: inline-grid;
  color: var(--sv-accent);
  background: var(--sv-paper);
  border-color: var(--sv-line);
  border-radius: var(--sv-radius-small) !important;
  place-items: center;
}

.page-link:hover {
  color: var(--sv-header);
  background: var(--sv-sky);
  border-color: #b9cfcd;
}

.page-item.active .page-link {
  color: #fff;
  background: var(--sv-accent);
  border-color: var(--sv-accent);
}

.alert {
  color: var(--sv-ink);
  border: 0;
  border-left: 4px solid currentColor;
  border-radius: 0 var(--sv-radius-small) var(--sv-radius-small) 0;
}

.alert-primary { color: #2d5f70; background: #e4f1f3; }
.alert-success { color: #2f6849; background: #e7f1e9; }
.alert-warning { color: #765713; background: #fff3c5; }
.alert-danger { color: #923c49; background: #fae7ea; }

.modal-content {
  color: var(--sv-ink);
  background: var(--sv-paper);
  border: 1px solid var(--sv-line);
  border-radius: var(--sv-radius);
  box-shadow: 0 8px 24px rgba(35, 45, 37, 0.14);
}

.modal-header,
.modal-footer {
  border-color: var(--sv-line);
}

.nav-tabs {
  border-color: var(--sv-line);
}

.nav-tabs .nav-link {
  color: var(--sv-muted);
  border-radius: var(--sv-radius-small) var(--sv-radius-small) 0 0;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
  color: var(--sv-accent);
  background: var(--sv-paper);
  border-color: var(--sv-line) var(--sv-line) var(--sv-paper);
}

.table {
  color: var(--sv-ink);
}

.table > :not(caption) > * > * {
  border-color: var(--sv-line);
}

footer,
#footer {
  color: var(--sv-muted);
  background: transparent;
}

.tap {
  -webkit-tap-highlight-color: rgba(var(--sv-accent-rgb), 0.1);
}

.avatar-1,
.avatar-2,
.avatar-3,
.avatar-4,
.avatar-5 {
  object-fit: cover;
}

/* 1.1 interface refinement */
.card,
.card-header,
.card-footer,
.nav-tabs,
.nav-tabs .nav-link,
.threadlist > .thread,
.sv-feed-header,
.sv-forum-tabbar,
.sv-forum-overview,
.card-postlist .postlist > li {
  background-image: none !important;
}

#body {
  container-type: inline-size;
  padding-top: 16px;
}

.sv-header {
  height: 58px;
  background: rgba(18, 59, 61, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  transition: transform var(--sv-motion), background-color var(--sv-motion), border-color var(--sv-motion), box-shadow var(--sv-motion);
}

.sv-header-inner {
  min-height: 58px;
  gap: 10px;
}

.sv-brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.sv-brand-copy {
  margin-left: 8px;
}

.sv-brand-copy strong {
  max-width: 260px;
  color: #fff;
  font-size: 15px;
  font-weight: 760;
}

.sv-header-actions {
  gap: 2px;
}

.sv-icon-button,
.sv-avatar-button {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.sv-icon-button .bi {
  font-size: 18px;
}

.sv-text-action,
.sv-compose-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.sv-home-page .sv-header:not(.is-scrolled) {
  background: rgba(13, 47, 48, 0.58);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sv-home-page .sv-header.is-scrolled {
  background: rgba(18, 59, 61, 0.97);
  box-shadow: 0 2px 10px rgba(18, 43, 38, 0.08);
}

.sv-home-page #body {
  padding-top: 0;
}

.sv-valley-hero {
  display: block;
  width: 100cqw;
  height: 214px;
  margin: -58px 0 14px calc(50% - 50cqw);
  padding-top: 58px;
  overflow: hidden;
  color: #fff;
  background: #5caeb4;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sv-valley-hero::after {
  z-index: -1;
  background: rgba(14, 45, 38, 0.24);
}

.sv-valley-hero-inner {
  position: relative;
  display: flex;
  height: 100%;
  align-items: center;
}

.sv-valley-hero-copy {
  display: block;
  max-width: 670px;
  padding: 16px 0 12px;
  text-shadow: 0 1px 3px rgba(12, 37, 31, 0.72);
}

.sv-valley-hero h1 {
  margin: 0;
  font-family: var(--sv-font-sans);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.25;
}

.sv-valley-hero-copy > p:last-child {
  max-width: 620px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  line-height: 1.55;
}

.sv-season-label,
.sv-forum-rail {
  display: none !important;
}

.sv-hero-stats {
  display: flex;
  width: max-content;
  margin: 12px 0 0;
  padding: 8px 3px;
  color: var(--sv-ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(26, 48, 38, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: none;
}

.sv-hero-stats > div {
  min-width: 74px;
  padding: 0 12px;
  text-align: center;
}

.sv-hero-stats > div + div {
  border-left: 1px solid #e2e7e3;
}

.sv-hero-stats dt,
.sv-hero-stats dd {
  margin: 0;
}

.sv-hero-stats dt {
  color: var(--sv-muted);
  font-size: 10px;
  font-weight: 600;
}

.sv-hero-stats dd {
  color: #183e35;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.sv-announcement {
  position: relative;
  min-height: 40px;
  margin-bottom: 12px;
  padding: 8px 40px 8px 22px;
  color: #51451f;
  background: #fff9e8;
  border: 1px solid #eee3bf;
  border-radius: 6px;
  box-shadow: none;
}

.sv-announcement::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 8px;
  width: 5px;
  content: "";
  background: var(--sv-gold);
  border-radius: 4px;
}

.sv-announcement > .bi-megaphone {
  display: none;
}

.sv-announcement span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-announcement-arrow {
  position: absolute;
  right: 13px;
  color: #887026;
  font-size: 14px;
}

a.sv-announcement:hover {
  color: #3f361c;
  background: #fff6d8;
  border-color: #e3d49d;
}

.sv-thread-panel {
  overflow: hidden;
  border-color: var(--sv-line);
  box-shadow: none;
}

.sv-feed-header {
  min-height: 43px;
  padding: 0 8px;
  background: #fff !important;
  border-bottom: 1px solid var(--sv-line);
}

.sv-feed-tabs {
  min-height: 42px;
}

.sv-feed-tab {
  min-height: 42px;
  gap: 0;
  padding: 0 12px;
  color: #626d66;
  font-size: 13px;
  font-weight: 650;
}

.sv-feed-tab .bi {
  display: none !important;
}

.sv-feed-tab::after {
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  border-radius: 2px 2px 0 0;
}

.sv-feed-tab:hover,
.sv-feed-tab.active {
  color: var(--sv-accent);
  background: transparent;
}

.sv-feed-compose {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.threadlist > .thread,
.sv-thread-panel .threadlist > .thread {
  min-height: 74px;
  padding: 11px 14px;
  background: #fff !important;
}

.threadlist > .thread:hover,
.sv-thread-panel .threadlist > .thread:hover {
  background: #f8faf8 !important;
}

.threadlist > .thread > a img.avatar-3,
.sv-thread-panel .threadlist > .thread > a img.avatar-3 {
  width: 40px;
  height: 40px;
  border: 1px solid #d9dfda;
  border-radius: 5px;
}

.threadlist .subject {
  gap: 6px;
  font-size: 15px;
  font-weight: 680;
}

.threadlist .thread > .flex-grow-1 > .d-flex > .text-muted span:last-child {
  min-width: 32px;
  height: 23px;
  padding: 0 6px;
  color: #59655e;
  background: #f0f3f0;
  border-radius: 3px;
}

.sv-thread-badge {
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
}

body.sv-density-compact .threadlist > .thread {
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.sv-widget {
  border-color: var(--sv-line);
}

.sv-widget .card-header {
  min-height: 41px;
  padding: 10px 13px;
  background: #fff !important;
}

.sv-widget .card-header h2 {
  color: var(--sv-ink);
  font-size: 13px;
  font-weight: 750;
}

.sv-widget .card-header .bi {
  display: none;
}

.sv-new-thread {
  min-height: 40px;
  margin-bottom: 10px;
  font-size: 13px;
  border-radius: 4px;
}

/* Compact breadcrumb shared by forum and thread pages */
.breadcrumb,
.sv-breadcrumb {
  display: flex;
  align-items: center;
  min-height: 30px;
  gap: 6px;
  margin: -2px 0 8px;
  padding: 0;
  overflow: hidden;
  color: var(--sv-muted);
  background: transparent;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 12px;
  white-space: nowrap;
}

.breadcrumb-item,
.breadcrumb-item a,
.sv-breadcrumb a,
.sv-breadcrumb span {
  min-width: 0;
  overflow: hidden;
  color: var(--sv-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-item.active,
.breadcrumb-item.active a,
.sv-breadcrumb span {
  color: #49534d;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #a3aba5;
}

.sv-breadcrumb .bi {
  flex: 0 0 auto;
  color: #a3aba5;
  font-size: 9px;
}

/* Forum overview */
.sv-forum-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  padding: 17px 18px;
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 6px;
}

.sv-forum-overview-icon {
  width: 54px;
  height: 54px;
  object-fit: cover;
  background: var(--sv-paper-alt);
  border: 1px solid var(--sv-line);
  border-radius: 5px;
}

.sv-forum-overview-copy {
  min-width: 0;
}

.sv-forum-overview h1 {
  margin: 0;
  color: var(--sv-ink);
  font-family: var(--sv-font-sans);
  font-size: 20px;
  font-weight: 780;
  line-height: 1.35;
}

.sv-forum-brief {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--sv-muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sv-forum-brief:empty {
  display: none;
}

.sv-forum-moderators {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  margin-top: 7px;
  color: var(--sv-muted);
  font-size: 12px;
}

.sv-forum-moderator-label {
  flex: 0 0 auto;
  color: #59635c;
  font-weight: 700;
}

.sv-forum-moderators a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  color: var(--sv-accent);
}

.sv-forum-moderators img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.sv-forum-moderator-empty {
  color: #89918b;
}

.sv-forum-overview-stats {
  display: flex;
  margin: 0;
}

.sv-forum-overview-stats > div {
  min-width: 70px;
  padding: 0 13px;
  text-align: center;
}

.sv-forum-overview-stats > div + div {
  border-left: 1px solid var(--sv-line);
}

.sv-forum-overview-stats dt,
.sv-forum-overview-stats dd {
  margin: 0;
}

.sv-forum-overview-stats dt {
  color: var(--sv-muted);
  font-size: 11px;
  font-weight: 500;
}

.sv-forum-overview-stats dd {
  color: var(--sv-ink);
  font-size: 17px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.sv-forum-tabbar {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 10px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 6px;
}

.sv-forum-thread-panel {
  margin-top: 2px;
}

.sv-forum-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 136px;
  gap: 24px;
  padding: 28px 30px;
  color: var(--sv-muted);
  background: var(--sv-paper);
}

.sv-forum-empty-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.sv-forum-empty-copy strong {
  color: var(--sv-ink);
  font-size: 16px;
  font-weight: 760;
}

.sv-forum-empty-copy span {
  font-size: 13px;
  line-height: 1.55;
}

.sv-forum-empty > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 12px;
  color: #fff;
  background: var(--sv-accent);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.sv-forum-tabs {
  display: flex;
  align-self: stretch;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.sv-forum-tablist {
  min-width: 0;
  align-self: stretch;
  overflow: hidden;
}

.sv-forum-tabs > li {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
  list-style: none;
}

.sv-forum-tabs::-webkit-scrollbar {
  display: none;
}

.sv-forum-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding: 0 12px;
  color: #626d66;
  font-size: 13px;
  font-weight: 650;
}

.sv-forum-tabs a::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  content: "";
  background: transparent;
  border-radius: 2px 2px 0 0;
}

.sv-forum-tabs a:hover,
.sv-forum-tabs a.active {
  color: var(--sv-accent);
}

.sv-forum-tabs a.active::after {
  background: var(--sv-accent);
}

.sv-forum-create {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 5px;
  margin-left: auto;
  padding: 0 10px;
  color: #fff;
  background: var(--sv-accent);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.sv-forum-create:hover {
  color: #fff;
  background: var(--sv-header-soft);
}

.sv-forum-announcement {
  color: #4d5851;
  font-size: 13px;
  line-height: 1.7;
}

/* Thread reading layout */
.card-thread,
.card-postlist {
  overflow: hidden;
  background: #fff;
  border-color: var(--sv-line);
  box-shadow: none;
}

.card-thread {
  margin-bottom: 12px;
}

.card-thread > .card-body {
  padding: 18px 20px;
}

.card-thread > .card-body > .d-flex {
  align-items: flex-start;
}

.card-thread > .card-body > .d-flex > a:first-child {
  flex: 0 0 auto;
}

.card-thread > .card-body > .d-flex > a:first-child .avatar-3 {
  width: 42px;
  height: 42px;
  margin-right: 12px !important;
  object-fit: cover;
  border: 1px solid #d9dfda;
  border-radius: 5px;
}

.card-thread h4,
.card-thread .card-title {
  margin: 0 0 5px;
  color: var(--sv-ink);
  font-family: var(--sv-font-sans);
  font-size: 21px;
  font-weight: 780;
  line-height: 1.4;
}

.card-thread > .card-body > .d-flex .small {
  color: var(--sv-muted);
  font-size: 12px;
}

.card-thread > .card-body > hr {
  margin: 14px 0 16px;
  color: var(--sv-line);
  opacity: 1;
}

.card-thread > .card-body > .message {
  width: 100%;
  margin: 0;
  padding: 0;
}

.card-thread .message,
.card-postlist .postlist .message,
#quick_reply_form .message {
  color: #303631;
  background: transparent !important;
  font-size: 15px;
  line-height: 1.82;
}

.card-thread .plugin {
  justify-content: center !important;
  margin-top: 20px !important;
  padding-top: 12px;
  border-top: 1px solid var(--sv-line);
}

.card-thread .plugin:empty,
.card-thread .plugin:not(:has(*)) {
  display: none !important;
}

.card-postlist > .card-body {
  padding: 0 18px;
  background: #fff;
}

.card-postlist > .card-body > .card-title {
  margin: 0;
  padding: 12px 0 10px;
  color: var(--sv-ink);
  background: #fff !important;
  background-image: none !important;
  border-bottom: 1px solid var(--sv-line);
  font-family: var(--sv-font-sans);
  font-size: 13px;
  font-weight: 750;
}

.card-postlist .postlist > li {
  padding: 16px 0;
  background: #fff !important;
}

.card-postlist .postlist > li > a:first-child img.avatar-3 {
  width: 40px;
  height: 40px;
  border: 1px solid #d9dfda;
  border-radius: 5px;
}

.card-postlist .username a {
  color: #355f49 !important;
  font-weight: 700;
}

.card-postlist .postlist > li .small.text-muted {
  font-size: 12px;
}

.card-postlist .postlist .message {
  margin-top: 5px !important;
}

.card-postlist .postlist .message p:last-child {
  margin-bottom: 0;
}

#quick_reply_form textarea,
.card-postlist .newpost textarea {
  min-height: 112px;
  background: #fbfcfb;
}

#quick_reply_form .btn-secondary {
  color: #fff;
  background: var(--sv-accent);
  border-color: var(--sv-accent);
}

.xn-back {
  min-height: 38px;
  color: #59655e;
  background: #fff;
  border-color: var(--sv-line);
}

.xn-back:hover {
  color: var(--sv-accent);
  background: #f8faf8;
  border-color: #cad7cf;
}

/* My account home */
.sv-my-page {
  width: min(100%, 920px);
  margin: 2px auto 24px;
}

.sv-my-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px 20px;
  color: var(--sv-ink);
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 6px;
}

.sv-my-profile-card:hover {
  color: var(--sv-ink);
  background: #fbfcfb;
  border-color: #d3ddd6;
}

.sv-my-avatar {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border: 2px solid #e0c264;
  border-radius: 6px;
}

.sv-my-profile-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sv-my-profile-copy strong {
  overflow: hidden;
  color: var(--sv-ink);
  font-size: 18px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-my-profile-copy > span {
  margin-top: 3px;
  color: #536058;
  font-size: 12px;
}

.sv-my-profile-copy small {
  margin-top: 2px;
  color: var(--sv-muted);
  font-size: 11px;
}

.sv-my-profile-stats {
  display: flex;
  align-items: center;
}

.sv-my-profile-stats > span {
  display: flex;
  min-width: 70px;
  flex-direction: column;
  align-items: center;
}

.sv-my-profile-stats > span + span {
  border-left: 1px solid var(--sv-line);
}

.sv-my-profile-stats b {
  color: #254c3a;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.sv-my-profile-stats small {
  margin-top: 2px;
  color: var(--sv-muted);
  font-size: 10px;
}

.sv-my-profile-arrow {
  color: #98a19b;
  font-size: 14px;
}

.sv-my-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 6px;
}

.sv-my-actions a {
  display: flex;
  min-width: 0;
  min-height: 104px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  color: var(--sv-ink);
}

.sv-my-actions a + a {
  border-left: 1px solid var(--sv-line);
}

.sv-my-actions a:hover {
  color: var(--sv-accent);
  background: #f7faf8;
}

.sv-my-actions .bi {
  color: var(--sv-accent);
  font-size: 22px;
}

.sv-my-actions strong {
  margin-top: 6px;
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-my-actions small {
  margin-top: 1px;
  color: var(--sv-muted);
  font-size: 10px;
}

.sv-my-plugin-actions:empty {
  display: none;
}

.sv-my-plugin-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sv-my-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 7px;
  margin-top: 18px;
  color: #fff;
  background: #b93647;
  border: 1px solid #b93647;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 720;
}

.sv-my-logout:hover {
  color: #fff;
  background: #9f2d3c;
  border-color: #9f2d3c;
}
