:root {
  color-scheme: light;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #242323;
  background: #f7f6f3;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #2e8b57;
  --deep-green: #174e34;
  --muted: #8c8a83;
  --line: #e8e5de;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: #f7f6f3;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  height: 78px;
  padding: 0 max(6.5vw, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #efede8;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: 150px;
  height: 56px;
  object-fit: contain;
}

main {
  width: 100%;
  margin: 0 auto;
}

.page-content {
  width: min(1050px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: #9eaa9e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.visually-hidden {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  position: absolute;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.hero-section {
  margin: 0 0 14px;
}

.hero-carousel {
  width: 100%;
  aspect-ratio: 3.2 / 1;
  min-height: 110px;
  max-height: 330px;
  overflow: hidden;
  position: relative;
  border-radius: 0;
  background: #e9eee9;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-carousel-status {
  z-index: 1;
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(100deg, #e9eee9 25%, #f2f4f1 45%, #e9eee9 65%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.hero-slide--error {
  display: grid;
  place-items: center;
  color: #77756e;
  background: #e9eee9;
  font-size: 12px;
}

.hero-carousel-status[hidden] {
  display: none;
}

.hero-indicators {
  z-index: 2;
  position: absolute;
  right: 58px;
  bottom: 15px;
  left: 58px;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.hero-indicator {
  width: 17px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #ffffff9c;
  cursor: pointer;
}

.hero-indicator.is-active {
  width: 25px;
  background: #fff;
}

.hero-indicator:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hero-announcement {
  min-height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid #e8e5de;
  border-right: 0;
  border-left: 0;
  border-top: 0;
  border-radius: 0;
  color: #68665f;
  background: #fff;
}

.hero-announcement-icon {
  flex: 0 0 auto;
  font-size: 14px;
}

.hero-announcement-window {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.hero-announcement-track {
  width: max-content;
  display: flex;
  animation: announcement-scroll 35s linear infinite;
}

.hero-announcement-track:not(.has-content)::before {
  width: clamp(120px, 42vw, 260px);
  height: 8px;
  margin: 4px 48px 4px 0;
  display: block;
  border-radius: 5px;
  background: linear-gradient(100deg, #eeece6 25%, #f7f6f3 45%, #eeece6 65%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  content: "";
}

.hero-announcement-track span {
  padding-right: 48px;
  color: #68665f;
  font-size: 11px;
  white-space: nowrap;
}

.hero-announcement-window:hover .hero-announcement-track {
  animation-play-state: paused;
}

@keyframes announcement-scroll {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }

  .hero-announcement-window {
    overflow-x: auto;
  }

  .hero-announcement-track {
    animation: none;
  }

  .hero-announcement-track span[aria-hidden="true"] {
    display: none;
  }
}

.results-section {
  margin-bottom: 12px;
  scroll-margin-top: 25px;
}

.section-heading {
  margin-bottom: 21px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.section-heading .eyebrow {
  margin-bottom: 5px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.lottery-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #e6e3dc;
  border-radius: 9px;
  background: #fff;
}

.beijing-time {
  margin: 0 0 9px;
  display: flex;
  justify-content: center;
  gap: 7px;
  color: #8d8a82;
  font-size: 11px;
}

.beijing-time time {
  color: #6d6a63;
  font-variant-numeric: tabular-nums;
}

.lottery-tab {
  min-height: 53px;
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 4px;
  border: 0;
  border-right: 1px solid #eeece6;
  color: #77756e;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.18s ease;
}

.lottery-tab:last-child {
  border-right: 0;
}

.tab-title,
.tab-next-draw {
  display: block;
}

.tab-title {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tab-next-draw {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
}

.tab-next-draw.is-skeleton::after {
  width: 72%;
  height: 7px;
  margin: 2px auto 0;
  display: block;
  border-radius: 4px;
  background: linear-gradient(100deg, #eeece6 25%, #f7f6f3 45%, #eeece6 65%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  content: "";
}

.lottery-tab.is-selected .tab-next-draw.is-skeleton::after {
  background: linear-gradient(100deg, #ffffff40 25%, #ffffff80 45%, #ffffff40 65%);
  background-size: 200% 100%;
}

.lottery-tab.is-selected {
  color: #fff;
  background: var(--green);
}

.result-card {
  padding: 14px 20px 13px;
  border: 1px solid #6fa77b;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px #37331e08;
}

.result-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-card-top {
  min-height: 30px;
  padding-bottom: 7px;
  border-bottom: 1px solid #f0eee8;
}

.current-issue,
.countdown-block {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.result-label {
  color: #98958c;
  font-size: 12px;
}

.issue-number {
  color: #d84c47;
  font-size: 19px;
  letter-spacing: 0.025em;
}

.countdown-block {
  color: #d84c47;
  font-size: 12px;
  font-weight: 750;
}

.countdown-block strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.history-link {
  padding: 5px 9px;
  border-radius: 5px;
  color: #fff;
  background: #e87972;
  font-size: 10px;
  white-space: nowrap;
  font-weight: 600;
}

.numbers-area {
  min-height: 102px;
  padding: 17px 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 2.2vw, 22px);
}

.result-skeleton-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.result-skeleton-ball {
  width: clamp(44px, 6vw, 57px);
  aspect-ratio: 1;
  display: block;
  border-radius: 50%;
  background: linear-gradient(100deg, #eeece6 25%, #f7f6f3 45%, #eeece6 65%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.result-skeleton-item::after {
  width: 24px;
  height: 7px;
  border-radius: 4px;
  background: #eeece6;
  content: "";
}

.result-skeleton-separator {
  width: 12px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: #eeece6;
}

.skeleton-text {
  width: 128px;
  height: 9px;
  display: inline-block;
  overflow: hidden;
  border-radius: 5px;
  color: transparent;
  background: linear-gradient(100deg, #eeece6 25%, #f7f6f3 45%, #eeece6 65%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  vertical-align: middle;
}

.next-draw-info {
  margin: 0;
  color: #242323;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ball {
  position: relative;
  width: clamp(44px, 6vw, 57px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #262626;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ball-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.ball-number {
  position: relative;
  z-index: 1;
}

.ball-wrapper {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.ball-info {
  min-height: 14px;
  color: #35342f;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.ball--red {
  color: #212121;
}

.ball--blue {
  color: #212121;
}

.ball--green {
  color: #212121;
}

.ball--special {
  outline: 2px solid #e6c876;
  outline-offset: 1px;
}

.ball-separator {
  color: #aaa69b;
  font-size: 20px;
  font-weight: 700;
}

.empty-text {
  color: #96938b;
  font-size: 12px;
}

.error-message {
  margin: 12px 0 0;
  padding: 11px 14px;
  border: 1px solid #f0d7d2;
  border-radius: 8px;
  color: #a64e43;
  background: #fff8f6;
  font-size: 12px;
}

.play-method-section {
  margin-top: 0;
  margin-bottom: 28px;
}

.play-method-status {
  margin: 0;
  color: #96938b;
  font-size: 12px;
}

.play-method-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 14px;
  align-items: start;
}

.play-card-skeleton {
  min-height: 132px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 13px;
  overflow: hidden;
  border: 1px solid #e8e5de;
  border-radius: 10px;
  background: #fff;
}

.play-card-skeleton-heading,
.play-card-skeleton-line {
  height: 10px;
  display: block;
  border-radius: 5px;
  background: linear-gradient(100deg, #eeece6 25%, #f7f6f3 45%, #eeece6 65%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.play-card-skeleton-heading {
  width: 48%;
  height: 15px;
  margin-bottom: 4px;
}

.play-card-skeleton-line:nth-of-type(3) {
  width: 78%;
}

.play-card-skeleton-line:nth-of-type(4) {
  width: 58%;
}

.play-card {
  overflow: hidden;
  border: 1px solid #6fa77b;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 16px #37331e08;
}

.play-reference-card,
.sixiang-card {
  grid-column: 1 / -1;
}

.sixiang-card {
  width: min(100%, 640px);
  justify-self: center;
}

.sixiang-image-stage {
  position: relative;
  aspect-ratio: 1334 / 1179;
  overflow: hidden;
  isolation: isolate;
}

.sixiang-background-layer,
.sixiang-frame-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.sixiang-background-layer {
  z-index: 0;
  inset: auto;
  top: 19%;
  left: 3%;
  width: 94%;
  height: 78%;
  object-fit: contain;
  object-position: center;
}

.sixiang-frame-layer {
  z-index: 2;
  object-fit: contain;
  pointer-events: none;
}

.sixiang-issue,
.sixiang-couplet,
.sixiang-previous-result {
  z-index: 3;
  position: absolute;
  font-family: "STXingkai", "华文行楷", "KaiTi", "楷体", serif;
  font-weight: 900;
  text-align: center;
  -webkit-text-stroke: 0.35px #5b1008;
  text-shadow: 1px 2px 0 #5b1008, 0 0 5px #310600;
}

.sixiang-issue {
  top: 19.5%;
  left: 20%;
  width: 60%;
  height: 7%;
  display: grid;
  place-items: center;
  color: #ffe73b;
  font-size: clamp(19px, 5.5vw, 34px);
  line-height: 1;
}

.sixiang-couplet {
  top: 32%;
  width: 8.5%;
  height: 52%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffe13c;
  font-size: clamp(18px, 5.2vw, 28px);
  line-height: 1.45;
  writing-mode: vertical-rl;
  overflow-wrap: anywhere;
}

.sixiang-couplet--left {
  left: 4.5%;
}

.sixiang-couplet--right {
  right: 4.5%;
}

.sixiang-previous-result {
  top: 89.2%;
  left: 39%;
  width: 51%;
  height: 5.3%;
  display: grid;
  place-items: center;
  color: #a82026;
  font-family: "Arial", "Microsoft YaHei", sans-serif;
  font-size: clamp(12px, 3.2vw, 20px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: none;
  -webkit-text-stroke: 0;
  white-space: nowrap;
}

.play-card-header {
  padding: 9px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  background: var(--green);
}

.play-card-header h3 {
  margin: 0;
  font-size: 14px;
}

.play-card-issue {
  flex: none;
  font-size: 12px;
  opacity: 0.9;
}

.play-card > .play-fields {
  padding: 10px 14px 12px;
}

.pmjd-image-stage {
  position: relative;
  line-height: 0;
}

.gpjd-image-stage {
  position: relative;
  line-height: 0;
}

.zgxj-image-stage {
  position: relative;
  line-height: 0;
}

.play-method-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #fff;
}

.pmjd-overlay {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 3%;
  color: #00f58a;
  font-size: clamp(8px, 2.2vw, 15px);
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 1px 2px #001c0b, 0 0 2px #001c0b;
  white-space: nowrap;
}

.pmjd-overlay--four-codes {
  top: 29%;
  left: 50.5%;
  width: 30.5%;
  justify-content: space-between;
  gap: 0;
}

.pmjd-overlay--two-zodiacs {
  top: 44%;
  left: 55.5%;
  width: 17.5%;
  justify-content: space-between;
  gap: 0;
}

.pmjd-overlay--head {
  top: 62%;
  left: 55%;
}

.pmjd-overlay--tail {
  top: 62%;
  left: 77%;
}

.pmjd-lucky-numbers {
  position: absolute;
  top: 82%;
  left: 48%;
  width: 44.5%;
  height: 8%;
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  align-content: space-between;
}

.pmjd-overlay--lucky-row {
  position: static;
  justify-content: space-between;
  gap: 1%;
  font-size: clamp(8px, 1.8vw, 12px);
}

.gpjd-overlay {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #861d1d;
  font-size: clamp(9px, 1.8vw, 16px);
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 1px 1px #fff8e8;
  white-space: nowrap;
}

.gpjd-overlay--nine-zodiacs {
  top: 43%;
  left: 55%;
  width: 42%;
  height: 7%;
  justify-content: center;
  gap: 0.12em;
  font-size: clamp(11px, 2.8vw, 18px);
}

.gpjd-overlay--one-zodiac {
  top: 62%;
  left: 69%;
  width: 11.5%;
  height: 9%;
  font-size: clamp(12px, 2.6vw, 16px);
}

.gpjd-overlay--one-wei {
  top: 82.4%;
  left: 69%;
  width: 11.5%;
  height: 9%;
  font-size: clamp(12px, 2.6vw, 16px);
}

.zgxj-overlay {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #861d1d;
  font-size: clamp(12px, 2.6vw, 20px);
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 1px 1px #fff8e8;
  white-space: nowrap;
}

.zgxj-overlay--recommend-zodiacs {
  top: 63%;
  left: 22%;
  width: 72%;
  height: 8%;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  justify-items: center;
}

.zgxj-overlay--forbidden-zodiac {
  top: 87.5%;
  left: 70%;
  width: 16%;
  height: 9.5%;
  color: #a42121;
  font-size: clamp(18px, 3.2vw, 26px);
}

.play-fields {
  margin: 0;
  display: grid;
  gap: 7px;
}

.play-fields-title {
  color: var(--deep-green);
  font-size: 12px;
  font-weight: 700;
}

.play-field {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
  align-items: start;
}

.play-field dt {
  padding-top: 3px;
  color: #6d6a62;
  font-size: 12px;
}

.play-field dd {
  min-width: 0;
  margin: 0;
}

.play-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.play-chip {
  min-width: 24px;
  padding: 2px 6px;
  display: inline-block;
  border-radius: 4px;
  color: #3b3a35;
  background: #f2f1ec;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.play-chip--red {
  color: #fff;
  background: #d9443a;
}

.play-chip--blue {
  color: #fff;
  background: #2f6fd0;
}

.play-chip--green {
  color: #fff;
  background: #2e9a5a;
}

.play-groups {
  display: grid;
  gap: 6px;
}

.play-groups > .play-fields {
  padding: 7px 9px;
  border-radius: 6px;
  background: #f8f8f5;
}

.play-groups > .play-chips {
  padding: 4px 0;
}

.site-footer {
  min-height: 65px;
  padding: 16px max(6.5vw, calc((100vw - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eae8e2;
  color: #98958c;
  background: #fff;
  font-size: 10px;
}

@keyframes skeleton-shimmer {
  to {
    background-position-x: -200%;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: 65px;
    padding: 0 19px;
  }

  .hero-section {
    margin: 0 0 14px;
  }

  .hero-carousel {
    aspect-ratio: 3 / 1;
    min-height: 100px;
  }

  .hero-indicators {
    bottom: 10px;
  }

  .hero-announcement {
    min-height: 34px;
    padding: 0 9px;
    gap: 7px;
  }

  .hero-announcement-track span {
    font-size: 10px;
  }

  .section-heading h2 {
    font-size: 19px;
  }

  .result-card {
    padding: 13px 10px 12px;
  }

  .result-card-top {
    gap: 5px;
  }

  .numbers-area {
    gap: 0;
    justify-content: space-between;
    padding: 16px 0 12px;
  }

  .numbers-area .ball {
    width: clamp(30px, 9.5vw, 36px);
    font-size: clamp(11px, 3.8vw, 14px);
  }

  .numbers-area .ball-separator {
    font-size: 16px;
    font-weight: 700;
    transform: translateY(-8px);
  }

  .numbers-area .ball-info {
    font-size: 9px;
  }

  .result-skeleton-ball {
    width: clamp(30px, 9.5vw, 36px);
  }

  .result-skeleton-item::after {
    width: 18px;
    height: 6px;
  }

  .result-skeleton-separator {
    width: 8px;
  }

  .issue-number {
    font-size: 17px;
  }

  .countdown-block {
    gap: 3px;
    font-size: 10px;
  }

  .countdown-block strong {
    font-size: 11px;
  }

  .history-link {
    padding: 4px 6px;
    font-size: 9px;
  }

  .lottery-tab {
    min-width: 0;
    padding: 7px 3px;
    font-size: 11px;
  }

  .tab-title {
    font-size: 12px;
  }

  .tab-next-draw {
    font-size: 10px;
  }

  .ball-separator {
    font-size: 12px;
  }

  .site-footer {
    padding: 16px 20px;
    gap: 12px;
  }
}

@media (max-width: 390px) {
  .brand-logo {
    width: 130px;
    height: 48px;
  }

  .beijing-time {
    font-size: 10px;
  }

  .result-card-top {
    gap: 3px;
  }

  .current-issue,
  .countdown-block {
    gap: 3px;
  }

  .countdown-block {
    font-size: 9px;
  }

  .countdown-block strong {
    font-size: 10px;
  }

  .lottery-tab {
    padding-right: 1px;
    padding-left: 1px;
    font-size: 10px;
  }

  .tab-title {
    font-size: 10px;
  }

  .tab-next-draw {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
