@font-face {
  font-family: "HYBeiWeiXieJing";
  src: url("../fonts/HYBeiWeiXieJingW.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "HYBeiWeiXieJingShare";
  src: url("../fonts/HYBeiWeiXieJing-share.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiYear";
  src: url("../fonts/HYQuanTangShiJ-year.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiFooter";
  src: url("../fonts/HYQuanTangShiJ-footer.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiCalendarLabels";
  src: url("../fonts/HYQuanTangShiJ-calendar-labels.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiDetailHeadings";
  src: url("../fonts/HYQuanTangShiJ-detail-headings.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiReadingHeadings";
  src: url("../fonts/HYQuanTangShiJ-reading-headings.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiPrefaceVerse";
  src: url("../fonts/HYQuanTangShiJ-preface-verse.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiShareButton";
  src: url("../fonts/HYQuanTangShiJ-share-button.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiCopyright";
  src: url("../fonts/HYQuanTangShiJ-copyright.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "HYQuanTangShiShareActions";
  src: url("../fonts/HYQuanTangShiJ-share-actions.woff") format("woff");
  font-display: swap;
}

.viewport::before,
.home-page,
.copyright-page,
.search-page,
.detail-page {
  background-image: url("../images/bg.jpg") !important;
}

@media (max-width: 600px) {
  .home-page {
    overflow: visible;
  }

  .home-page .month-scene {
    left: var(--scene-bleed-left, 0);
    width: var(--scene-bleed-width, 393px);
  }

  .home-page .calendar-panel {
    top: 326px;
    left: 2px;
    width: 389px;
    background: transparent;
  }

  .home-page .calendar-panel::before {
    content: "";
    position: absolute;
    inset: 4px 8px;
    z-index: 0;
    background: rgba(245, 230, 194, 0.6);
    pointer-events: none;
  }

  .home-page .calendar-border {
    width: 389px;
    height: 452px;
  }

  .home-page .calendar-grid {
    left: 12.85px;
    width: 363px;
    grid-template-rows: repeat(6, minmax(0, 1fr));
  }

  .home-page .calendar-cell {
    padding-top: 10px;
    overflow: hidden;
  }
}

.home-page .calendar-cell {
  overflow: hidden;
}

.home-page .calendar-date {
  font-size: 19px;
  line-height: 20px;
}

.home-page .calendar-lunar {
  font-size: 11px;
  line-height: 12px;
}

.home-page .calendar-event {
  font-size: 10.5px;
  line-height: 11px;
}

.home-page .calendar-cell.is-today {
  position: relative;
  background: transparent;
}

.home-page .calendar-cell.is-today::before {
  content: "";
  position: absolute;
  top: 0;
  right: 6px;
  bottom: 0;
  left: -4px;
  z-index: 0;
  background: rgba(139, 37, 5, 0.26);
  pointer-events: none;
}

.home-page .calendar-cell.is-today > * {
  position: relative;
  z-index: 1;
}

.calendar-event.event-birthday {
  flex-direction: row;
  align-items: center;
  gap: 2px;
  max-width: 46px;
  margin-top: 3px;
}

.calendar-event.event-birthday img {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.calendar-event.event-birthday span {
  max-width: none;
  margin-top: 0;
  white-space: nowrap;
}

.home-page .legend {
  font-size: 12px;
}

.month-slide-snapshot {
  position: fixed !important;
  z-index: 50 !important;
  margin: 0 !important;
  pointer-events: none !important;
  transition: translate 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: translate;
}

.month-slide-snapshot.slide-out-left { translate: -110vw 0; }
.month-slide-snapshot.slide-out-right { translate: 110vw 0; }

.home-page.slide-in-right {
  animation: month-slide-in-right 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-page.slide-in-left {
  animation: month-slide-in-left 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes month-slide-in-right {
  from { translate: 110vw 0; }
  to { translate: 0 0; }
}

@keyframes month-slide-in-left {
  from { translate: -110vw 0; }
  to { translate: 0 0; }
}

body.date-detail-active #root {
  filter: brightness(0.72);
}

.august-detail-page {
  position: fixed;
  z-index: 220;
  width: 393px;
  height: 852px;
  overflow: hidden;
  color: #211713;
  background: url("../images/bg.jpg") center / cover no-repeat;
  box-shadow: 0 0 28px rgba(34, 19, 12, 0.38);
  opacity: 0;
  translate: 40px 0;
  transition: opacity 0.32s ease, translate 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.august-detail-page::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 5;
  border: 1px solid rgba(139, 37, 5, 0.5);
  pointer-events: none;
}

.august-detail-page.is-open {
  opacity: 1;
  translate: 0 0;
}

.august-detail-page.is-closing {
  opacity: 0;
  translate: 40px 0;
}

.date-detail-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 25px 38px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.date-detail-scroll::-webkit-scrollbar { display: none; }

.date-detail-back {
  position: absolute;
  top: 16px;
  left: 17px;
  z-index: 12;
  width: 34px;
  height: 34px;
  color: #8b2505;
  cursor: pointer;
  background: rgba(247, 235, 207, 0.7);
  border: 1px solid rgba(139, 37, 5, 0.55);
  border-radius: 50%;
  font-family: serif;
  font-size: 31px;
  line-height: 28px;
}

.date-detail-plum {
  position: absolute;
  top: -22px;
  right: -35px;
  width: 180px;
  opacity: 0.45;
  pointer-events: none;
}

.date-detail-lantern {
  position: absolute;
  top: 7px;
  right: 24px;
  width: 44px;
  opacity: 0.78;
  pointer-events: none;
}

.date-detail-header {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 175px;
  padding: 40px 8px 18px 12px;
}

.date-detail-tag {
  flex: 0 0 45px;
  align-self: flex-start;
  min-height: 118px;
  padding: 8px 6px;
  color: #7d2b18;
  text-align: center;
  border: 1px solid #8b2505;
  background: rgba(239, 218, 174, 0.6);
  box-shadow: inset 0 0 0 3px rgba(139, 37, 5, 0.08);
}

.date-detail-tag span {
  display: block;
  writing-mode: vertical-rl;
  margin: 0 auto 7px;
  letter-spacing: 2px;
  font-family: HonglouKaiti, KaiTi, serif;
  font-size: 12px;
}

.date-detail-tag b {
  display: block;
  padding: 4px 0;
  color: #f4dfbe;
  background: #8b2505;
  font-size: 11px;
  font-weight: 500;
}

.date-detail-heading {
  flex: 1;
  min-width: 0;
  padding: 14px 0 0 16px;
}

.date-detail-heading h1 {
  display: inline;
  margin: 0;
  color: #19110d;
  font-family: "HYBeiWeiXieJing", HonglouXingkai, STXingkai, serif;
  font-size: 41px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 1px;
}

.date-detail-heading time {
  display: inline-block;
  margin-left: 10px;
  color: #50372c;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.date-detail-rule {
  position: relative;
  height: 20px;
  margin-top: 11px;
  border-top: 1px solid #9d3b20;
}

.date-detail-rule::after {
  content: "❀";
  position: absolute;
  top: -12px;
  right: 17px;
  padding: 0 7px;
  color: #9d3b20;
  background: #eee0be;
  font-size: 17px;
}

.date-detail-article {
  position: relative;
  z-index: 2;
  padding: 3px 10px 12px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 13px;
  line-height: 1.88;
  text-align: justify;
}

.date-detail-article p {
  margin: 0 0 13px;
  text-indent: 2em;
}

.date-detail-article .detail-lead {
  color: #3a261d;
  font-size: 14px;
  font-weight: 600;
}

.date-detail-article .detail-section-break { margin-top: 24px; }

.date-detail-article .detail-source-line {
  margin: 20px 0 8px;
  color: #8b2505;
  text-indent: 0;
  font-weight: 600;
}

.date-share-card {
  position: relative;
  z-index: 2;
  margin: 22px 10px 18px;
  padding-top: 22px;
  border-top: 1px solid rgba(139, 37, 5, 0.48);
}

.date-share-card h2 {
  width: max-content;
  margin: -37px auto 15px;
  padding: 0 13px;
  color: #9d3b20;
  background: #eee0be;
  font-family: HonglouKaiti, KaiTi, serif;
  font-size: 17px;
  font-weight: 500;
}

.date-share-inner {
  padding: 18px 20px;
  border: 1px solid rgba(139, 37, 5, 0.43);
  background: rgba(255, 249, 234, 0.48);
}

.date-share-inner strong {
  color: #8b2505;
  font-family: "HYBeiWeiXieJing", HonglouKaiti, serif;
  font-size: 23px;
  font-weight: 400;
}

.date-share-inner p {
  margin: 12px 0;
  font-size: 12px;
  line-height: 1.75;
}

.date-share-inner small {
  color: #6b4b3b;
  font-size: 10px;
}

.date-detail-close-bottom {
  display: block;
  width: 164px;
  margin: 20px auto 8px;
  padding: 9px 12px;
  color: #8b2505;
  cursor: pointer;
  background: rgba(255, 248, 230, 0.42);
  border: 1px solid #8b2505;
  border-radius: 20px;
  font-family: HonglouKaiti, KaiTi, serif;
  font-size: 15px;
}

/* Date detail — full-page traditional letter styling */
.august-detail-page {
  background-color: #ead9b2;
  background-image:
    linear-gradient(rgba(250, 241, 216, 0.18), rgba(250, 241, 216, 0.18)),
    url("../images/bg.jpg");
  box-shadow: 0 0 36px rgba(35, 19, 10, 0.46);
}

.august-detail-page::before {
  inset: 10px 13px;
  border-color: rgba(139, 37, 5, 0.68);
  box-shadow:
    inset 0 0 0 4px rgba(234, 217, 178, 0.82),
    inset 0 0 0 5px rgba(139, 37, 5, 0.35);
}

.date-detail-scroll {
  padding: 24px 38px 32px;
}

.date-detail-plum {
  top: -7px;
  right: -13px;
  width: 160px;
  opacity: 0.68;
}

.date-detail-header {
  min-height: 214px;
  padding: 55px 3px 24px 8px;
  align-items: flex-start;
}

.date-detail-tag {
  flex-basis: 43px;
  min-height: 121px;
  padding: 16px 5px 6px;
  background: rgba(239, 220, 178, 0.42);
  border: 1px solid rgba(126, 37, 10, 0.78);
  box-shadow:
    inset 0 0 0 3px rgba(238, 220, 182, 0.8),
    inset 0 0 0 4px rgba(139, 37, 5, 0.26);
}

.date-detail-tag span {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.55;
}

.date-detail-tag b {
  margin: 0 -1px;
  padding: 6px 0;
  background: rgba(139, 37, 5, 0.86);
  font-size: 11px;
}

.date-detail-heading {
  padding: 12px 0 0 20px;
}

.date-detail-heading h1 {
  display: block;
  white-space: nowrap;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: 3px;
}

.date-detail-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 18px;
  color: #3e2b23;
}

.date-detail-heading time,
.date-detail-meta span {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.date-detail-rule {
  height: 17px;
  margin-top: 14px;
  border-color: rgba(139, 37, 5, 0.72);
}

.date-detail-rule::before {
  content: none;
}

.date-detail-rule::after {
  top: -13px;
  right: 15px;
  padding: 0 3px;
  background: #e8d5aa;
  font-size: 16px;
}

.date-detail-article {
  padding: 6px 8px 16px;
  color: #2b201a;
  font-family: HonglouKaiti, KaiTi, STKaiti, serif;
  font-size: 14px;
  line-height: 2;
}

.date-detail-article p {
  margin-bottom: 16px;
  text-indent: 2em;
}

.date-detail-article .detail-lead {
  color: #2b201a;
  font-size: 15px;
  font-weight: 400;
}

.date-detail-article .detail-source-line {
  margin-top: 22px;
  color: #33231c;
  font-weight: 500;
}

.date-share-card {
  min-height: 142px;
  margin: 28px 8px 13px;
  padding: 28px 18px 10px 151px;
  overflow: visible;
  border: 1px solid rgba(139, 37, 5, 0.62);
  background: rgba(248, 236, 207, 0.34);
  box-shadow: inset 0 0 0 4px rgba(139, 37, 5, 0.06);
}

.date-share-card::before {
  content: none;
}

.date-share-artwork {
  position: absolute !important;
  top: 24px;
  bottom: auto;
  left: 12px;
  z-index: 1;
  width: 128px;
  height: 102px !important;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(139, 37, 5, 0.42);
  opacity: 0.88;
}

.date-share-card h2 {
  position: absolute;
  top: -14px;
  left: 50%;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  color: #9a3419;
  background: transparent;
  white-space: nowrap;
  font-size: 18px;
  display: flex;
  letter-spacing: 0;
  z-index: 3;
}

.date-share-card h2 span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  margin-left: -2px;
  border: 1px solid rgba(154, 52, 25, 0.72);
  border-radius: 50%;
  background: #efe0bd;
  font-size: 15px;
}

.date-share-inner {
  position: relative;
  z-index: 1;
  padding: 0;
  border: 0;
  background: transparent;
}

.date-share-inner strong,
.date-share-inner p {
  display: block;
  margin: 0;
  color: #4d3025;
  font-family: HonglouKaiti, KaiTi, serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
}

.date-share-inner small {
  display: block;
  margin-top: 8px;
  color: #80513e;
  font-size: 9px;
}

.date-detail-close-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 230px;
  min-height: 48px;
  margin: 15px auto 9px;
  padding: 8px 22px;
  border: 1.5px solid #8b2505;
  border-radius: 25px;
  background: rgba(250, 240, 214, 0.48);
  font-size: 16px;
  letter-spacing: 2px;
}

.date-detail-close-bottom::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 24px;
  background: url("../images/share-icon.svg") center / contain no-repeat;
}

.date-detail-close-bottom::after {
  content: none;
}

.date-share-preview {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(40, 26, 16, 0.74);
  backdrop-filter: blur(5px);
}

.date-share-preview-inner {
  position: relative;
  width: min(350px, 92vw);
  max-height: 92vh;
  padding: 14px 14px 16px;
  overflow-y: auto;
  text-align: center;
  background:
    linear-gradient(rgba(250, 239, 207, 0.7), rgba(239, 218, 171, 0.62)),
    url("../images/bg.jpg") center / cover;
  border: 1px solid rgba(139, 37, 5, 0.7);
  box-shadow:
    0 18px 48px rgba(29, 16, 8, 0.46),
    inset 0 0 0 5px rgba(255, 249, 230, 0.34);
}

.date-share-preview-inner img {
  display: block;
  width: 100%;
  max-height: 69vh;
  object-fit: contain;
  border: 1px solid rgba(139, 37, 5, 0.26);
  box-shadow: 0 6px 18px rgba(65, 37, 22, 0.3);
  -webkit-touch-callout: default;
}

.date-share-preview-inner .date-share-hint {
  position: relative;
  margin: 13px 0 12px;
  padding: 10px 4px;
  color: #55372a;
  font-family: STKaiti, "Kaiti SC", KaiTi, serif;
  font-size: 13px;
  line-height: 1.7;
  border-top: 1px solid rgba(139, 37, 5, 0.34);
  border-bottom: 1px solid rgba(139, 37, 5, 0.34);
}

.date-share-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.date-share-preview-inner button,
.date-share-preview-inner a {
  display: inline-flex;
  min-width: 135px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  color: #8b2505;
  text-decoration: none;
  background: rgba(255, 249, 232, 0.45);
  border: 1px solid #8b2505;
  border-radius: 23px;
  font-family: HonglouKaiti, KaiTi, STKaiti, serif;
  font-size: 15px;
  font-weight: 400;
}

.date-share-preview-inner button i,
.date-share-preview-inner a i {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.date-share-preview-inner .date-share-system i {
  background-image: url("../images/share-icon.svg");
}

.date-share-preview-inner .date-share-actions a i {
  background-image: url("../images/download-icon.svg");
}

.date-share-actions button span,
.date-share-actions a span {
  font-family: "HYQuanTangShiShareActions", STKaiti, "Kaiti SC", KaiTi, serif !important;
}

@media (max-height: 700px) {
  .date-share-preview-inner img { max-height: 60vh; }
  .date-share-preview-inner .date-share-hint { margin: 8px 0; padding-block: 6px; }
}

/* Keep every piece of copy in the daily detail view in the system Kai typeface. */
.august-detail-page,
.august-detail-page * {
  font-family: "Kaiti SC", STKaiti, KaiTi, serif !important;
  font-synthesis: none;
}

.august-detail-page .date-detail-heading h1 {
  font-family: HonglouXingkai, STXingkai, KaiTi, serif !important;
}

.date-share-card h2,
.date-share-card h2 span,
.date-detail-close-bottom {
  font-family: "Kaiti SC", STKaiti, KaiTi, serif !important;
  font-synthesis: none;
}

.date-detail-close-bottom {
  font-family: "HYQuanTangShiShareButton", STKaiti, "Kaiti SC", KaiTi, serif !important;
}

.date-detail-article,
.date-detail-article p,
.date-detail-article .detail-lead,
.date-detail-article .detail-source-line,
.date-detail-article strong,
.date-detail-article em {
  font-family: "Kaiti SC", STKaiti, KaiTi, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
}

.date-detail-article > p,
.date-detail-article .detail-lead,
.date-detail-article .detail-source-line,
.date-detail-article .detail-section-break {
  text-indent: 2em !important;
}

.date-detail-section-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 8px 8px;
  color: #8b2505;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 4px;
  text-align: center;
}

.date-detail-section-heading::before,
.date-detail-section-heading::after {
  content: "";
  flex: 1 1 auto;
  height: 12px;
  background-repeat: no-repeat;
}

.date-detail-section-heading::before {
  background-image:
    radial-gradient(circle at calc(100% - 5px) 50%, #ead9b2 0 3px, rgba(139, 37, 5, 0.72) 3.5px 4.5px, transparent 5px),
    linear-gradient(rgba(139, 37, 5, 0.62), rgba(139, 37, 5, 0.62));
  background-position: center, left center;
  background-size: 100% 100%, calc(100% - 11px) 1px;
}

.date-detail-section-heading::after {
  background-image:
    radial-gradient(circle at 5px 50%, #ead9b2 0 3px, rgba(139, 37, 5, 0.72) 3.5px 4.5px, transparent 5px),
    linear-gradient(rgba(139, 37, 5, 0.62), rgba(139, 37, 5, 0.62));
  background-position: center, right center;
  background-size: 100% 100%, calc(100% - 11px) 1px;
}

.date-detail-section-heading span {
  flex: 0 0 auto;
  min-width: 126px;
  padding: 7px 15px 6px;
  border: 1px solid rgba(139, 37, 5, 0.76);
  border-radius: 20px;
  background: rgba(239, 224, 189, 0.72);
  font-family: "HYQuanTangShiDetailHeadings", STKaiti, "Kaiti SC", KaiTi, serif !important;
  line-height: 1;
}

.date-detail-red-chamber {
  margin: 10px 8px 18px;
}

.date-detail-red-chamber .date-detail-section-heading {
  margin: 0 0 12px;
}

.date-detail-red-chamber img {
  position: static !important;
  width: 100%;
  height: auto !important;
  max-height: 285px;
  object-fit: contain;
  border: 1px solid rgba(139, 37, 5, 0.46);
  background: rgba(246, 232, 199, 0.45);
  cursor: zoom-in;
}

.date-artwork-lightbox {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  border: 0;
  background: rgba(24, 15, 10, 0.88);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.date-artwork-lightbox.is-visible {
  opacity: 1;
}

.date-artwork-lightbox img {
  position: static !important;
  width: auto;
  height: auto !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid rgba(232, 207, 158, 0.72);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.52);
}

/* Put birthdays and festivals on separate rows when they share one date. */
.calendar-events.has-birthday-and-festival,
.calendar-events:has(.event-birthday):has(.event-festival) {
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  row-gap: 0;
  height: 27px;
  margin-top: 1px;
  overflow: hidden;
}

.home-page .calendar-cell:has(.calendar-events.has-birthday-and-festival),
.home-page .calendar-cell:has(.calendar-events .event-birthday):has(.calendar-events .event-festival) {
  padding-top: 4px;
}

.calendar-events.has-birthday-and-festival .event-birthday,
.calendar-events:has(.event-birthday):has(.event-festival) .event-birthday,
.calendar-events.has-birthday-and-festival .event-festival,
.calendar-events:has(.event-birthday):has(.event-festival) .event-festival {
  flex: 0 0 13px;
  width: max-content;
  max-width: 100%;
  height: 13px;
  min-height: 13px;
  margin: 0 auto;
  font-size: 9px;
  line-height: 11px;
}

.calendar-events.has-birthday-and-festival .event-birthday,
.calendar-events:has(.event-birthday):has(.event-festival) .event-birthday {
  order: 2;
}

.calendar-events.has-birthday-and-festival .event-festival,
.calendar-events:has(.event-birthday):has(.event-festival) .event-festival {
  order: 1;
}

.calendar-events.has-birthday-and-festival .calendar-event img,
.calendar-events:has(.event-birthday):has(.event-festival) .calendar-event img {
  width: 10px;
  height: 11px;
}

.calendar-events.has-birthday-and-festival .calendar-event span,
.calendar-events:has(.event-birthday):has(.event-festival) .calendar-event span {
  max-width: 37px;
  margin-top: 0;
  overflow: hidden;
  line-height: 11px;
}

.home-page .calendar-event,
.home-page .calendar-event span {
  font-family: "HYQuanTangShiCalendarLabels", STKaiti, "Kaiti SC", KaiTi, serif !important;
}

/* Display multiple birthdays as separate compact rows inside the same date cell. */
.calendar-events:has(.event-birthday + .event-birthday) {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  row-gap: 0;
  height: 27px;
  margin-top: 1px;
  overflow: hidden;
}

.calendar-events:has(.event-birthday + .event-birthday) .event-birthday {
  flex: 0 0 13px;
  height: 13px;
  min-height: 13px;
  margin: 0 auto;
  font-size: 9px;
  line-height: 11px;
}

.calendar-events:has(.event-birthday + .event-birthday) .event-birthday img {
  width: 10px;
  height: 11px;
}

:root {
  --scroll-top: -20px;
  --scroll-travel: 768px;
}

.copyright-underlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: url("../images/bg.jpg") center / cover no-repeat;
  pointer-events: none;
}

.copyright-underlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(25, 18, 12, 0.26);
}

.copyright-underlay .lantern {
  visibility: hidden;
}

body.copyright-active #root {
  position: relative;
  z-index: 1;
}

body.copyright-active .viewport {
  z-index: 1;
  background: transparent;
}

body.copyright-active .viewport::before {
  opacity: 0;
}

body.copyright-active .copyright-page {
  background-color: transparent !important;
  background-image: none !important;
}

body.copyright-active #root .copyright-button {
  opacity: 0.42;
  filter: brightness(0.55) saturate(0.7);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.copyright-button {
  right: 15px;
  bottom: 15px;
  width: 44px;
}

.hotspot-copyright {
  right: 12px;
  bottom: 12px;
  width: 50px;
  height: 50px;
}

.nav-today {
  top: 16px;
  left: 18px;
  width: 65px;
}

.nav-search {
  top: 16px;
  left: 94px;
  width: 120px;
}

.hotspot-today {
  top: 14px;
  left: 16px;
  width: 70px;
  height: 42px;
}

.hotspot-search {
  top: 14px;
  left: 91px;
  width: 126px;
  height: 42px;
}

.inline-home-search {
  position: absolute;
  z-index: 12;
  top: 16px;
  left: 94px;
  display: flex;
  align-items: center;
  width: 120px;
  height: 37px;
  overflow: hidden;
  box-sizing: border-box;
  border: 0;
  background:
    linear-gradient(#8b2505, #8b2505) 10px top / calc(100% - 20px) 1.5px no-repeat,
    linear-gradient(#8b2505, #8b2505) 10px bottom / calc(100% - 20px) 1.5px no-repeat,
    linear-gradient(rgba(217, 160, 126, 0.3), rgba(217, 160, 126, 0.3)) 10px 0 / calc(100% - 20px) 100% no-repeat;
  transition: width 0.48s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.inline-home-search::before,
.inline-home-search::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 2;
  width: 11px;
  height: 37px;
  background-image: url("../images/home/搜索.svg");
  background-size: 120px 37px;
  background-repeat: no-repeat;
  pointer-events: none;
}

.inline-home-search::before {
  left: 0;
  background-position: left top;
}

.inline-home-search::after {
  right: 0;
  background-position: right top;
}

.inline-home-search.is-open {
  width: 205px;
  box-shadow: 0 3px 10px rgba(62, 31, 20, 0.18);
}

.inline-search-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 40px;
  width: 40px;
  height: 35px;
}

.inline-search-icon::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 13px;
  width: 11px;
  height: 11px;
  border: 1.5px solid #8b2505;
  border-radius: 50%;
}

.inline-search-icon::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 24px;
  width: 7px;
  height: 1.5px;
  border-radius: 1px;
  background: #8b2505;
  transform: rotate(42deg);
  transform-origin: left center;
}

.inline-home-search input {
  position: relative;
  z-index: 1;
  width: 157px;
  min-width: 0;
  padding: 0 8px 0 2px;
  border: 0;
  outline: 0;
  color: #47251c;
  background: transparent;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.22s ease 0.14s;
}

.inline-home-search.is-open input { opacity: 1; }
.inline-home-search input::placeholder { color: rgba(71, 37, 28, 0.64); }

.inline-home-search input.has-no-result::placeholder { color: #9a2f18; }

.calendar-cell.is-search-match {
  z-index: 3;
  outline: 3px solid rgba(151, 45, 17, 0.92);
  outline-offset: -3px;
  background: rgba(190, 91, 49, 0.42) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 238, 194, 0.8), 0 0 15px rgba(139, 37, 5, 0.58);
  animation: search-day-pulse 0.72s ease-in-out 3;
}

@keyframes search-day-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.28); }
}
body.inline-search-active .nav-search { opacity: 0; }

body.inline-search-active .home-page .hotspot-copyright {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.legend-flower::before {
  background-image: url("../images/jq.png") !important;
  width: 23px !important;
  height: 23px !important;
  left: -25px !important;
}

.legend-person::before {
  background-image: url("../images/sr.png") !important;
  width: 21px !important;
  height: 22px !important;
  left: -23px !important;
}

.legend-festival::before {
  background-image: url("../images/jr.png") !important;
  width: 17px !important;
  height: 21px !important;
  left: -20px !important;
}

.legend-flower { color: #315b3a; }
.legend {
  gap: 40px;
  left: 92px;
}

.legend-person { color: #a94f68; }
.legend-festival { color: #8b2505; }

.calendar-event.event-solar-term { color: #315b3a; }
.calendar-event.event-birthday { color: #a94f68; }
.calendar-event.event-festival { color: #8b2505; }

.calendar-event.event-solar-term img {
  width: 15px;
  height: 15px;
}

.calendar-event.event-solar-term {
  flex-direction: row;
  align-items: center;
  gap: 2px;
  max-width: 46px;
  margin-top: 3px;
}

.calendar-event.event-solar-term img {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.calendar-event.event-solar-term span {
  max-width: none;
  margin-top: 0;
  white-space: nowrap;
}

.calendar-event.event-birthday img {
  width: 14px;
  height: 15px;
}

.calendar-event.event-festival img {
  width: 12px;
  height: 15px;
}

.calendar-event.event-festival {
  flex-direction: row;
  align-items: center;
  gap: 2px;
  max-width: 46px;
  margin-top: 3px;
}

.calendar-event.event-festival img {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.calendar-event.event-festival span {
  max-width: none;
  margin-top: 0;
  white-space: nowrap;
}

.calendar-event.event-solar-term,
.calendar-event.event-birthday,
.calendar-event.event-festival {
  width: max-content;
  max-width: 100%;
  justify-content: center;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

/* Keep every calendar annotation visually consistent. */
.home-page .calendar-event.event-solar-term,
.home-page .calendar-event.event-birthday,
.home-page .calendar-event.event-festival {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 12px;
  margin: 2px auto 0;
  line-height: 12px;
}

.home-page .calendar-event.event-solar-term img,
.home-page .calendar-event.event-birthday img,
.home-page .calendar-event.event-festival img {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin: 0;
  object-fit: contain;
}

.home-page .calendar-event.event-solar-term span,
.home-page .calendar-event.event-birthday span,
.home-page .calendar-event.event-festival span {
  margin: 0;
  line-height: 12px;
  white-space: nowrap;
}

/* Two or more annotations on one date are shown one per row. */
.home-page .calendar-events.has-multiple-events {
  display: flex;
  height: auto;
  max-height: 36px;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  row-gap: 0;
  margin-top: 1px;
  overflow: hidden;
}

.home-page .calendar-cell:has(.calendar-events.has-multiple-events) {
  padding-top: 3px;
}

.home-page .calendar-events.has-multiple-events .calendar-event {
  flex: 0 0 12px;
  width: max-content;
  max-width: 100%;
  height: 12px;
  min-height: 12px;
  margin: 0 auto;
  font-size: 9px;
  line-height: 12px;
}

.home-page .calendar-events.has-multiple-events:has(.calendar-event:nth-child(3)) .calendar-event {
  flex-basis: 10px;
  height: 10px;
  min-height: 10px;
  font-size: 8px;
  line-height: 10px;
}

.home-page .calendar-events.has-multiple-events:has(.calendar-event:nth-child(3)) .calendar-event img {
  flex-basis: 9px;
  width: 9px;
  height: 9px;
}

.copyright-page-art {
  display: none !important;
}

.copyright-scroll-sheet {
  position: absolute;
  top: var(--scroll-top);
  left: 8px;
  z-index: 20;
  width: 377px;
  height: 776px;
  padding: 94px 38px 34px;
  overflow: hidden;
  border-right: 2px solid rgba(126, 91, 52, 0.46);
  border-left: 2px solid rgba(126, 91, 52, 0.46);
  background:
    linear-gradient(90deg, rgba(121, 79, 37, 0.17), transparent 8% 92%, rgba(121, 79, 37, 0.17)),
    linear-gradient(rgba(247, 238, 215, 0.94), rgba(239, 224, 190, 0.94)),
    url("../images/home/juan.jpg") center / cover no-repeat;
  box-shadow:
    -14px 3px 18px rgba(30, 19, 11, 0.46),
    14px 3px 18px rgba(30, 19, 11, 0.46),
    0 12px 22px rgba(30, 19, 11, 0.38);
  color: #201814;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  text-align: left;
  animation: copyright-scroll-unroll 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: top center;
  will-change: clip-path, opacity;
}

.copyright-work-title {
  margin: 0 0 21px;
  color: #8b2505;
  font-size: 25px;
  font-weight: 600;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif !important;
  font-style: normal;
}

.copyright-project,
.copyright-isbn {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.5;
}

.copyright-details {
  margin: 24px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.copyright-details div {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.copyright-details dt,
.copyright-details dd {
  margin: 0;
}

.copyright-details dt {
  flex: 0 0 64px;
  font-weight: 400;
}

.copyright-details dd {
  flex: 1;
}

.copyright-details .copyright-thanks {
  margin-bottom: 0;
}

.copyright-thanks dd {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.copyright-date {
  margin-top: 36px;
  font-weight: 400;
}

.copyright-date dt {
  flex-basis: 88px;
  white-space: nowrap;
}

.copyright-date dd {
  white-space: nowrap;
}

.copyright-scroll-sheet,
.copyright-scroll-sheet * {
  font-family: "HYQuanTangShiCopyright", STKaiti, "Kaiti SC", KaiTi, serif !important;
  font-synthesis: none;
}

.copyright-page::after {
  content: "";
  position: absolute;
  top: var(--scroll-top);
  left: 2px;
  z-index: 30;
  width: 389px;
  height: 17px;
  border: 1px solid rgba(117, 52, 32, 0.55);
  border-radius: 9px;
  background:
    linear-gradient(90deg, #7a452d 0 4%, transparent 4% 96%, #7a452d 96% 100%),
    linear-gradient(180deg, #f8efd9 0%, #d9c49c 48%, #b79868 52%, #efe2c5 100%);
  box-shadow:
    0 4px 8px rgba(50, 28, 16, 0.28),
    inset 0 1px rgba(255, 255, 255, 0.75);
  animation: copyright-scroll-rod-down 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: none;
  will-change: translate;
}

.copyright-back {
  display: none !important;
}

.copyright-page.is-closing::after {
  animation: copyright-scroll-rod-up 0.68s cubic-bezier(0.64, 0, 0.78, 0) both;
}

.copyright-scroll-sheet.is-closing {
  animation: copyright-scroll-roll-up 0.68s cubic-bezier(0.64, 0, 0.78, 0) both;
  pointer-events: none;
}

.copyright-lantern {
  pointer-events: none;
  z-index: 100;
  animation:
    lantern-sway 3.2s ease-in-out infinite,
    copyright-lantern-pull-down 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: translate;
}

.copyright-lantern.is-closing {
  animation:
    lantern-sway 3.2s ease-in-out infinite,
    copyright-lantern-pull-up 0.68s cubic-bezier(0.64, 0, 0.78, 0) both;
}

@keyframes copyright-scroll-unroll {
  from {
    opacity: 0.8;
    clip-path: inset(0 0 100% 0);
  }

  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes copyright-scroll-roll-up {
  from {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }

  to {
    opacity: 0.8;
    clip-path: inset(0 0 100% 0);
  }
}

@keyframes copyright-scroll-rod-down {
  from { translate: 0 0; }
  to { translate: 0 var(--scroll-travel); }
}

@keyframes copyright-scroll-rod-up {
  from { translate: 0 var(--scroll-travel); }
  to { translate: 0 0; }
}

@keyframes copyright-lantern-pull-down {
  from { translate: 0 0; }
  to { translate: 0 var(--lantern-travel, 706px); }
}

@keyframes copyright-lantern-pull-up {
  from { translate: 0 var(--lantern-travel, 706px); }
  to { translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .copyright-scroll-sheet,
  .copyright-page::after,
  .copyright-lantern {
    animation: none;
  }
}

.home-footer-nav {
  position: absolute;
  bottom: 22px;
  left: 12px;
  z-index: 12;
  display: grid;
  grid-template-columns: 58px 1fr 58px 58px;
  gap: 6px;
  width: 369px;
  height: 36px;
}

.home-footer-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 36px;
  padding: 0 7px;
  border: 1px solid rgba(117, 52, 32, 0.72);
  border-radius: 18px;
  color: #753420;
  background: rgba(239, 220, 178, 0.58);
  font-family: "HYQuanTangShiFooter", STKaiti, "Kaiti SC", KaiTi, serif;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(76, 42, 24, 0.12);
}

.home-footer-nav button:active {
  background: rgba(139, 37, 5, 0.14);
  transform: translateY(1px);
}

.home-page .legend {
  display: none;
}

.home-page .copyright-button {
  display: none;
}

.home-page .hotspot-copyright {
  position: absolute;
  top: 14px;
  right: auto;
  bottom: auto;
  left: 280px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  color: #753420;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
}

.home-page .hotspot-copyright::before {
  content: "♪";
  display: block;
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1;
  transform-origin: 50% 50%;
}

.home-page .hotspot-copyright.is-music-playing::before {
  animation: music-note-spin 2.4s linear infinite;
}

@keyframes music-note-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .hotspot-copyright.is-music-playing::before {
    animation: none;
  }
}

.home-page .month-title {
  display: flex;
  width: 66px;
  flex-direction: column;
  align-items: center;
  color: transparent;
  font-size: 0;
  writing-mode: horizontal-tb;
}

.home-page .poem-text {
  top: 88px;
}

.home-page .month-title::before,
.home-page .month-title::after {
  color: #050403;
  font-family: HonglouXingkai, STXingkai, KaiTi, serif;
  font-size: 72px;
  line-height: 0.92;
}

.home-page .month-title::before {
  content: attr(data-display-month-number);
  white-space: nowrap;
}

.home-page .month-title::after {
  content: "月";
}

.home-page .month-title[data-display-month-number="10"]::before,
.home-page .month-title[data-display-month-number="11"]::before,
.home-page .month-title[data-display-month-number="12"]::before {
  font-size: 62px;
}

.home-page .month-note {
  top: 86px;
  right: 43px;
  text-align: left;
  font-size: 0;
}

.home-page .month-note::after {
  content: attr(data-display-note);
  display: block;
  width: 68px;
  color: #30251e;
  white-space: pre-line;
  font-family: "HYQuanTangShiYear", STKaiti, "Kaiti SC", KaiTi, serif;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  text-orientation: upright;
}

.footer-reading-page {
  position: fixed;
  inset: 0;
  z-index: 310;
  overflow: hidden;
  background: #17120e;
  opacity: 0;
  transition: opacity 0.26s ease;
}

.footer-reading-page.is-visible { opacity: 1; }
.footer-reading-page.is-closing { opacity: 0; }

.footer-reading-sheet {
  position: relative;
  box-sizing: border-box;
  width: min(393px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  color: #34231b;
  background:
    linear-gradient(rgba(244, 230, 194, 0.32), rgba(244, 230, 194, 0.32)),
    url("../images/bg.jpg") center / cover;
  font-family: "Kaiti SC", STKaiti, KaiTi, serif;
  scrollbar-width: none;
}

.footer-reading-sheet,
.footer-reading-sheet button,
.footer-reading-body,
.footer-reading-body * {
  font-family: STKaiti, "Kaiti SC", KaiTi, serif !important;
}

.footer-reading-header h1,
.honglou-timeline-year h2,
.honglou-afterword-section h2 {
  font-family: "HYQuanTangShiReadingHeadings", STKaiti, "Kaiti SC", KaiTi, serif !important;
}

.footer-reading-sheet::-webkit-scrollbar { display: none; }

.footer-reading-frame {
  box-sizing: border-box;
  min-height: calc(100% - 1px);
  padding: 48px 24px 44px;
  border: 1px solid rgba(139, 37, 5, 0.55);
  box-shadow: inset 0 0 0 4px rgba(139, 37, 5, 0.05);
}

.footer-reading-back {
  position: absolute;
  top: 25px;
  left: 27px;
  z-index: 2;
  width: 34px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.footer-reading-back img {
  display: block;
  width: 34px;
  height: 32px;
}

.footer-reading-header {
  position: relative;
  text-align: center;
}

.footer-reading-header h1 {
  margin: 8px 0 16px;
  color: #1d130f;
  font-family: STKaiti, "Kaiti SC", KaiTi, serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 9px;
}

.footer-reading-header i {
  display: block;
  width: 92px;
  height: 1px;
  margin: 0 auto 34px;
  background: rgba(139, 37, 5, 0.62);
}

.footer-reading-body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 16px;
  line-height: 2;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.footer-reading-group { margin: 0 0 26px; }
.footer-reading-group:last-child { margin-bottom: 10px; }

.footer-reading-group p {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 0 10px;
  text-align: justify;
  text-indent: 2em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.footer-reading-group.is-verse {
  margin: 32px 0;
  color: #7d2b17;
}

.footer-reading-group.is-verse p {
  margin: 0;
  text-align: center;
  text-indent: 0;
  font-family: "HYQuanTangShiPrefaceVerse", STKaiti, "Kaiti SC", KaiTi, serif !important;
  letter-spacing: 1px;
}

.footer-reading-page.is-timeline .footer-reading-frame {
  padding-right: 14px;
  padding-left: 14px;
}

.footer-reading-page.is-timeline .footer-reading-header h1 {
  font-size: 29px;
  letter-spacing: 3px;
}

.honglou-timeline {
  position: relative;
  padding: 0 4px 8px 28px;
}

.honglou-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 12px;
  left: 8px;
  width: 1px;
  background: rgba(139, 37, 5, 0.48);
}

.honglou-timeline-year {
  position: relative;
  margin: 0 0 30px;
}

.honglou-timeline-year::before {
  content: "";
  position: absolute;
  top: 9px;
  left: -25px;
  width: 9px;
  height: 9px;
  border: 2px solid #8b2505;
  border-radius: 50%;
  background: #eddbb4;
}

.honglou-timeline-year h2 {
  margin: 0 0 11px;
  color: #8b2505;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 3px;
}

.honglou-timeline-year p {
  position: relative;
  margin: 0 0 8px;
  padding-left: 14px;
  text-align: left;
  text-indent: 0;
  font-size: 14px;
  line-height: 1.8;
}

.honglou-timeline-year p::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(139, 37, 5, 0.58);
}

.honglou-timeline-year .timeline-summary {
  margin-bottom: 12px;
  padding-left: 0;
  color: #704331;
  font-weight: 500;
}

.honglou-timeline-year .timeline-summary::before { content: none; }

.honglou-afterword-section {
  margin: 0 0 36px;
}

.honglou-afterword-section h2 {
  margin: 0 0 18px;
  color: #8b2505;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
}

.honglou-afterword-section p {
  margin: 0 0 12px;
  text-align: justify;
  text-indent: 2em;
  font-size: 15px;
  line-height: 2;
}

.honglou-afterword-signature {
  margin: 42px 0 12px;
  text-align: right;
  color: #704331;
}

.honglou-afterword-signature p {
  margin: 3px 0;
  text-indent: 0;
}

.footer-reading-page.is-caoxueqin-audio .footer-reading-frame {
  padding-right: 12px;
  padding-left: 12px;
}

.caoxueqin-featured-photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin: 28px 0 4px;
}

.caoxueqin-featured-photos figure {
  margin: 0;
}

.caoxueqin-featured-photos button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(139, 37, 5, 0.42);
  background: rgba(239, 220, 178, 0.45);
  cursor: pointer;
}

.caoxueqin-featured-photos img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.caoxueqin-featured-photos figcaption {
  margin-top: 8px;
  color: #704331;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.footer-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  width: 100%;
  height: 100%;
  padding: 28px;
  place-items: center;
  border: 0;
  background: rgba(25, 16, 12, 0.9);
  cursor: zoom-out;
}

.footer-photo-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.36);
}

.caoxueqin-audio-element { display: none; }

.caoxueqin-audio-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.caoxueqin-audio-list li { margin: 0 0 9px; }

.caoxueqin-audio-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid rgba(139, 37, 5, 0.32);
  border-radius: 5px;
  color: #38251c;
  text-align: left;
  background: rgba(249, 238, 210, 0.42);
  cursor: pointer;
}

.caoxueqin-audio-list button.is-playing {
  border-color: rgba(139, 37, 5, 0.78);
  background: rgba(180, 63, 40, 0.1);
}

.caoxueqin-audio-list button > i {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid rgba(139, 37, 5, 0.72);
  border-radius: 50%;
  color: #8b2505;
  background: rgba(239, 220, 178, 0.58);
  box-shadow:
    inset 0 0 0 2px rgba(239, 220, 178, 0.92),
    inset 0 0 0 3px rgba(139, 37, 5, 0.48),
    0 1px 3px rgba(76, 42, 24, 0.13);
  font-family: sans-serif;
  font-style: normal;
  line-height: 1;
}

.caoxueqin-audio-list button > i::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #8b2505;
}

.caoxueqin-audio-list button.is-audio-playing > i {
  color: #f4e5c2;
  background: #8b2505;
  box-shadow:
    inset 0 0 0 2px #8b2505,
    inset 0 0 0 3px rgba(244, 229, 194, 0.76),
    0 1px 4px rgba(76, 42, 24, 0.2);
}

.caoxueqin-audio-list button.is-audio-playing > i::before {
  width: 9px;
  height: 12px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(
    to right,
    #f4e5c2 0 3px,
    transparent 3px 6px,
    #f4e5c2 6px 9px
  );
}

.caoxueqin-audio-list button > span { min-width: 0; }

.caoxueqin-audio-list button b {
  display: block;
  margin-bottom: 3px;
  color: #985136;
  font-family: sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
}

.caoxueqin-audio-list button strong {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.caoxueqin-gallery {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  background: rgba(28, 18, 12, 0.78);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.caoxueqin-gallery.is-visible { opacity: 1; }
.caoxueqin-gallery.is-closing { opacity: 0; }

.caoxueqin-gallery-inner {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-height: none;
  padding: max(44px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow-y: auto;
  border: 0;
  background: url("../images/bg.jpg") center / cover;
  color: #2d211a;
  text-align: center;
  box-shadow: none;
}

.caoxueqin-gallery-kicker {
  margin: 0;
  color: #80513e;
  font-family: "Kaiti SC", STKaiti, KaiTi, serif;
  font-size: 12px;
  letter-spacing: 4px;
}

.caoxueqin-gallery h1 {
  margin: 8px 0 22px;
  color: #8b2505;
  font-family: HonglouXingkai, STXingkai, KaiTi, serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 6px;
}

.caoxueqin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}

.caoxueqin-gallery figure { margin: 0; }

.caoxueqin-gallery figure img {
  position: static !important;
  width: 100%;
  height: 126px !important;
  object-fit: cover;
  border: 1px solid rgba(139, 37, 5, 0.38);
  cursor: zoom-in;
}

.caoxueqin-gallery figcaption {
  margin-top: 5px;
  font-family: "Kaiti SC", STKaiti, KaiTi, serif;
  font-size: 11px;
}

.caoxueqin-gallery-hint {
  margin: 20px 0 0;
  color: #80513e;
  font-family: "Kaiti SC", STKaiti, KaiTi, serif;
  font-size: 11px;
}

.caoxueqin-gallery-lightbox {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 20px;
  border: 0;
  color: #f2dfba;
  background: rgba(22, 14, 9, 0.92);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.caoxueqin-gallery-lightbox.is-visible { opacity: 1; }

.caoxueqin-gallery-lightbox img {
  position: static !important;
  width: auto;
  height: auto !important;
  max-width: 100%;
  max-height: 82%;
  object-fit: contain;
  border: 1px solid rgba(239, 220, 178, 0.68);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.52);
}

.caoxueqin-gallery-lightbox span {
  max-width: 92%;
  font-family: "Kaiti SC", STKaiti, KaiTi, serif;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}
