:root {
  color-scheme: dark;
  --black: #080806;
  --black-soft: #10100d;
  --panel: rgba(12, 12, 10, 0.96);
  --panel-soft: rgba(21, 20, 15, 0.88);
  --gold: #d6a846;
  --gold-bright: #f2cf78;
  --gold-pale: #f7e5b0;
  --line: rgba(214, 168, 70, 0.28);
  --text: #f3ead4;
  --muted: #bcae91;
  --dim: #7f7768;
  --red: #8f3428;
  --red-bright: #c5533f;
  --green: #86b69c;
}

* {
  box-sizing: border-box;
}

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

body:not(.is-localized) .notice-shell {
  opacity: 0;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(128, 87, 30, 0.26), transparent 42%),
    linear-gradient(145deg, #15120c 0%, #060606 52%, #110e09 100%);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.page-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.48;
  background-image:
    linear-gradient(90deg, transparent 49.8%, rgba(225, 182, 84, 0.035) 50%, transparent 50.2%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.012) 3px 4px);
}

.notice-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1580px, calc(100vw - 34px));
  height: calc(100dvh - 34px);
  margin: 17px auto;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(214, 168, 70, 0.055), transparent 28%),
    var(--black);
  border: 1px solid var(--gold);
  box-shadow:
    0 0 0 4px #211707,
    0 0 0 5px rgba(226, 182, 78, 0.72),
    0 24px 80px rgba(0, 0, 0, 0.62),
    inset 0 0 70px rgba(0, 0, 0, 0.78);
}

.notice-shell::before,
.notice-shell::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 34px;
  right: 34px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.notice-shell::before {
  top: 8px;
}

.notice-shell::after {
  bottom: 8px;
}

.corner {
  position: absolute;
  z-index: 5;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background: var(--gold-bright);
  box-shadow: 0 0 8px rgba(214, 168, 70, 0.22);
}

.corner::before {
  width: 28px;
  height: 2px;
}

.corner::after {
  width: 2px;
  height: 28px;
}

.corner-nw { top: 8px; left: 8px; }
.corner-ne { top: 8px; right: 8px; transform: rotate(90deg); }
.corner-se { right: 8px; bottom: 8px; transform: rotate(180deg); }
.corner-sw { left: 8px; bottom: 8px; transform: rotate(270deg); }

.notice-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 96px;
  padding: 18px 34px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(103, 64, 15, 0.17), transparent 42%);
}

.notice-heading,
.header-meta,
.channel-pill,
.community-link,
.index-heading,
.article-card-meta,
.article-meta,
.notice-footer {
  display: flex;
  align-items: center;
}

.notice-heading {
  gap: 15px;
}

.notice-heading p,
.panel-label,
.article-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.notice-heading h1 {
  margin: 2px 0 0;
  color: var(--gold-pale);
  font-family: STKaiti, KaiTi, "Microsoft YaHei", serif;
  font-size: clamp(28px, 2.1vw, 38px);
  letter-spacing: 0.12em;
  line-height: 1;
}

.seal {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #f6d890;
  border: 2px solid #9b3428;
  outline: 1px solid rgba(196, 74, 54, 0.5);
  outline-offset: 3px;
  background: #641d18;
  font-family: STKaiti, KaiTi, serif;
  font-size: 26px;
  font-weight: 900;
  transform: rotate(-2deg);
}

.header-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.channel-pill,
.version-pill,
.home-link {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.channel-pill {
  gap: 8px;
}

.channel-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
}

.version-pill {
  color: var(--gold-bright);
}

.home-link {
  color: var(--text);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.home-link:hover,
.home-link:focus-visible {
  color: var(--gold-pale);
  border-color: var(--gold);
  background: rgba(214, 168, 70, 0.09);
}

.notice-layout {
  display: grid;
  grid-template-columns: minmax(185px, 0.75fr) minmax(270px, 1.15fr) minmax(520px, 3.15fr);
  min-height: 0;
}

.category-panel,
.article-index,
.article-view {
  min-width: 0;
  min-height: 0;
}

.category-panel {
  display: flex;
  flex-direction: column;
  padding: 25px 18px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.category-panel > .panel-label,
.community-block > .panel-label {
  padding: 0 12px 10px;
}

.category-nav {
  display: grid;
  gap: 5px;
}

.category-button {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 13px 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.category-button .category-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(214, 168, 70, 0.35);
  font-family: STKaiti, KaiTi, serif;
}

.category-button small {
  color: var(--dim);
  font-size: 11px;
}

.category-button:hover,
.category-button:focus-visible {
  color: var(--text);
  border-color: rgba(214, 168, 70, 0.25);
  background: rgba(214, 168, 70, 0.055);
}

.category-button.is-active {
  color: var(--gold-pale);
  border-color: rgba(214, 168, 70, 0.48);
  background: linear-gradient(90deg, rgba(139, 83, 18, 0.23), rgba(214, 168, 70, 0.035));
}

.category-button.is-active::before {
  content: "";
  position: absolute;
  left: -1px;
  width: 3px;
  height: 72%;
  background: var(--gold-bright);
}

.community-block {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.community-link {
  gap: 10px;
  padding: 10px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  transition: 150ms ease;
}

.community-link:hover,
.community-link:focus-visible {
  border-color: rgba(214, 168, 70, 0.48);
  background: rgba(214, 168, 70, 0.07);
}

.community-link.is-disabled {
  cursor: not-allowed;
  filter: grayscale(0.55);
  opacity: 0.52;
}

.community-link.is-disabled:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.community-mark {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--black);
  background: var(--text);
  font-weight: 900;
}

.discord-mark {
  color: white;
  background: #5865f2;
}

.community-link span:last-child {
  display: grid;
  gap: 1px;
}

.community-link strong {
  font-size: 12px;
}

.community-link small {
  color: var(--dim);
  font-size: 10px;
}

.article-index {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.index-heading {
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 17px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.index-heading h2 {
  margin: 3px 0 0;
  color: var(--gold-pale);
  font-family: STKaiti, KaiTi, serif;
  font-size: 22px;
  font-weight: 700;
}

.index-heading > span {
  color: var(--dim);
  font-size: 11px;
}

.article-list {
  overflow: auto;
  scrollbar-color: rgba(214, 168, 70, 0.4) transparent;
  scrollbar-width: thin;
}

.article-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 18px 20px 19px;
  border: 0;
  border-bottom: 1px solid rgba(214, 168, 70, 0.14);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.article-card:hover,
.article-card:focus-visible {
  background: rgba(214, 168, 70, 0.045);
}

.article-card.is-active {
  background:
    linear-gradient(90deg, rgba(126, 70, 14, 0.22), transparent),
    rgba(214, 168, 70, 0.035);
}

.article-card.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--gold);
}

.article-card-meta {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.article-card-meta span:first-child {
  color: var(--gold);
}

.article-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.article-card p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.new-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  color: #ffd8c9;
  border: 1px solid rgba(197, 83, 63, 0.65);
  background: rgba(143, 52, 40, 0.35);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.article-view {
  overflow: auto;
  padding: clamp(28px, 3.4vw, 54px) clamp(28px, 4vw, 68px) 64px;
  scroll-behavior: smooth;
  scrollbar-color: rgba(214, 168, 70, 0.45) transparent;
  scrollbar-width: thin;
  background:
    radial-gradient(circle at 100% 0, rgba(122, 72, 16, 0.13), transparent 35%),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, 0.008) 39px 40px);
}

.article-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-title-row h2 {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--gold-pale);
  font-family: STKaiti, KaiTi, "Microsoft YaHei", serif;
  font-size: clamp(27px, 2.25vw, 40px);
  font-weight: 800;
  line-height: 1.25;
}

.article-seal {
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #e8b6a4;
  border: 2px solid var(--red-bright);
  font-family: STKaiti, KaiTi, serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  transform: rotate(3deg);
}

.article-meta {
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 0;
}

.article-meta span {
  padding: 5px 9px;
  color: var(--muted);
  border: 1px solid rgba(214, 168, 70, 0.22);
  background: rgba(255, 255, 255, 0.018);
  font-size: 11px;
}

.article-lead {
  max-width: 980px;
  margin: 25px 0 0;
  color: #dfd3b9;
  font-size: 16px;
  line-height: 1.9;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 10px;
}

.stat-card {
  padding: 15px 17px;
  border: 1px solid rgba(214, 168, 70, 0.23);
  background: linear-gradient(135deg, rgba(150, 88, 18, 0.13), rgba(255, 255, 255, 0.018));
}

.stat-card strong {
  display: block;
  color: var(--gold-bright);
  font-size: 24px;
  line-height: 1.1;
}

.stat-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.article-section {
  margin-top: 35px;
}

.article-section h3 {
  position: relative;
  margin: 0 0 16px;
  padding-left: 17px;
  color: var(--gold-bright);
  font-size: 19px;
}

.article-section h3::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 3px;
  background: var(--red-bright);
}

.article-section > p {
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.change-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.change-list li {
  position: relative;
  padding: 12px 14px 12px 36px;
  color: #d7cbb2;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.018);
  font-size: 14px;
  line-height: 1.72;
}

.change-list li::before {
  content: "◆";
  position: absolute;
  top: 13px;
  left: 15px;
  color: var(--gold);
  font-size: 9px;
}

.change-list strong {
  color: var(--text);
}

.loading-state,
.error-state,
.empty-state {
  display: grid;
  min-height: 100%;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.loading-emblem {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: var(--gold-bright);
  border: 1px solid var(--gold);
  font-family: STKaiti, KaiTi, serif;
  font-size: 28px;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.45; transform: scale(0.96); }
}

.notice-footer {
  position: relative;
  z-index: 2;
  justify-content: flex-end;
  min-height: 35px;
  padding: 7px 20px 7px 25px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  background: #090907;
  font-size: 10px;
}

.notice-footer button {
  padding: 3px 10px;
  border: 1px solid rgba(214, 168, 70, 0.24);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.notice-footer button:hover,
.notice-footer button:focus-visible {
  color: var(--gold-pale);
  border-color: var(--gold);
}

body.is-embedded .notice-shell {
  width: calc(100vw - 22px);
  height: calc(100dvh - 22px);
  margin: 11px auto;
}

@media (max-width: 1050px) {
  body { overflow: auto; }

  .notice-shell {
    height: auto;
    min-height: calc(100dvh - 24px);
    margin: 12px auto;
  }

  .notice-layout {
    grid-template-columns: 180px minmax(250px, 0.9fr) minmax(420px, 1.8fr);
    min-height: 720px;
  }

  .notice-header {
    padding-inline: 24px;
  }
}

@media (max-width: 820px) {
  .notice-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-meta {
    justify-content: flex-start;
  }

  .notice-layout {
    display: block;
  }

  .category-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

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

  .community-block > .panel-label {
    grid-column: 1 / -1;
  }

  .article-index {
    max-height: 300px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .article-view {
    min-height: 620px;
  }
}

@media (max-width: 560px) {
  .notice-shell {
    width: 100%;
    margin: 0;
    border-inline: 0;
  }

  .notice-header,
  .article-view {
    padding-inline: 20px;
  }

  .category-nav,
  .community-block,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .article-title-row {
    gap: 12px;
  }

  .article-seal {
    width: 46px;
    height: 46px;
    font-size: 12px;
  }
}
