:root {
  color-scheme: light;
  --m-ink: #24435a;
  --m-body: #263f50;
  --m-muted: #526b7b;
  --m-rule: #c7dce9;
  --m-field: #91b5ce;
  --m-panel: #a5cce4;
  --m-page: #f0f7fb;
  --m-wash: #eaf4fb;
  --m-selected: #e2f0fa;
  --m-paper: #ffffff;
  --m-primary: #176eac;
  --m-primary-hover: #125687;
  --m-primary-active: #0f4a74;
  --m-link: #176298;
  --m-on-primary: #ffffff;
  --bs-body-color: var(--m-body);
  --bs-body-bg: var(--m-page);
  --bs-link-color: var(--m-link);
  --bs-link-hover-color: var(--m-primary-hover);
  --bs-border-color: var(--m-rule);
  --bs-primary: var(--m-primary);
  --bs-primary-rgb: 23, 110, 172;
  --bs-font-sans-serif: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: 16px;
  --bs-body-line-height: 1.65;
  --bs-border-radius: 2px;
  --bs-focus-ring-color: color-mix(in srgb, var(--m-primary) 35%, transparent);
}

body {
  margin: 0;
  background: var(--m-page);
  color: var(--m-body);
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--m-rule);
  color: var(--m-ink);
}

html {
  scrollbar-color: var(--m-field) var(--m-page);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--m-page);
}

::-webkit-scrollbar-thumb {
  background: var(--m-field);
  border: 2px solid var(--m-page);
  border-radius: 2px;
}

input,
textarea,
select {
  caret-color: var(--m-ink);
}

a:focus-visible,
button:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.btn:focus-visible,
.page-link:focus-visible {
  outline: 2px solid var(--m-primary);
  outline-offset: 2px;
}

a {
  text-underline-offset: 0.18em;
}

.m-top {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top);
  background: var(--m-primary);
}

.m-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(42rem, 100%);
  min-height: 48px;
  margin: 0 auto;
  padding: 0 16px;
}

.m-logo,
.m-account {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--m-on-primary);
  font-weight: 700;
  text-decoration: none;
}

.m-logo {
  font-size: 20px;
}

.m-account {
  min-width: 44px;
  justify-content: flex-end;
  font-size: 15px;
}

.m-bar a:focus-visible {
  outline-color: var(--m-on-primary);
}

.m-logo:active,
.m-account:active {
  color: var(--m-on-primary);
}

.m-tabs {
  background: var(--m-paper);
  border-bottom: 1px solid var(--m-rule);
}

.m-tabs-row {
  display: flex;
  width: min(42rem, 100%);
  margin: 0 auto;
}

.m-tabs a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  color: var(--m-muted);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.m-tabs a[aria-current="page"] {
  color: var(--m-primary);
  box-shadow: inset 0 -3px 0 var(--m-primary);
}

.m-tabs a:active {
  background: var(--m-selected);
  color: var(--m-primary);
}

@media (hover: hover) {
  .m-tabs a:hover {
    color: var(--m-primary);
    background: var(--m-wash);
  }
}

.m-shell {
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: 8px 16px max(28px, env(safe-area-inset-bottom));
}

.m-title,
.m-post-title,
.m-thread-title,
.m-reply-title {
  text-wrap: pretty;
}

.m-title {
  margin: 14px 0 12px;
  color: var(--m-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.m-shell > .m-title:first-child,
.m-form .m-title {
  margin-top: 8px;
}

.m-boardhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

.m-boardhead .m-title {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.m-crumb {
  margin: 4px 0 0;
}

.m-crumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.m-post-title {
  margin: 2px 0 12px;
  color: var(--m-ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}

.m-cat {
  margin: 22px 0 0;
  padding: 0 0 8px;
  background: transparent;
  border: 0;
  color: var(--m-muted);
  font-size: 13px;
  font-weight: 700;
}

.m-title + .m-cat {
  margin-top: 2px;
}

.m-list,
.m-empty,
.m-stats,
.m-form,
.m-notice,
.m-shell > .m-board,
.m-post {
  margin-left: -16px;
  margin-right: -16px;
}

.m-list,
.m-empty,
.m-stats,
.m-post,
.m-form,
.m-notice,
.m-shell > .m-board {
  background: var(--m-paper);
  border-top: 1px solid var(--m-rule);
  border-bottom: 1px solid var(--m-rule);
}

.m-board,
.m-thread {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  background: transparent;
  color: var(--m-ink);
  text-decoration: none;
}

.m-board {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.m-board-name {
  color: var(--m-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.m-board-desc {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: var(--m-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.m-list .m-board + .m-board,
.m-list .m-thread + .m-thread,
.m-shell > .m-board + .m-board {
  border-top: 1px solid var(--m-rule);
}

.m-thread {
  align-items: flex-start;
  min-height: 72px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.m-board:active,
.m-thread:active {
  background: var(--m-selected);
  color: var(--m-ink);
}

@media (hover: hover) {
  .m-board:hover,
  .m-thread:hover {
    background: var(--m-wash);
    color: var(--m-ink);
  }
}

.m-shell > .m-board {
  font-size: 17px;
  font-weight: 700;
}

.m-sub {
  padding-left: 32px;
}

.m-sub2 {
  padding-left: 48px;
}

.m-thread-main {
  flex: 1;
  min-width: 0;
}

.m-thread-title {
  display: block;
  color: var(--m-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.m-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
  color: var(--m-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.m-replies {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.m-replies b {
  color: var(--m-primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.m-replies span {
  margin-top: 3px;
  color: var(--m-muted);
  font-size: 12px;
  font-weight: 400;
}

.m-empty {
  margin-top: 0;
  margin-bottom: 0;
  padding: 18px 16px;
  color: var(--m-muted);
}

.m-authorline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--m-rule);
}

.m-authorline .m-author {
  color: var(--m-ink);
  font-size: 15px;
  font-weight: 700;
}

.m-authorline .m-floor,
.m-authorline .m-time {
  color: var(--m-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.m-authorline .m-time {
  margin-left: auto;
}

.m-reply-title {
  margin: 0 0 8px;
  color: var(--m-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.m-post {
  margin-top: 0;
  padding: 14px 16px 18px;
}

.m-post + .m-post {
  margin-top: 10px;
}

.m-post-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--m-body);
  overflow-wrap: anywhere;
}

.m-post-body img {
  max-width: 100% !important;
  height: auto !important;
  margin: 10px 0;
}

.m-post-body span[style*="background-color:#ffffff"],
.m-post-body span[style*="background-color: #ffffff"],
.m-post-body span[style*="background-color:#fff"],
.m-post-body span[style*="background:#ffffff"],
.m-post-body span[style*="background:#fff"],
.m-post-body span[style*="background-color:white"],
.m-post-body span[style*="background-color: white"] {
  background-color: transparent !important;
}

.m-post-body span[style*="color:#333"],
.m-post-body span[style*="color: #333"] {
  color: inherit !important;
}

.m-post-body font[size="1"] {
  font-size: 0.875rem;
}

.m-post-body video,
.m-post-body iframe,
.m-post-body embed {
  max-width: 100% !important;
}

.m-post-body .quoteTips,
.m-post-body blockquote {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--m-wash);
  border: 1px solid var(--m-rule);
  color: var(--m-ink);
}

.m-post-body a[href*="action=download"],
.m-post-body a[href*="action=buytopic"] {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--m-wash);
  border: 1px solid var(--m-rule);
  font-weight: 700;
  text-decoration: none;
}

.m-post-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.m-post-body .pw_menu,
.m-post-body [id^="menu_att"] {
  display: none !important;
}

.m-form {
  margin-top: 16px;
  padding: 16px 16px 18px;
}

.m-title + .m-form,
.m-shell > .m-form:first-child {
  margin-top: 0;
}

.m-form .form-label {
  margin-bottom: 8px;
  color: var(--m-ink);
  font-size: 15px;
  font-weight: 700;
}

.m-form .m-meta {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--m-body);
  font-size: 16px;
}

.m-form .form-control,
.m-form .form-select {
  min-height: 48px;
  padding: 12px 14px;
  border-color: var(--m-field);
  border-radius: 2px;
  background: var(--m-paper);
  color: var(--m-ink);
  font-size: 16px;
}

.m-form textarea.form-control {
  min-height: 9rem;
  line-height: 1.65;
}

.m-form .form-control::placeholder {
  color: var(--m-muted);
  opacity: 1;
}

.m-form .form-control:focus,
.m-form .form-select:focus {
  border-color: var(--m-primary);
  box-shadow: none;
}

.btn-primary,
.m-go {
  --bs-btn-color: var(--m-on-primary);
  --bs-btn-bg: var(--m-primary);
  --bs-btn-border-color: var(--m-primary);
  --bs-btn-hover-color: var(--m-on-primary);
  --bs-btn-hover-bg: var(--m-primary-hover);
  --bs-btn-hover-border-color: var(--m-primary-hover);
  --bs-btn-active-color: var(--m-on-primary);
  --bs-btn-active-bg: var(--m-primary-active);
  --bs-btn-active-border-color: var(--m-primary-active);
  --bs-btn-disabled-color: var(--m-on-primary);
  --bs-btn-disabled-bg: var(--m-primary);
  --bs-btn-disabled-border-color: var(--m-primary);
  --bs-btn-focus-box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 2px;
  background: var(--m-primary);
  color: var(--m-on-primary);
  font-weight: 700;
  text-decoration: none;
}

.m-go:active,
.btn-primary:active {
  background: var(--m-primary-active);
  border-color: var(--m-primary-active);
  color: var(--m-on-primary);
}

.m-form .btn-primary,
.m-notice .btn-primary,
.m-block {
  display: flex;
  width: 100%;
}

.m-reply-gate {
  margin: 16px 0 0;
}

.m-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  margin-top: 8px;
}

.m-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--m-ink);
  font-weight: 700;
  text-decoration: none;
}

.m-more a:active {
  color: var(--m-primary);
}

.m-board-all .m-board-name {
  color: var(--m-primary);
}

.m-notice {
  margin-top: 8px;
  padding: 18px 16px;
}

.m-notice p {
  margin: 0 0 12px;
}

.m-notice p:last-child {
  margin-bottom: 0;
}

.m-notice .btn {
  margin-top: 4px;
}

.m-stats {
  margin-top: 0;
  margin-bottom: 0;
}

.m-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 16px;
}

.m-stats div + div {
  border-top: 1px solid var(--m-rule);
}

.m-stats dt {
  margin: 0;
  color: var(--m-muted);
  font-weight: 400;
}

.m-stats dd {
  margin: 0;
  color: var(--m-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.m-pages {
  margin-top: 16px;
}

.pagination {
  --bs-pagination-color: var(--m-ink);
  --bs-pagination-bg: var(--m-paper);
  --bs-pagination-border-color: var(--m-rule);
  --bs-pagination-hover-color: var(--m-ink);
  --bs-pagination-hover-bg: var(--m-wash);
  --bs-pagination-hover-border-color: var(--m-rule);
  --bs-pagination-active-color: var(--m-on-primary);
  --bs-pagination-active-bg: var(--m-primary);
  --bs-pagination-active-border-color: var(--m-primary);
  --bs-pagination-focus-box-shadow: none;
  --bs-pagination-disabled-color: var(--m-muted);
  --bs-pagination-disabled-bg: var(--m-paper);
  --bs-pagination-disabled-border-color: var(--m-rule);
  --bs-pagination-padding-y: 8px;
  --bs-pagination-padding-x: 12px;
  --bs-pagination-font-size: 16px;
  justify-content: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.m-pages .pagination::after {
  content: "";
  order: 1;
  flex-basis: 100%;
  height: 0;
}

.m-pages .page-item:not(:first-child):not(:last-child) {
  order: 1;
  flex: 0 0 auto;
}

.m-pages .page-item:first-child,
.m-pages .page-item:last-child {
  order: 2;
  flex: 1 1 calc(50% - 8px);
}

.m-pages .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 44px;
  min-height: 48px;
  border-radius: 2px;
}

.m-pages .page-item:not(:first-child) .page-link,
.m-pages .page-item:first-child .page-link,
.m-pages .page-item:last-child .page-link {
  margin-left: 0;
  border-radius: 2px;
}

.m-pages .page-link:active {
  background: var(--m-primary);
  border-color: var(--m-primary);
  color: var(--m-on-primary);
}

footer.m-foot {
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  color: var(--m-muted);
  font-size: 13px;
}

.m-utils {
  display: flex;
  margin: 0 -16px;
  border-top: 1px solid var(--m-rule);
}

.m-utils a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  color: var(--m-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.m-utils a[aria-current="page"],
.m-utils a:active {
  color: var(--m-primary);
}

@media (hover: hover) {
  .m-utils a:hover,
  .m-more a:hover {
    color: var(--m-primary);
  }
}

.m-colophon {
  margin: 4px 0 0;
  color: var(--m-muted);
  font-size: 13px;
  line-height: 1.5;
}
