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

.home-announcement-bar {
  min-height: 42px;
  height: auto;
  display: flex;
  align-items: stretch;
  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;
  box-sizing: border-box;
  overflow: visible;
}

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

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

.home-announcement-bar__track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 58px;
  min-height: 42px;
  padding-block: 8px;
  line-height: 1.35;
  box-sizing: border-box;
  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;
  line-height: 1.35;
  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 var(--theme-section-border);
  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 {
    min-height: 38px;
    padding-block: 7px;
    padding-inline: 8px;
    font-size: 13px;
  }

  .home-announcement-bar__track {
    min-height: 38px;
    padding-block: 7px;
    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(8, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--theme-section-border);
  background: var(--theme-category-tabs-background);
}

.home-post-category-tab {
  appearance: none;
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 4px;
  border: 1px solid var(--theme-category-tab-border);
  border-radius: 10px;
  background: var(--theme-category-card-background, linear-gradient(180deg, #fffdf8, #fff0cf));
  color: var(--theme-category-tab-color);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--theme-category-card-shadow, 0 4px 12px rgba(96, 43, 0, 0.08));
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.home-post-category-tab::before {
  display: var(--theme-category-icon-display);
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  margin: 0;
  border: 1px solid rgba(255, 223, 129, 0.9);
  border-radius: 9px;
  background: var(--theme-category-icon-background);
  color: var(--theme-category-icon-color);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.home-post-category-tab[data-home-post-tab='hot']::before { content: '火'; }
.home-post-category-tab[data-home-post-tab='zodiac']::before { content: '肖'; }
.home-post-category-tab[data-home-post-tab='zodiac-code']::before { content: '码'; }
.home-post-category-tab[data-home-post-tab='special-code']::before { content: '特'; }
.home-post-category-tab[data-home-post-tab='kill']::before { content: '绝'; }
.home-post-category-tab[data-home-post-tab='wave']::before { content: '波'; }
.home-post-category-tab[data-home-post-tab='position']::before { content: '尾'; }
.home-post-category-tab[data-home-post-tab='flat-special']::before { content: '平'; }
.home-post-category-tab[data-home-post-tab='other']::before { content: '其'; }
.home-post-category-tab[data-home-post-tab='all']::before { content: '全'; }

.home-post-category-tab:hover,
.home-post-category-tab.is-active {
  background: var(--theme-category-tab-active-background);
  color: var(--theme-category-tab-active-color);
  border-color: var(--theme-category-tab-active-line);
  transform: translateY(-1px);
  box-shadow: var(--theme-category-card-active-shadow, 0 8px 18px rgba(111, 0, 5, 0.18));
}

.home-post-category-tab.is-active {
  box-shadow: inset 0 -3px 0 var(--theme-category-tab-active-line), var(--theme-category-card-active-shadow, 0 8px 18px rgba(111, 0, 5, 0.18));
}

.home-post-category-tab--all {
  grid-column: 1 / -1;
  border-color: var(--theme-category-all-border, #d7a236);
  background: var(--theme-category-all-background, linear-gradient(180deg, #fff1b6, #e7bd5a));
}

.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 var(--theme-section-border);
  background: var(--theme-category-panel-background);
  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 var(--theme-category-tab-border);
  background: var(--theme-category-head-background);
}

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

.home-post-category-head span {
  color: var(--theme-category-head-muted);
  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: var(--theme-card-grid-background);
  overflow-x: hidden;
}

.home-post-card {
  appearance: none;
  position: relative;
  min-width: 0;
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: calc(10px + var(--theme-card-badge-space)) 10px 10px;
  border: 1px solid var(--theme-card-border);
  border-radius: 6px;
  background: var(--theme-card-background);
  color: #2c1710;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--theme-card-shadow);
}

.home-post-card::before {
  content: var(--theme-card-badge-text);
  position: absolute;
  top: -1px;
  right: 8px;
  display: var(--theme-card-badge-display);
  padding: 3px 9px;
  border: 1px solid #ffd46a;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(180deg, #a40000, #d71920);
  color: #fff4b0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.08em;
  box-shadow: 0 3px 8px rgba(117, 0, 0, 0.22);
}

.home-post-card::after {
  content: '财';
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: var(--theme-card-corner-display);
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #d5a22a;
  border-radius: 50%;
  background: #fff4c4;
  color: #a40000;
  font-size: 11px;
  font-weight: 900;
  opacity: 0.78;
}

.home-post-card:hover {
  border-color: var(--theme-card-hover-border);
  box-shadow: var(--theme-card-hover-shadow);
}

.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: var(--theme-post-period-color);
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.home-post-card__author {
  min-width: 0;
  color: var(--theme-post-author-color);
  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, var(--theme-post-title-color));
  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 var(--theme-post-unlock-border);
  border-radius: 3px;
  background: var(--theme-post-unlock-background);
  color: var(--theme-post-key-color);
  font-size: 12px;
  font-weight: 900;
}

.home-post-card__title-author {
  margin-right: 5px;
  color: #c40000;
  font-weight: 900;
}

.home-post-card__preview {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #5a4636;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-post-card__meta span {
  color: var(--theme-post-meta-color);
  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: var(--theme-post-meta-label-color);
  font-style: normal;
}

.home-post-card__meta span:first-child,
.home-post-card__accuracy {
  color: var(--theme-post-key-color);
}

.home-post-card__meta span:nth-child(3),
.home-post-card__meta span:nth-child(3) em {
  color: var(--theme-post-key-color);
}

.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: var(--theme-modal-head-background);
  color: #fff8df;
}

.home-post-modal__head span {
  color: var(--theme-modal-period-color);
  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: var(--theme-modal-ad-color);
  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: var(--theme-modal-title-color);
  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;
}

.home-trust-register {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--theme-section-border);
  background: var(--theme-trust-section-background, linear-gradient(180deg, #fffaf0, #f8e8c4));
}

.home-trust-register__points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-trust-point,
.home-register-callout {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 64px;
  padding: 9px 12px;
  border: 1px solid var(--theme-trust-card-border, #e2bc6c);
  border-radius: 10px;
  background: var(--theme-trust-card-background, rgba(255, 255, 255, 0.88));
  box-shadow: var(--theme-trust-card-shadow, 0 5px 14px rgba(90, 29, 0, 0.08));
}

.home-trust-point > span,
.home-register-callout__gift {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #c90013, #780006 60%, #d8a126);
  color: #fff2ac;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 130, 0.55);
}

.home-trust-point p,
.home-register-callout p {
  min-width: 0;
  display: grid;
  gap: 2px;
  margin: 0;
}

.home-trust-point strong,
.home-register-callout strong {
  color: var(--theme-trust-title-color, #850007);
  font-size: 14px;
  line-height: 1.2;
}

.home-trust-point small,
.home-register-callout small {
  color: var(--theme-trust-muted-color, #7b5a36);
  font-size: 11px;
  line-height: 1.25;
}

.home-register-callout {
  border-color: var(--theme-register-border, #e3b348);
  background: var(--theme-register-background, linear-gradient(110deg, #850007, #b60010 62%, #7b0005));
}

.home-register-callout strong,
.home-register-callout small {
  color: #fff3bd;
}

.home-register-callout a {
  min-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid #ffe28a;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff2ac, #dda01b);
  color: #760006;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 1px 0 #fff9d7, 0 5px 12px rgba(48, 0, 0, 0.3);
}

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

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

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

  .home-post-category-tab {
    min-width: 0;
    min-height: 42px;
    gap: 3px;
    padding: 4px 2px;
    border-radius: 8px;
    font-size: 11px;
    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: calc(7px + var(--theme-card-badge-space)) 7px 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__period { font-size: 14px; }

  .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;
  }

  .home-post-category-tab::before {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
    border-radius: 5px;
    font-size: 10px;
  }

  .home-post-category-tab--all {
    grid-column: 1 / -1;
  }

  .home-trust-register {
    gap: 8px;
    padding: 8px;
  }

  .home-trust-register__points {
    gap: 6px;
  }

  .home-trust-point {
    min-height: 58px;
    padding: 7px 5px;
    gap: 5px;
    text-align: center;
  }

  .home-trust-point > span {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 8px;
    font-size: 11px;
  }

  .home-trust-point strong {
    font-size: 12px;
  }

  .home-trust-point small {
    display: none;
  }

  .home-register-callout {
    min-height: 60px;
    padding: 8px;
  }
}

@media (max-width: 370px) {
  .home-post-category-tabs {
    grid-template-columns: repeat(4, 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: calc(7px + var(--theme-card-badge-space)) 7px 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__period { font-size: 13px; }

  .home-post-card__preview {
    font-size: 10px;
    -webkit-line-clamp: 1;
  }

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