:root {
  --legacy-brown: #6d2e09;
  --legacy-brown-dark: #4f2107;
  --legacy-gold: #b39a7c;
  --legacy-paper: #fff8e7;
  --legacy-paper-deep: #f4e8c6;
  --legacy-line: #d4bf9f;
  --legacy-text: #4a2b16;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: #000;
  color: var(--legacy-text);
  font-family: "SimSun", "宋体", "Microsoft YaHei", serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
video,
audio {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.legacy-page {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.legacy-flash-panel {
  height: clamp(190px, 24vw, 300px);
  background: #fff;
  border-bottom: 1px solid var(--legacy-line);
  overflow: hidden;
}

.legacy-flash-panel img,
.legacy-sort-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.legacy-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  padding: 6px 0;
  background: linear-gradient(#d9c7ab, #f9efd9 45%, #c6a780 46%, var(--legacy-brown) 46%);
}

.legacy-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 3rem;
  padding: 0.25rem 0.5rem;
  background: var(--legacy-brown);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.legacy-nav-link:hover,
.legacy-nav-link.is-active {
  background: var(--legacy-brown-dark);
  text-decoration: none;
}

.legacy-home-shell,
.legacy-list-shell {
  display: grid;
  grid-template-columns: 29% 1fr;
  gap: 0;
  padding: 8px 0 0;
  background: var(--legacy-paper);
}

.legacy-home-left,
.legacy-list-sidebar {
  padding: 0 8px 0 0;
}

.legacy-home-main,
.legacy-list-main {
  min-width: 0;
  border-left: 4px solid var(--legacy-line);
  padding: 0 0 0 10px;
}

.legacy-panel,
.legacy-home-card,
.legacy-content-panel,
.legacy-side-body,
.legacy-home-notice-card {
  background: var(--legacy-paper);
}

.legacy-panel {
  margin-bottom: 10px;
  border: 1px solid #ccb18b;
  background: #f8eed3;
}

.legacy-panel-title,
.legacy-side-title {
  display: block;
  padding: 10px 12px;
  background: var(--legacy-brown);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.legacy-panel-title:hover,
.legacy-side-title:hover {
  text-decoration: none;
}

.legacy-eight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 6px;
}

.legacy-eight-link {
  padding: 8px 4px;
  color: var(--legacy-brown);
  font-weight: 700;
  text-align: center;
}

.legacy-bullet-list {
  display: grid;
  gap: 10px;
  padding: 12px 16px 10px;
}

.legacy-bullet-list a {
  display: flex;
  gap: 0.35rem;
  color: var(--legacy-brown);
  font-weight: 700;
  line-height: 1.9;
}

.legacy-mini-list {
  display: grid;
  gap: 12px;
  padding: 12px 10px 8px;
}

.legacy-mini-media {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--legacy-brown);
  font-weight: 700;
}

.legacy-mini-media img {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border: 1px solid #b58c68;
}

.legacy-panel-empty {
  min-height: 2.8rem;
}

.legacy-panel-more,
.legacy-home-enter {
  padding: 0 12px 10px;
  color: var(--legacy-brown);
  font-weight: 700;
  text-align: right;
}

.legacy-home-searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  margin-bottom: 8px;
  padding: 0 18px;
  border: 1px solid var(--legacy-line);
  border-left: 0;
  background: linear-gradient(180deg, #fff9ee, #f8ead0);
}

.legacy-marquee-strip {
  min-height: 16px;
}

.legacy-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--legacy-brown);
}

.legacy-search-form label {
  font-size: 0.95rem;
}

.legacy-search-form input,
.legacy-search-form select {
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid #73624e;
  background: #fff;
}

.legacy-search-form input {
  width: clamp(190px, 25vw, 300px);
}

.legacy-search-form button {
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--legacy-brown);
  background: #fff;
  color: var(--legacy-brown);
  cursor: pointer;
}

.legacy-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}

.legacy-home-card {
  border-top: 1px solid var(--legacy-line);
}

.legacy-home-section-head,
.legacy-content-head {
  position: relative;
  margin-bottom: 12px;
  padding: 10px 14px 10px 88px;
  background: linear-gradient(180deg, #cfb79c, #d9c3a4 45%, #f8ecd4 46%, #cfb79c 100%);
  color: var(--legacy-brown);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
}

.legacy-home-section-head::before,
.legacy-content-head::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 62px;
  height: 28px;
  transform: translateY(-50%);
  border-radius: 0 22px 22px 22px;
  background:
    radial-gradient(circle at 13px 14px, transparent 7px, #baa17d 8px, #baa17d 11px, transparent 12px),
    linear-gradient(90deg, #baa17d 0, #baa17d 100%);
  background-size: 26px 28px, 46px 14px;
  background-repeat: no-repeat;
  background-position: 0 0, 18px 7px;
  opacity: 0.95;
}

.legacy-home-card-image {
  display: block;
  width: calc(100% - 26px);
  margin: 0 auto 12px;
}

.legacy-home-copy {
  padding: 0 12px;
  font-size: 1rem;
  line-height: 1.9;
  word-break: break-word;
}

.legacy-home-copy p {
  margin: 0 0 0.7rem;
}

.legacy-home-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.legacy-home-collage img {
  width: 100%;
  height: 124px;
  object-fit: cover;
}

.legacy-news-list {
  display: grid;
  gap: 0.75rem;
  padding: 0 12px 8px;
}

.legacy-news-link {
  color: #5f3318;
  font-weight: 700;
  line-height: 1.8;
}

.legacy-news-link.is-danger {
  color: #e11616;
}

.legacy-home-notice-wrap {
  margin-top: 4px;
  border-top: 1px solid var(--legacy-line);
}

.legacy-home-notice-card {
  min-height: 66px;
}

.legacy-notice-empty {
  min-height: 44px;
}

.legacy-sort-hero {
  background: #d5bb96;
  height: clamp(170px, 22vw, 250px);
  overflow: hidden;
}

.legacy-list-sidebar {
  position: relative;
  background: #bea684;
}

.legacy-side-body {
  position: relative;
  min-height: 100%;
  padding: 26px 0 28px;
  border: 1px solid #c0a37f;
  border-top: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02)),
    #bea684;
}

.legacy-side-body::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 18px;
  width: 120px;
  height: 280px;
  background:
    radial-gradient(circle at 52px 160px, transparent 12px, rgba(132, 91, 48, 0.3) 13px, rgba(132, 91, 48, 0.3) 15px, transparent 16px),
    linear-gradient(rgba(132, 91, 48, 0.28), rgba(132, 91, 48, 0.28));
  background-size: 30px 30px, 2px 210px;
  background-repeat: no-repeat;
  background-position: 60px 124px, 60px 64px;
  opacity: 0.5;
}

.legacy-side-link {
  position: relative;
  z-index: 1;
  display: block;
  padding: 12px 22px 12px 34px;
  color: var(--legacy-brown);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.75;
}

.legacy-side-link::before {
  content: "·";
  position: absolute;
  left: 20px;
}

.legacy-side-link.is-active {
  background: rgba(109, 46, 9, 0.92);
  color: #fff;
}

.legacy-empty {
  padding: 1rem 1.25rem;
  color: var(--legacy-brown);
  line-height: 1.8;
}

.legacy-content-head {
  margin: 10px 0 18px;
  border: 1px solid #bf9870;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ead8bc, #d4b48d 18%, #f8efde 52%, #e0c29d 100%);
}

.legacy-content-panel {
  padding: 0 8px 12px;
}

.legacy-content-body {
  font-size: 1rem;
  line-height: 2;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.legacy-content-body p {
  margin: 0 0 1rem;
}

.legacy-content-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1rem;
}

.legacy-content-body a {
  color: var(--legacy-brown);
  text-decoration: underline;
}

.legacy-content-body table {
  max-width: 100%;
  margin: 0 auto 1rem;
  border-collapse: collapse;
}

.legacy-content-body td,
.legacy-content-body th {
  padding: 4px 6px;
  vertical-align: top;
}

.legacy-gallery-grid,
.legacy-media-stack {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.legacy-gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.legacy-gallery-card,
.legacy-media-card {
  margin: 0;
}

.legacy-media-card video,
.legacy-media-card audio {
  width: 100%;
}

.legacy-media-card figcaption {
  margin-top: 8px;
  color: var(--legacy-brown);
  font-size: 0.95rem;
  text-align: center;
}

.legacy-footer {
  margin-bottom: 18px;
  padding: 14px 12px;
  background: var(--legacy-brown);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.legacy-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.legacy-footer a {
  color: #fff;
}

.legacy-home-main,
.legacy-list-main {
  background: var(--legacy-paper);
}

.legacy-empty-content {
  min-height: 12rem;
}

@media (max-width: 900px) {
  .legacy-page {
    width: min(100vw, 100%);
  }

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

  .legacy-home-shell,
  .legacy-list-shell {
    grid-template-columns: 1fr;
  }

  .legacy-home-left,
  .legacy-list-sidebar {
    order: 2;
    padding: 0;
  }

  .legacy-home-main,
  .legacy-list-main {
    order: 1;
    border-left: 0;
    padding: 0 10px 12px;
  }

  .legacy-home-searchbar {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 12px 14px;
  }

  .legacy-home-grid {
    grid-template-columns: 1fr;
  }

  .legacy-home-collage {
    grid-template-columns: 1fr 1fr;
  }

  .legacy-flash-panel {
    height: 180px;
  }

  .legacy-sort-hero {
    height: 150px;
  }

  .legacy-side-body::after {
    display: none;
  }

  .legacy-side-link {
    padding-right: 16px;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .legacy-page {
    width: 100%;
  }

  .legacy-nav {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .legacy-nav-link {
    min-height: 3.6rem;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .legacy-flash-panel {
    height: 140px;
  }

  .legacy-sort-hero {
    height: 90px;
  }

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

  .legacy-search-form input {
    width: 100%;
  }

  .legacy-search-form {
    align-items: stretch;
  }

  .legacy-home-section-head,
  .legacy-content-head {
    padding-left: 72px;
    font-size: 1.15rem;
  }

  .legacy-home-collage {
    grid-template-columns: 1fr;
  }

  .legacy-footer {
    padding: 12px 10px;
    line-height: 1.8;
  }
}
