/* 28pc.men homepage reference layout, 2026-10-29 */
html[data-site='guanlan'] body[data-page='home'] {
  --ref-accent: #e5163e;
  --ref-accent-2: #f63d63;
  --ref-accent-soft: #fff0f3;
  --ref-bg: #f5f6f8;
  --ref-surface: #ffffff;
  --ref-text: #171820;
  --ref-muted: #68707d;
  --ref-line: #e8e9ed;
  --ref-shadow: 0 12px 30px rgba(25, 28, 38, 0.07), 0 2px 8px rgba(25, 28, 38, 0.04);
  background: var(--ref-bg);
  color: var(--ref-text);
}

html[data-site='guanlan'] body[data-page='home'] .site-header {
  border-top: 3px solid var(--ref-accent);
  border-bottom: 1px solid var(--ref-line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(25, 28, 38, 0.05);
}

html[data-site='guanlan'] body[data-page='home'] .masthead,
html[data-site='guanlan'] body[data-page='home'] .nav,
html[data-site='guanlan'] body[data-page='home'] main.wrap,
html[data-site='guanlan'] body[data-page='home'] .site-footer {
  width: min(1240px, calc(100% - 40px));
  max-width: 1240px;
}

html[data-site='guanlan'] body[data-page='home'] .masthead {
  min-height: 74px;
}

html[data-site='guanlan'] body[data-page='home'] .brand {
  color: var(--ref-text);
}

html[data-site='guanlan'] body[data-page='home'] .brand .lottery-brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f22a50, #cf082e);
  color: #fff;
  box-shadow: 0 8px 20px rgba(229, 22, 62, 0.22);
}

html[data-site='guanlan'] body[data-page='home'] .nav {
  gap: 8px;
  padding-top: 0;
  padding-bottom: 12px;
}

html[data-site='guanlan'] body[data-page='home'] .nav-group > span {
  color: #9398a3;
}

html[data-site='guanlan'] body[data-page='home'] .nav a {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  color: #424650;
  background: transparent;
}

html[data-site='guanlan'] body[data-page='home'] .nav a:hover,
html[data-site='guanlan'] body[data-page='home'] .nav a[aria-current='page'] {
  color: var(--ref-accent);
  background: var(--ref-accent-soft);
}

html[data-site='guanlan'] body[data-page='home'] main.wrap {
  padding-top: 18px;
}

html[data-site='guanlan'] body[data-page='home'] .market-title {
  min-height: 0;
  margin: 0 0 10px;
}

html[data-site='guanlan'] body[data-page='home'] .market-title > a {
  color: var(--ref-accent);
}

html[data-site='guanlan'] body[data-page='home'] .market-live {
  position: relative;
  isolation: isolate;
  margin: 0 0 16px;
}

html[data-site='guanlan'] body[data-page='home'] .market-live::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(100% - 336px);
  border: 1px solid var(--ref-line);
  border-radius: 18px;
  background: var(--ref-surface);
  box-shadow: var(--ref-shadow);
  pointer-events: none;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .result.compact {
  isolation: isolate;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: auto auto auto auto;
  grid-template-areas:
    'meta clock'
    'balls clock'
    'labels clock'
    'time clock';
  gap: 0 16px;
  min-height: 300px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .result.compact::before {
  content: none !important;
  display: none !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .result-top {
  grid-area: meta;
  align-self: start;
  margin: 0;
  padding: 22px 26px 0;
  border: 0;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .live-status {
  display: inline-flex !important;
  width: auto !important;
  height: auto !important;
  min-height: 28px;
  flex: 0 0 auto !important;
  align-items: center;
  padding: 5px 11px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--ref-accent) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(229, 22, 62, 0.18);
}

html[data-site='guanlan'] body[data-page='home'] .market-live .refresh {
  color: var(--ref-accent);
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls {
  grid-area: balls;
  justify-content: center;
  align-self: center;
  gap: clamp(12px, 2.2vw, 28px);
  margin: 0;
  padding: 22px 28px 14px;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span,
html[data-site='guanlan'] body[data-page='home'] .market-live .balls > strong {
  display: grid;
  width: clamp(68px, 7.5vw, 88px) !important;
  height: clamp(68px, 7.5vw, 88px) !important;
  flex: 0 0 auto !important;
  place-items: center;
  border: 0 !important;
  border-radius: 50% !important;
  color: #fff !important;
  font-size: clamp(34px, 4vw, 50px) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: inset 0 -7px 14px rgba(123, 0, 33, 0.1), 0 10px 22px rgba(229, 22, 62, 0.16);
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span:nth-of-type(1) {
  background: linear-gradient(145deg, #ff5a79, #ef234d) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span:nth-of-type(2) {
  background: linear-gradient(145deg, #ff7e92, #f24d68) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span:nth-of-type(3) {
  background: linear-gradient(145deg, #f36b82, #df3658) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > strong {
  width: clamp(78px, 8.5vw, 98px) !important;
  height: clamp(78px, 8.5vw, 98px) !important;
  background: linear-gradient(145deg, #f41d3e, #d7072d) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > i {
  color: #2b2d33 !important;
  font-size: clamp(28px, 3vw, 40px) !important;
  font-weight: 500;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .result-bottom {
  display: contents !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live [data-labels] {
  grid-area: labels;
  justify-content: center;
  padding: 0 26px 16px;
}

html[data-site='guanlan'] body[data-page='home'] .market-live [data-labels] > * {
  border-color: transparent !important;
  background: var(--ref-accent-soft) !important;
  color: var(--ref-accent) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .countdown {
  grid-area: clock;
  display: grid !important;
  width: 100% !important;
  height: auto !important;
  align-content: center;
  justify-items: center;
  min-width: 0;
  margin: 0 !important;
  padding: 30px 24px !important;
  border: 1px solid var(--ref-line) !important;
  border-radius: 18px !important;
  background: var(--ref-surface) !important;
  color: var(--ref-muted) !important;
  text-align: center;
  box-shadow: var(--ref-shadow);
}

html[data-site='guanlan'] body[data-page='home'] .market-live .countdown::before {
  content: '◷';
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  background: var(--ref-accent-soft);
  color: var(--ref-accent);
  font-size: 25px;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .countdown b {
  display: block;
  margin-top: 12px;
  color: var(--ref-accent) !important;
  font-size: clamp(44px, 5vw, 66px) !important;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .draw-time {
  grid-area: time;
  margin: 0;
  padding: 0 26px 18px;
  color: var(--ref-muted);
  text-align: center;
}

html[data-site='guanlan'] body[data-page='home'] .market-grid {
  display: block !important;
  margin: 0 0 16px;
}

html[data-site='guanlan'] body[data-page='home'] .market-history,
html[data-site='guanlan'] body[data-page='home'] .home-interval,
html[data-site='guanlan'] body[data-page='home'] .market-aside {
  border: 1px solid var(--ref-line) !important;
  border-radius: 16px !important;
  background: var(--ref-surface) !important;
  box-shadow: var(--ref-shadow) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-history {
  padding: 0 !important;
  overflow: hidden;
}

html[data-site='guanlan'] body[data-page='home'] .market-heading {
  min-height: 54px;
  padding: 0 20px;
  border-bottom: 1px solid var(--ref-line);
}

html[data-site='guanlan'] body[data-page='home'] .market-heading::before {
  content: '历史结果';
  color: var(--ref-text);
  font-size: 18px;
  font-weight: 760;
}

html[data-site='guanlan'] body[data-page='home'] .market-heading > a {
  color: var(--ref-accent);
}

html[data-site='guanlan'] body[data-page='home'] .market-history .table-cue {
  margin: 10px 18px 0;
  color: var(--ref-muted);
}

html[data-site='guanlan'] body[data-page='home'] .market-history .table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-history .history-table {
  min-width: 850px;
}

html[data-site='guanlan'] body[data-page='home'] .market-history .history-table th {
  border-bottom: 1px solid var(--ref-line);
  background: #fafafb;
  color: #656b76;
  font-size: 12px;
  letter-spacing: 0.04em;
}

html[data-site='guanlan'] body[data-page='home'] .market-history .history-table td {
  border-bottom: 1px solid #f0f1f3;
  background: #fff;
}

html[data-site='guanlan'] body[data-page='home'] .market-history .history-table tbody tr:first-child td {
  background: #fff6f7;
}

html[data-site='guanlan'] body[data-page='home'] .ux-primary-tools a {
  border-color: #f1dbe0;
  background: #fff;
  color: #333740;
}

html[data-site='guanlan'] body[data-page='home'] .ux-primary-tools a:hover {
  border-color: var(--ref-accent);
  color: var(--ref-accent);
}

html[data-site='guanlan'] body[data-page='home'] .home-interval,
html[data-site='guanlan'] body[data-page='home'] .market-aside {
  margin-top: 16px;
}

html[data-site='guanlan'][data-theme='dark'] body[data-page='home'] {
  --ref-bg: #111217;
  --ref-surface: #191b22;
  --ref-text: #f5f5f6;
  --ref-muted: #a9aebb;
  --ref-line: #2c2f38;
  --ref-accent-soft: #35151e;
  --ref-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

html[data-site='guanlan'][data-theme='dark'] body[data-page='home'] .site-header,
html[data-site='guanlan'][data-theme='dark'] body[data-page='home'] .market-history .history-table td {
  background: #191b22;
}

html[data-site='guanlan'][data-theme='dark'] body[data-page='home'] .market-history .history-table th {
  background: #15171d;
  color: var(--ref-muted);
}

html[data-site='guanlan'][data-theme='dark'] body[data-page='home'] .market-history .history-table tbody tr:first-child td {
  background: #28161c;
}

@media (max-width: 820px) {
  html[data-site='guanlan'] body[data-page='home'] .masthead,
  html[data-site='guanlan'] body[data-page='home'] .nav,
  html[data-site='guanlan'] body[data-page='home'] main.wrap,
  html[data-site='guanlan'] body[data-page='home'] .site-footer {
    width: min(100% - 24px, 1240px);
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .result.compact {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas:
      'meta'
      'balls'
      'labels'
      'time'
      'clock';
    gap: 12px;
    min-height: 0;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .result.compact::before {
    content: none !important;
    display: none !important;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live::before {
    bottom: 172px;
    width: 100%;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .balls {
    gap: clamp(7px, 2.2vw, 12px);
    padding: 24px 10px 16px;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span,
  html[data-site='guanlan'] body[data-page='home'] .market-live .balls > strong {
    width: clamp(52px, 15vw, 66px) !important;
    height: clamp(52px, 15vw, 66px) !important;
    font-size: clamp(27px, 9vw, 36px) !important;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .balls > strong {
    width: clamp(58px, 17vw, 72px) !important;
    height: clamp(58px, 17vw, 72px) !important;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .balls > i {
    font-size: clamp(20px, 6vw, 28px) !important;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .countdown {
    min-height: 160px;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .countdown b {
    font-size: clamp(42px, 15vw, 58px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-site='guanlan'] body[data-page='home'] *,
  html[data-site='guanlan'] body[data-page='home'] *::before,
  html[data-site='guanlan'] body[data-page='home'] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Blue/teal integration for the lightweight 28pc.men refresh. */
html[data-site='guanlan'] body[data-page='home'] {
  --ref-accent: #0c9387;
  --ref-accent-2: #1677d2;
  --ref-accent-soft: #e8f7f5;
  --ref-bg: #f3f8fb;
  --ref-text: #142f46;
  --ref-muted: #657986;
  --ref-line: #d9e6ea;
}

html[data-site='guanlan'][data-theme='dark'] body[data-page='home'] {
  --ref-accent: #36c8b8;
  --ref-accent-2: #61aef1;
  --ref-accent-soft: #183b3d;
  --ref-bg: #0f171d;
  --ref-text: #eaf4f7;
  --ref-muted: #a9bdc5;
  --ref-line: #30444d;
}

html[data-site='guanlan'] body[data-page='home'] .brand .lottery-brand-mark {
  background: linear-gradient(145deg, var(--ref-accent-2), var(--ref-accent));
  box-shadow: 0 8px 20px rgb(12 147 135 / 20%);
}

html[data-site='guanlan'] body[data-page='home'] .market-live .live-status {
  background: linear-gradient(135deg, var(--ref-accent-2), var(--ref-accent)) !important;
  box-shadow: 0 6px 16px rgb(12 147 135 / 18%);
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span,
html[data-site='guanlan'] body[data-page='home'] .market-live .balls > strong {
  box-shadow: inset 0 -7px 14px rgb(4 56 77 / 8%), 0 10px 22px rgb(13 101 121 / 16%);
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span:nth-of-type(1) {
  background: linear-gradient(145deg, #42a8ff, #1677d2) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span:nth-of-type(2) {
  background: linear-gradient(145deg, #44cfbb, #0c9387) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > span:nth-of-type(3) {
  background: linear-gradient(145deg, #5eb7ff, #2183db) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > strong {
  background: linear-gradient(145deg, #20b7a8, #08776f) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-live .balls > i {
  color: var(--ref-text) !important;
}

html[data-site='guanlan'] body[data-page='home'] .market-history .history-table tbody tr:first-child td {
  background: #f1faf9;
}

html[data-site='guanlan'][data-theme='dark'] body[data-page='home'] .market-history .history-table tbody tr:first-child td {
  background: #172f31;
}

html[data-site='guanlan'] body[data-page='home'] .ux-primary-tools a {
  border-color: var(--ref-line);
}

@media (max-width: 820px) {
  html[data-site='guanlan'] body[data-page='home'] .market-live .result.compact {
    gap: 8px;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live::before {
    bottom: 76px;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .countdown {
    display: flex !important;
    min-height: 64px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px !important;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .countdown::before {
    width: 30px;
    height: 30px;
    margin: 0;
    flex: 0 0 auto;
    font-size: 18px;
  }

  html[data-site='guanlan'] body[data-page='home'] .market-live .countdown b {
    margin: 0;
    font-size: clamp(28px, 10vw, 36px) !important;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
}
