.moon-center-page {
  padding-bottom: calc(40px + var(--safe-bottom));
  overflow-x: hidden;
}

.topbar,
.moon-center-heading,
.moon-hero-card,
.moon-calendar-section,
.moon-events-section,
.site-footer {
  width: var(--w-content);
  margin: 0 auto;
}

.topbar {
  width: var(--w-topbar);
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  margin: 0;
}

.topbar-actions {
  width: auto;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.icon-btn {
  width: 16px;
  height: 16px;
  border: 0;
  padding: 0;
  background: transparent;
  display: grid;
  place-items: center;
}

.icon-image {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.menu-icon {
  width: 12px;
  height: 12px;
}

.moon-center-heading {
  margin-top: -2px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.back-btn {
  width: 16px;
  height: 16px;
  border: 0;
  padding: 0;
  background: transparent;
  display: grid;
  place-items: center;
}

.back-chevron-image {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.moon-center-title {
  margin: 0;
  color: #f9d366;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

/* 月相页广告位：
 * - 首屏 300x250：标题区后、hero 卡前
 * - 中插 300x250：月历后、事件区前
 */
.moon-center-page .ad-slot[data-ad-slot="moon-center-top"] {
  margin: 0 auto;
}
.moon-center-page .ad-slot[data-ad-slot="moon-center-top"][data-ad-state="loading"],
.moon-center-page .ad-slot[data-ad-slot="moon-center-top"][data-ad-state="filled"] {
  margin: 0 auto 14px;
}

.moon-center-page .ad-slot[data-ad-slot="moon-center-mpu-1"] {
  margin: 14px auto 12px;
}

.moon-hero-card {
  position: relative;
  min-height: 150px;
  border-radius: 20px;
  background: #15161a;
  box-sizing: border-box;
  border: 1px solid #fdf5d7;
  box-shadow: 0 4px 20px 0 rgba(255, 200, 91, 0.6);
  overflow: hidden;
}

.moon-center-page.is-initial-loading .moon-hero-card::after {
  content: "";
  position: absolute;
  right: 27px;
  bottom: 23px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.14) 22%,
      rgba(255, 255, 255, 0.28) 40%,
      rgba(255, 255, 255, 0.14) 62%
    ),
    rgba(255, 255, 255, 0.08);
  background-size: 400% 100%;
  animation: moon-skeleton-loading 2.8s ease-in-out infinite;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px) saturate(128%);
  -webkit-backdrop-filter: blur(14px) saturate(128%);
  z-index: 3;
  pointer-events: none;
}

.moon-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.moon-hero-content {
  position: relative;
  z-index: 2;
  padding: 24px 0 0 24px;
}

@keyframes moon-skeleton-loading {
  0% {
    background-position: 200% 50%;
  }
  100% {
    background-position: -200% 50%;
  }
}

.moon-center-page.is-initial-loading .moon-hero-title,
.moon-center-page.is-initial-loading .moon-hero-meta,
.moon-center-page.is-initial-loading .moon-hero-sub,
.moon-center-page.is-initial-loading .moon-day-image-skeleton,
.moon-center-page.is-initial-loading .moon-day-date-skeleton {
  color: transparent !important;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.14) 22%,
    rgba(255, 255, 255, 0.28) 40%,
    rgba(255, 255, 255, 0.14) 62%
  );
  background-size: 400% 100%;
  animation: moon-skeleton-loading 2.8s ease-in-out infinite;
}

.moon-hero-title {
  margin: 0;
  color: #ffffff;
  width: 100%;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
  white-space: nowrap;
}

.moon-center-page.is-initial-loading .moon-hero-title {
  width: 180px;
  height: 56px;
}

.moon-hero-meta,
.moon-hero-sub {
  margin: 0;
  width: auto;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.moon-hero-meta {
  margin-top: 10px;
}

.moon-center-page.is-initial-loading .moon-hero-meta {
  width: 170px;
  height: 18px;
}

.moon-hero-sub {
  margin-top: 28px;
}

.moon-center-page.is-initial-loading .moon-hero-sub {
  display: none;
}

.moon-hero-sign-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 16px;
  transform: translateY(2px);
}

.moon-hero-sign {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 191px;
  white-space: nowrap;
  margin-top: 58px;
}

.moon-center-page.is-initial-loading .moon-hero-sign-icon,
.moon-center-page.is-initial-loading .moon-day-image,
.moon-center-page.is-initial-loading .moon-day-date,
.moon-center-page.is-initial-loading .moon-hero-moon {
  opacity: 0;
}

.moon-hero-sub + .moon-hero-sub {
  margin-top: 12px;
}

.moon-hero-moon {
  position: absolute;
  right: 27px;
  bottom: 23px;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(255, 218, 140, 0.32));
  z-index: 2;
}

.moon-calendar-section .title-section,
.moon-events-section .title-section {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
}

.moon-calendar-track {
  position: relative;
  margin-top: 18px;
  min-height: 164px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(251, 227, 167, 0.14) 0%, rgba(251, 227, 167, 0) 28%),
    linear-gradient(180deg, rgba(18, 24, 40, 0.82) 0%, rgba(5, 8, 14, 0.96) 100%),
    rgba(7, 10, 18, 0.82);
  backdrop-filter: blur(18px) saturate(138%);
  -webkit-backdrop-filter: blur(18px) saturate(138%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 22px 44px rgba(0, 0, 0, 0.36),
    0 0 24px rgba(255, 217, 148, 0.08);
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 14px 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overflow-y: hidden;
  touch-action: pan-x;
  cursor: grab;
}

.moon-calendar-track::-webkit-scrollbar {
  display: none;
}

.moon-calendar-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.moon-day-item {
  position: relative;
  flex: 0 0 72px;
  min-width: 72px;
  min-height: 140px;
  border-radius: 12px;
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.015) 100%),
    rgba(255, 255, 255, 0.008);
  scroll-snap-align: start;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
  cursor: pointer;
  user-select: none;
}

.moon-day-item-skeleton {
  pointer-events: none;
}

.moon-day-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0) 52%);
  opacity: 0.42;
  pointer-events: none;
}

.moon-day-item:hover {
  transform: translateY(-2px);
}

.moon-day-item:focus-visible {
  outline: 1px solid rgba(245, 247, 255, 0.64);
  outline-offset: 2px;
}

.moon-day-item.is-active {
  border-color: rgba(218, 228, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(88, 100, 142, 0.14) 0%, rgba(25, 31, 55, 0.3) 100%),
    linear-gradient(180deg, rgba(11, 16, 36, 0.68) 0%, rgba(9, 13, 28, 0.72) 100%),
    rgba(10, 14, 32, 0.62);
  backdrop-filter: blur(14px) saturate(132%);
  -webkit-backdrop-filter: blur(14px) saturate(132%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 10px 20px rgba(8, 12, 30, 0.34),
    0 0 18px rgba(168, 187, 255, 0.06);
  transform: translateY(-1px);
}

.moon-day-image {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 221, 161, 0.18));
}

.moon-day-image-skeleton {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  filter: none;
}

.moon-day-date {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.moon-day-date-skeleton {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 14px;
  border-radius: 8px;
}

.moon-day-item.is-active .moon-day-date {
  font-weight: 600;
  color: #f5f7ff;
}

.moon-events-section {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.moon-event-card {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  padding: 14px 16px 20px 128px;
  min-height: 140px;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 auto;
}

.moon-event-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.moon-event-card.is-gold,
.moon-event-card.is-purple {
  width: 100%;
  max-width: none;
  min-height: 147px;
  height: 147px;
  padding: 14px 22px 18px 108px;
}

.moon-event-card.is-gold {
  border: 1px solid rgba(253, 245, 215, 0.6);
  background: url("../assets/images/home/event/card-bg.png?v=20260417122805") center / cover no-repeat;
  min-height: 168px;
  height: 168px;
  padding-bottom: 20px;
}

.moon-event-card.is-purple {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: url("../assets/images/moon-center/event-purple-bg.webp?v=20260421130000") center / cover no-repeat;
}

.moon-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  height: 28px;
  border-radius: 999px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(141, 145, 145, 0.28);
  backdrop-filter: blur(10px) saturate(120%);
}

.moon-event-card.is-gold .moon-event-pill,
.moon-event-card.is-purple .moon-event-pill {
  position: relative;
  z-index: 2;
  min-height: 28px;
  height: 28px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(253, 245, 215, 0.42);
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.moon-event-pill img {
  width: 15px;
  height: 16px;
  object-fit: contain;
}

.moon-event-card.is-gold .moon-event-pill img,
.moon-event-card.is-purple .moon-event-pill img {
  width: 13px;
  height: 13px;
}

.moon-event-pill span {
  font-size: 14px;
  color: rgba(253, 245, 215, 0.95);
}

.moon-event-card.is-gold .moon-event-pill span,
.moon-event-card.is-purple .moon-event-pill span {
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: normal;
  color: #fdf5d7;
  white-space: nowrap;
}

.moon-event-moon {
  position: absolute;
  left: 18px;
  top: 56px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
}

.moon-event-card.is-gold .moon-event-moon {
  left: 22px;
  top: 48px;
  width: 60px;
  height: 60px;
}

.moon-event-card.is-purple .moon-event-moon {
  left: 22px;
  top: 48px;
  width: 60px;
  height: 60px;
}

.moon-event-date {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.moon-event-card.is-gold .moon-event-date,
.moon-event-card.is-purple .moon-event-date {
  margin: 12px 0 0;
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: normal;
  color: rgba(255, 255, 255, 0.6);
}

.moon-event-copy {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.25;
  max-width: 188px;
}

.moon-event-card.is-gold .moon-event-copy,
.moon-event-card.is-purple .moon-event-copy {
  max-width: 205px;
  margin: 10px 0 0;
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: normal;
  color: rgba(255, 255, 255, 0.6);
}

.moon-event-card.is-gold .moon-event-copy {
  max-width: 190px;
  margin-bottom: 20px;
}

.moon-event-chip {
  display: none;
}

.moon-event-card.is-gold .moon-event-chip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 24px 0 18px 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px) saturate(108%);
  -webkit-backdrop-filter: blur(10px) saturate(108%);
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: normal;
  color: #fdf5d7;
}

@media (max-width: 767px) {
  .topbar,
  .moon-center-heading,
  .moon-hero-card,
  .moon-calendar-section,
  .moon-events-section,
  .site-footer {
    width: 100%;
  }
}
