.home-page-frame {
  width: 100%;
  max-width: var(--content-max-width);
  min-width: 0;
  margin: 0 auto;
  border-left: 2px solid #14a066;
  border-right: 2px solid #14a066;
  background: rgba(255, 255, 255, 0.96);
  box-sizing: border-box;
  overflow: hidden;
}

.home-announcement-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ticker-border, #f0c76b);
  border-top: 0;
  background: var(--ticker-bg, #1b0b0b);
  color: var(--ticker-color, #ffef5a);
  font-family: var(--ticker-font-family, inherit);
  font-weight: 900;
  line-height: 1.4;
  overflow: hidden;
}

.home-announcement-bar__label {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 13px;
  background: var(--ticker-label-bg, #c81018);
  color: #fff8cf;
  font-size: 15px;
  white-space: nowrap;
}

.home-announcement-bar__viewport {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.home-announcement-bar__track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 58px;
  min-height: 42px;
  animation: home-led-scroll var(--ticker-speed, 20s) linear infinite;
}

.home-announcement-bar__track span {
  flex: 0 0 auto;
  min-width: 0;
  white-space: nowrap;
  font-size: 17px;
  text-shadow: 0 0 7px rgba(255, 240, 100, 0.6);
}

@keyframes home-led-scroll {
  from {
    transform: translateX(18%);
  }

  to {
    transform: translateX(-50%);
  }
}

.home-forum-section,
.home-section {
  margin: 0;
  border: 1px solid #d6b15a;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}

.home-forum-title,
.material-showcase-title {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--section-title-bg, linear-gradient(90deg, #b80f14, #d8750c));
  color: var(--section-title-color, #fff8de);
  font-family: var(--section-title-font-family, inherit);
  text-align: center;
}

.home-forum-title span,
.material-showcase-title span {
  color: var(--section-title-color, #fff8de);
  font-size: var(--section-title-font-size, 28px);
  font-weight: 900;
  line-height: 1.15;
}

.home-more-entry span {
  font-size: 18px;
  font-weight: 900;
}

.home-forum-title strong,
.material-showcase-title strong,
.home-more-entry strong {
  color: #fff1b5;
  font-size: 13px;
}

.home-post-list {
  display: grid;
  background: #fff;
}

.home-post-row {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: 58px 64px minmax(0, 1fr) 64px 74px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-bottom: 1px solid #d8d8d8;
  background: #fff;
}

.home-post-row:last-child {
  border-bottom: 0;
}

.home-post-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.home-post-label--sale {
  background: #c82333;
}

.home-post-label--hot {
  background: #f2c83b;
  color: #1f1a00;
}

.home-post-label--master {
  background: #1e5d88;
}

.home-post-label--recommend {
  background: #0a8c42;
}

.home-post-label--expert {
  background: #111;
}

.home-post-meta,
.home-post-stats {
  display: contents;
}

.home-post-issue,
.home-post-title,
.home-post-heat,
.home-post-views {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-post-issue,
.home-post-title {
  font-weight: 900;
  text-align: left;
}

.home-post-title {
  font-size: 14px;
}

.home-post-heat,
.home-post-views {
  justify-self: end;
  color: #666;
  font-size: 12px;
}

.home-post-heat {
  color: #b80f14;
  font-weight: 900;
}

.home-post-row--sale .home-post-issue,
.home-post-row--sale .home-post-title {
  color: #f10000;
}

.home-post-row--hot .home-post-issue,
.home-post-row--hot .home-post-title,
.home-post-row--recommend .home-post-issue,
.home-post-row--recommend .home-post-title {
  color: #07851e;
}

.home-post-row--master .home-post-issue,
.home-post-row--master .home-post-title {
  color: #e81991;
}

.home-post-row--expert .home-post-issue,
.home-post-row--expert .home-post-title {
  color: #111;
}

.material-showcase-section {
  border-color: #d39b24;
  background: #fff7df;
}

.material-showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  background: #fff7df;
}

.material-directory-panel {
  min-width: 0;
  border: 1px solid #a9a061;
  border-radius: 0;
  background: var(--material-bg, #fff);
  overflow: hidden;
}

.material-directory-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 8px;
  border-bottom: 1px solid #b7b7b7;
  background: var(--material-header-bg, #cf151b);
}

.material-directory-header h2,
.material-directory-header a {
  margin: 0;
  color: var(--material-title, #ffd45a);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  text-shadow: 1px 1px 0 rgba(80, 0, 0, 0.48);
}

.material-directory-desc {
  margin: 0;
  padding: 5px 8px;
  border-bottom: 1px solid #ead49a;
  background: #fffbe9;
  color: #7c4b14;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.material-directory-table {
  display: grid;
  background: #fff;
}

.material-directory-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 26% 48% 26%;
  align-items: center;
  border-bottom: 1px solid #b7b7b7;
}

.material-directory-row:last-child {
  border-bottom: 0;
}

.material-directory-period,
.material-directory-content,
.material-directory-result {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  color: var(--material-content, #7a0000);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  word-break: break-word;
}

.material-directory-period,
.material-directory-content {
  border-right: 1px solid #b7b7b7;
}

.material-directory-content {
  justify-content: center;
  font-size: 18px;
}

.material-directory-result {
  color: var(--material-result, #7a0000);
  font-size: 18px;
}

.home-more-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 0;
  padding: 10px;
  border: 1px solid #d6b15a;
  border-radius: 0;
  background: linear-gradient(90deg, #8b0008, #c1000c);
  color: #fff8de;
}

.home-more-entry div {
  display: grid;
  gap: 2px;
}

.home-more-entry button {
  flex: 0 0 auto;
  border: 1px solid #ffdf8a;
  border-radius: 4px;
  padding: 7px 14px;
  background: #fff3c7;
  color: #b80f14;
  font-weight: 900;
}

.zodiac-reference-section {
  margin: 0;
  padding: 4px;
  border: 1px solid #d6b15a;
  background: #fff;
  text-align: center;
}

.zodiac-reference-link {
  display: block;
}

.zodiac-reference-image {
  width: 100%;
  max-width: 1120px;
  max-height: 860px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid #d8c17a;
  background: #fff;
}

@media (min-width: 901px) {
  body {
    background:
      radial-gradient(circle at 16% 32%, rgba(216, 173, 77, 0.34), transparent 8%),
      radial-gradient(circle at 84% 30%, rgba(216, 173, 77, 0.28), transparent 8%),
      linear-gradient(90deg, #f8f1de 0%, #fffaf0 27%, #fffaf0 73%, #f8f1de 100%);
  }
}

@media (max-width: 900px) {
  .home-page-frame {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    border-left-width: 1px;
    border-right-width: 1px;
    overflow-x: hidden;
  }

  .home-announcement-bar {
    min-height: 38px;
  }

  .home-announcement-bar__label {
    padding: 0 8px;
    font-size: 13px;
  }

  .home-announcement-bar__track {
    min-height: 38px;
    gap: 36px;
  }

  .home-announcement-bar__track span {
    font-size: 14px;
  }

  .home-post-row {
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
    min-height: 74px;
    padding: 7px 8px;
    overflow: hidden;
  }

  .home-post-meta,
  .home-post-stats {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .home-post-meta {
    grid-column: 2;
    grid-row: 1;
  }

  .home-post-stats {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
  }

  .home-post-label {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    min-width: 54px;
    min-height: 28px;
    font-size: 11px;
  }

  .home-post-issue,
  .home-post-title {
    font-size: 13px;
    white-space: nowrap;
  }

  .home-post-issue::after {
    content: "：";
  }

  .home-post-heat,
  .home-post-views {
    justify-self: auto;
    color: #666;
    font-size: 11px;
    white-space: nowrap;
  }

  .home-post-heat::before {
    content: "热度：";
  }

  .home-post-views::before {
    content: "浏览：";
  }

  .home-forum-title,
  .material-showcase-title {
    min-height: 34px;
    padding: 6px 8px;
  }

  .home-forum-title span,
  .material-showcase-title span {
    font-size: var(--section-title-font-size-mobile, 22px);
  }

  .material-showcase-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .material-directory-header {
    min-height: 38px;
    padding: 6px 8px;
  }

  .material-directory-header h2,
  .material-directory-header a {
    font-size: 20px;
  }

  .material-directory-desc {
    padding: 4px 8px;
    font-size: 11px;
  }

  .material-directory-row {
    min-height: 34px;
    grid-template-columns: 22% 54% 24%;
  }

  .material-directory-period,
  .material-directory-content,
  .material-directory-result {
    min-height: 34px;
    padding: 3px 5px;
    font-size: 15px;
  }

  .material-directory-content,
  .material-directory-result {
    font-size: 14px;
  }

  .home-more-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .zodiac-reference-section {
    padding: 3px;
  }

  .zodiac-reference-image {
    max-height: none;
  }
}

@media (max-width: 370px) {
  .home-post-row {
    grid-template-columns: auto 1fr;
    gap: 4px 6px;
    padding-inline: 6px;
  }

  .home-post-label {
    min-width: 50px;
    font-size: 10px;
  }

  .home-post-issue,
  .home-post-title {
    font-size: 12px;
  }

  .home-post-heat,
  .home-post-views {
    font-size: 10px;
  }
}

.home-post-board--cards .home-forum-title {
  justify-content: center;
}

.home-post-category-tabs {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border-bottom: 1px solid #d6b15a;
  background: #fff7df;
}

.home-post-category-tab {
  appearance: none;
  border: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-right: 1px solid #ecd090;
  color: #8b0008;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.home-post-category-tab:last-child {
  border-right: 0;
}

.home-post-category-tab:hover,
.home-post-category-tab.is-active {
  background: #ffe7a9;
  color: #c00000;
}

.home-post-category-tab.is-active {
  box-shadow: inset 0 -3px 0 #c81018;
}

.home-post-category-stack {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.home-post-category-panel {
  width: 100%;
  min-width: 0;
  border-bottom: 1px solid #d6b15a;
  background: #fff;
  overflow-x: hidden;
}

.home-post-category-panel[hidden] {
  display: none;
}

.home-post-category-panel:last-child {
  border-bottom: 0;
}

.home-post-category-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border-bottom: 1px solid #ecd090;
  background: #fff8e6;
}

.home-post-category-head h2 {
  margin: 0;
  color: #a40000;
  font-size: 18px;
  line-height: 1.2;
}

.home-post-category-head span {
  color: #9a6b18;
  font-size: 12px;
  font-weight: 800;
}

.home-post-card-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  background: #fff;
  overflow-x: hidden;
}

.home-post-card {
  appearance: none;
  min-width: 0;
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 10px;
  border: 1px solid #e2bd6b;
  border-radius: 6px;
  background: linear-gradient(180deg, #fffdf5, #fff3cf);
  color: #2c1710;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(93, 31, 0, 0.1);
}

.home-post-card:hover {
  border-color: #c40e15;
  box-shadow: 0 3px 8px rgba(123, 17, 19, 0.15);
}

.home-post-card__top,
.home-post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-post-card__category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 3px;
  background: #c81018;
  color: #fff8d8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.home-post-card__period {
  color: #004b9b;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.home-post-card__author {
  min-width: 0;
  color: #8a5a15;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-post-card__title {
  min-width: 0;
  color: var(--post-title-color, #b40000);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.home-post-card__title-text,
.home-post-card__title-author {
  display: inline;
}

.home-post-card__unlock {
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid #d49b29;
  border-radius: 3px;
  background: #fff0b8;
  color: #a40000;
  font-size: 12px;
  font-weight: 900;
}

.home-post-card__title-author {
  margin-left: 2px;
  color: #d00000;
  font-weight: 900;
}

.home-post-card__meta span {
  color: #666;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.home-post-card__meta {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.home-post-card__meta em {
  margin-right: 4px;
  color: #8a5a15;
  font-style: normal;
}

.home-post-card__meta span:first-child,
.home-post-card__accuracy {
  color: #c00000;
}

.home-post-card--hot .home-post-card__category {
  background: #c81018;
}

.home-post-card--zodiac .home-post-card__category {
  background: #0a8c42;
}

.home-post-card--code .home-post-card__category {
  background: #1e5d88;
}

.home-post-card--special .home-post-card__category {
  background: #d56b00;
}

.home-post-card--kill .home-post-card__category {
  background: #111;
}

.home-post-card--wave .home-post-card__category {
  background: #7a2396;
}

.home-post-card--position .home-post-card__category {
  background: #0d6b75;
}

.home-post-card--flat .home-post-card__category {
  background: #a00062;
}

.home-post-card--other .home-post-card__category {
  background: #685b45;
}

.home-post-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px dashed #dec37d;
  background: #fffaf0;
  color: #8a6a24;
  font-weight: 800;
  text-align: center;
}

.home-post-modal[hidden] {
  display: none;
}

.home-post-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.home-post-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.home-post-modal__card {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: min(86vh, 760px);
  overflow: auto;
  overflow-x: hidden;
  border: 2px solid #c81018;
  border-radius: 8px;
  background: #fffdf3;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.home-post-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #c81018;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.home-post-modal__head {
  display: grid;
  gap: 6px;
  padding: 18px 48px 14px 18px;
  background: linear-gradient(90deg, #c81018, #d76800);
  color: #fff8df;
}

.home-post-modal__head span {
  color: #ffed91;
  font-size: 17px;
  font-weight: 900;
}

.home-post-modal__head span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 8px;
}

.home-post-modal__head em {
  color: #fff;
  font-size: 13px;
  font-style: normal;
}

.home-post-modal__unlock,
.home-post-modal__unlock-action {
  padding: 10px 18px;
  border-bottom: 1px solid #eed29a;
  background: #fff0bf;
  color: #a40000;
  font-weight: 900;
}

.home-post-modal__unlock-action button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #c81018;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.home-post-modal__head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #fff;
  font-size: 24px;
  line-height: 1.25;
}

.home-post-modal__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #eed29a;
  background: #fff7db;
  color: #7a0000;
  font-weight: 800;
}

.home-post-modal__meta b {
  color: #c40000;
}

.home-post-modal__section {
  padding: 14px 18px;
  border-bottom: 1px solid #eed29a;
}

.home-post-modal__section:last-child {
  border-bottom: 0;
}

.home-post-modal__section h3 {
  margin: 0 0 8px;
  color: #c40000;
  font-size: 18px;
}

.home-post-modal__section p {
  margin: 0;
  color: #c40000;
  font-size: 17px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-post-modal__history {
  display: grid;
  gap: 6px;
}

.home-post-modal__history span {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #eed29a;
  background: #fff;
  color: #7a0000;
  font-weight: 800;
}

.home-post-modal__history i {
  min-width: 0;
  overflow-wrap: anywhere;
  font-style: normal;
}

.home-post-modal__history b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #c40000;
  border-radius: 50%;
  color: #c40000;
  transform: rotate(-15deg);
}

body.home-post-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .home-post-category-tabs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: hidden;
  }

  .home-post-category-tab {
    min-width: 0;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-post-card-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    overflow-x: hidden;
  }

  .home-post-card {
    width: 100%;
    min-width: 0;
    min-height: 112px;
    padding: 7px;
    overflow: hidden;
  }

  .home-post-card__top,
  .home-post-card__meta {
    gap: 4px;
  }

  .home-post-card__category,
  .home-post-card__period,
  .home-post-card__author,
  .home-post-card__meta span {
    font-size: 11px;
  }

  .home-post-card__title {
    font-size: 13px;
  }

  .home-post-modal {
    padding: 12px;
  }

  .home-post-modal__card {
    width: min(100%, 390px);
    max-height: calc(88vh - env(safe-area-inset-bottom));
  }

  .home-post-modal__head strong {
    font-size: 20px;
  }

  .home-post-modal__meta {
    grid-template-columns: 1fr;
    gap: 5px;
    font-size: 13px;
  }

  .home-post-modal__section h3 {
    font-size: 16px;
  }

  .home-post-modal__section p,
  .home-post-modal__history span {
    font-size: 14px;
  }
}

@media (max-width: 370px) {
  .home-post-category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 640px) {
  .home-post-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
  }

  .home-post-card {
    min-height: 98px;
    padding: 7px;
    gap: 5px;
  }

  .home-post-card__title {
    min-height: auto;
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .home-post-card__top,
  .home-post-card__meta {
    gap: 4px;
  }

  .home-post-card__meta {
    flex-direction: column;
    gap: 2px;
  }

  .home-post-card__period,
  .home-post-card__author,
  .home-post-card__meta span {
    font-size: 10px;
  }

  .home-post-card__meta span {
    white-space: normal;
  }
}
