/* 28pc.win homepage reference layout, 2026-10-29 */
html body[data-page='home'] {
  --ref-blue: #1566d7;
  --ref-green: #29b85b;
  --ref-purple: #8649d8;
  --ref-orange: #f08a13;
  --ref-teal: #0fa49b;
  --ref-ink: #151b2a;
  --ref-muted: #68707e;
  --ref-line: #e4e7eb;
  --ref-bg: #f6f8fa;
  --ref-card: #ffffff;
  --ref-shadow: 0 12px 30px rgba(33, 49, 73, 0.07), 0 2px 7px rgba(33, 49, 73, 0.04);
  background: var(--ref-bg);
  color: var(--ref-ink);
}

html body[data-page='home'] .site-header {
  border-bottom: 1px solid var(--ref-line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 16px rgba(33, 49, 73, 0.04);
}

html body[data-page='home'] > main {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}

html body[data-page='home'] .c28-brand-row,
html body[data-page='home'] .primary-nav,
html body[data-page='home'] .route-board,
html body[data-page='home'] .hero-grid,
html body[data-page='home'] .history-zone.page-width,
html body[data-page='home'] .module-deck.page-width,
html body[data-page='home'] .play-lane.page-width {
  width: min(1320px, calc(100% - 48px));
  max-width: 1320px;
  margin-right: auto;
  margin-left: auto;
}

html body[data-page='home'] .brand strong {
  color: var(--ref-ink);
  font-weight: 850;
}

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

html body[data-page='home'] .primary-nav a {
  min-height: 48px;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #343b49;
  background: transparent;
  font-weight: 650;
}

html body[data-page='home'] .primary-nav a:hover,
html body[data-page='home'] .primary-nav a[aria-current='page'] {
  border-bottom-color: var(--ref-blue);
  color: var(--ref-blue);
  background: transparent;
}

html body[data-page='home'] .route-board {
  margin-top: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--ref-line);
  border-radius: 14px;
  background: var(--ref-card);
  box-shadow: none;
}

html body[data-page='home'] .route-board a {
  color: #48505e;
}

html body[data-page='home'] .route-board a:hover,
html body[data-page='home'] .route-board a[aria-current='page'] {
  color: var(--ref-blue);
  background: #edf4ff;
}

html body[data-page='home'] .race-hero {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  flex: none !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0 0 18px !important;
  background: transparent !important;
  color: var(--ref-ink) !important;
  overflow: visible !important;
}

html body[data-page='home'] .race-hero .hero-art,
html body[data-page='home'] .race-hero .hero-shade {
  display: none !important;
}

html body[data-page='home'] .hero-grid {
  position: relative;
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
}

html body[data-page='home'] .live-board {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  gap: 18px;
  width: 100% !important;
  height: auto !important;
  min-height: 330px !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html body[data-page='home'] .draw-main,
html body[data-page='home'] .draw-tools {
  min-width: 0;
  margin: 0 !important;
  border: 1px solid var(--ref-line) !important;
  border-radius: 18px !important;
  background: var(--ref-card) !important;
  box-shadow: var(--ref-shadow) !important;
  transform: none !important;
}

html body[data-page='home'] .draw-main {
  display: grid;
  align-content: center;
  min-height: 330px;
  padding: 26px 30px 28px !important;
}

html body[data-page='home'] .live-meta {
  margin: 0 0 10px;
  color: var(--ref-muted) !important;
}

html body[data-page='home'] .live-state {
  color: var(--ref-blue) !important;
}

html body[data-page='home'] .live-state i {
  background: var(--ref-blue) !important;
  box-shadow: 0 0 0 5px rgba(21, 102, 215, 0.12);
}

html body[data-page='home'] .issue-line {
  color: var(--ref-muted) !important;
}

html body[data-page='home'] .records-page-title {
  margin: 0 0 18px !important;
  color: var(--ref-ink) !important;
  font-size: clamp(24px, 2.5vw, 34px) !important;
  font-weight: 820 !important;
  letter-spacing: -0.025em;
  text-shadow: none !important;
}

html body[data-page='home'] .hero-equation {
  justify-content: flex-start;
  gap: clamp(10px, 1.5vw, 22px);
  margin: 0 !important;
}

html body[data-page='home'] .hero-equation b,
html body[data-page='home'] .hero-equation em {
  display: grid;
  width: clamp(72px, 7vw, 90px) !important;
  height: clamp(72px, 7vw, 90px) !important;
  flex: 0 0 auto !important;
  place-items: center;
  border: 0 !important;
  border-radius: 50% !important;
  color: #fff !important;
  font-size: clamp(35px, 4vw, 52px) !important;
  font-style: normal;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-shadow: none !important;
  box-shadow: inset 0 -7px 14px rgba(0, 30, 80, 0.12), 0 10px 22px rgba(21, 102, 215, 0.14) !important;
}

html body[data-page='home'] .hero-equation b:nth-of-type(1) {
  background: linear-gradient(145deg, #2c82eb, #1260d3) !important;
}

html body[data-page='home'] .hero-equation b:nth-of-type(2) {
  background: linear-gradient(145deg, #40c96b, #20a94d) !important;
}

html body[data-page='home'] .hero-equation b:nth-of-type(3) {
  background: linear-gradient(145deg, #9b5de5, #7634cc) !important;
}

html body[data-page='home'] .hero-equation em {
  width: clamp(82px, 8vw, 102px) !important;
  height: clamp(82px, 8vw, 102px) !important;
  background: linear-gradient(145deg, #ffa122, #e87508) !important;
  box-shadow: inset 0 -7px 14px rgba(95, 42, 0, 0.12), 0 10px 22px rgba(240, 138, 19, 0.18) !important;
}

html body[data-page='home'] .hero-equation i {
  color: #4d5561 !important;
  font-size: clamp(27px, 3vw, 40px) !important;
  font-style: normal;
  font-weight: 500;
  text-shadow: none !important;
}

html body[data-page='home'] .result-tags {
  gap: 8px;
  margin: 22px 0 0 !important;
}

html body[data-page='home'] .result-tag {
  min-height: 36px;
  padding: 7px 15px !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 730;
  box-shadow: none !important;
}

html body[data-page='home'] .result-tag:nth-child(4n + 1) {
  background: var(--ref-blue) !important;
}

html body[data-page='home'] .result-tag:nth-child(4n + 2) {
  background: var(--ref-green) !important;
}

html body[data-page='home'] .result-tag:nth-child(4n + 3) {
  background: var(--ref-purple) !important;
}

html body[data-page='home'] .result-tag:nth-child(4n) {
  background: var(--ref-orange) !important;
}

html body[data-page='home'][data-draw-state] .live-board .draw-main .hero-equation > b,
html body[data-page='home'][data-draw-state] .live-board .draw-main .hero-equation > em {
  color: #fff !important;
}

html body[data-page='home'][data-draw-state] .live-board .draw-main .hero-equation > b:nth-of-type(1) {
  background: linear-gradient(145deg, #2c82eb, #1260d3) !important;
}

html body[data-page='home'][data-draw-state] .live-board .draw-main .hero-equation > b:nth-of-type(2) {
  background: linear-gradient(145deg, #40c96b, #20a94d) !important;
}

html body[data-page='home'][data-draw-state] .live-board .draw-main .hero-equation > b:nth-of-type(3) {
  background: linear-gradient(145deg, #9b5de5, #7634cc) !important;
}

html body[data-page='home'][data-draw-state] .live-board .draw-main .hero-equation > em {
  background: linear-gradient(145deg, #ffa122, #e87508) !important;
}

html body[data-page='home'][data-draw-state] .live-board .result-tags > .result-tag:nth-child(4n + 1) {
  background: var(--ref-blue) !important;
  color: #fff !important;
}

html body[data-page='home'][data-draw-state] .live-board .result-tags > .result-tag:nth-child(4n + 2) {
  background: var(--ref-green) !important;
  color: #fff !important;
}

html body[data-page='home'][data-draw-state] .live-board .result-tags > .result-tag:nth-child(4n + 3) {
  background: var(--ref-purple) !important;
  color: #fff !important;
}

html body[data-page='home'][data-draw-state] .live-board .result-tags > .result-tag:nth-child(4n) {
  background: var(--ref-orange) !important;
  color: #fff !important;
}

html body[data-page='home'] .draw-tools {
  display: grid !important;
  align-content: center;
  min-height: 330px;
  padding: 30px 28px !important;
  color: var(--ref-ink) !important;
}

html body[data-page='home'] .hero-timing {
  display: grid;
  justify-items: center;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: center;
  box-shadow: none !important;
}

html body[data-page='home'][data-draw-state] .live-board .draw-tools .hero-timing {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body[data-page='home'][data-draw-state] .live-board .draw-tools .hero-timing strong[data-countdown] {
  color: var(--ref-teal) !important;
}

html body[data-page='home'] .hero-timing > span {
  color: var(--ref-ink) !important;
  font-size: 19px;
  font-weight: 760;
}

html body[data-page='home'] .hero-timing > span svg {
  color: var(--ref-teal) !important;
}

html body[data-page='home'] .hero-timing strong[data-countdown] {
  margin: 22px 0 18px;
  color: var(--ref-teal) !important;
  font-size: clamp(47px, 5vw, 70px) !important;
  font-variant-numeric: tabular-nums;
  font-weight: 740 !important;
  letter-spacing: 0.035em;
  line-height: 1 !important;
  text-shadow: none !important;
}

html body[data-page='home'] .hero-timing small {
  color: var(--ref-muted) !important;
}

html body[data-page='home'] .hero-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ref-line);
}

html body[data-page='home'] .hero-actions .primary-button {
  border-color: var(--ref-blue) !important;
  background: var(--ref-blue) !important;
  color: #fff !important;
  box-shadow: none !important;
}

html body[data-page='home'] .hero-actions .secondary-button {
  border-color: #add6d3 !important;
  background: transparent !important;
  color: var(--ref-teal) !important;
  box-shadow: none !important;
}

html body[data-page='home'] .history-zone {
  margin-top: 0 !important;
  margin-bottom: 18px;
  padding: 0 !important;
  border: 1px solid var(--ref-line) !important;
  border-radius: 18px !important;
  background: var(--ref-card) !important;
  box-shadow: var(--ref-shadow) !important;
  overflow: hidden;
}

html body[data-page='home'] .history-zone > header.section-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 72px !important;
  margin: 0;
  padding: 14px 22px !important;
  border-bottom: 1px solid var(--ref-line);
}

html body[data-page='home'] .history-zone > header.section-heading > div {
  display: block !important;
  width: auto !important;
  height: auto !important;
  flex: 1 1 auto !important;
}

html body[data-page='home'] .history-zone > header.section-heading #history-title,
html body[data-page='home'] .history-zone > header.section-heading p {
  display: block !important;
}

html body[data-page='home'] .history-zone > .section-heading h2 {
  color: var(--ref-ink);
  font-size: 22px;
}

html body[data-page='home'] .history-zone > .section-heading p {
  color: var(--ref-muted);
}

html body[data-page='home'] .history-zone > .section-heading > a {
  color: var(--ref-blue);
}

html body[data-page='home'] .history-zone > .module-status,
html body[data-page='home'] .history-window-controls {
  margin-right: 20px;
  margin-left: 20px;
}

html body[data-page='home'] .history-window-controls button[aria-pressed='true'] {
  border-color: var(--ref-blue) !important;
  background: #edf4ff !important;
  color: var(--ref-blue) !important;
}

html body[data-page='home'] .history-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
  padding: 0 20px 20px;
}

html body[data-page='home'] .data-surface,
html body[data-page='home'] .trend-panel {
  border: 1px solid var(--ref-line) !important;
  border-radius: 13px !important;
  background: var(--ref-card) !important;
  box-shadow: none !important;
}

html body[data-page='home'] .data-surface {
  overflow: hidden;
}

html body[data-page='home'] .table-scroll {
  max-height: 720px;
  overflow: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
}

html body[data-page='home'] .data-surface table {
  min-width: 900px;
}

html body[data-page='home'] .data-surface th {
  border-bottom: 1px solid var(--ref-line);
  background: #f8fafc !important;
  color: #687180 !important;
  font-size: 12px;
  letter-spacing: 0.04em;
}

html body[data-page='home'] .data-surface td {
  border-bottom: 1px solid #edf0f3;
  background: #fff !important;
  color: var(--ref-ink) !important;
}

html body[data-page='home'] .data-surface tbody tr:first-child td {
  background: #f1f6ff !important;
}

html body[data-page='home'] .pager {
  padding: 14px 18px;
  border-top: 1px solid var(--ref-line);
}

html body[data-page='home'] .trend-panel {
  max-width: none !important;
  padding: 20px !important;
}

html body[data-page='home'] .trend-panel svg[data-trend-chart] {
  max-height: 260px;
}

html body[data-page='home'] .records-workbench,
html body[data-page='home'] .module-panel,
html body[data-page='home'] .play-lane {
  border-color: var(--ref-line) !important;
  background: var(--ref-card) !important;
  box-shadow: var(--ref-shadow) !important;
}

html[data-theme='dark'] body[data-page='home'] {
  --ref-ink: #f2f5f8;
  --ref-muted: #a7b0bc;
  --ref-line: #2d3541;
  --ref-bg: #11151b;
  --ref-card: #191f27;
  --ref-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

html[data-theme='dark'] body[data-page='home'] .site-header {
  background: rgba(25, 31, 39, 0.96);
}

html[data-theme='dark'] body[data-page='home'] .primary-nav a {
  color: #dce3eb;
}

html[data-theme='dark'] body[data-page='home'] .route-board a {
  color: #c8d0da;
}

html[data-theme='dark'] body[data-page='home'] .route-board a:hover,
html[data-theme='dark'] body[data-page='home'] .route-board a[aria-current='page'],
html[data-theme='dark'] body[data-page='home'] .history-window-controls button[aria-pressed='true'] {
  background: #172a45 !important;
}

html[data-theme='dark'] body[data-page='home'] .data-surface th {
  background: #151b22 !important;
}

html[data-theme='dark'] body[data-page='home'] .data-surface td {
  background: var(--ref-card) !important;
}

html[data-theme='dark'] body[data-page='home'] .data-surface tbody tr:first-child td {
  background: #182b45 !important;
}

@media (max-width: 900px) {
  html body[data-page='home'] .c28-brand-row,
  html body[data-page='home'] .primary-nav,
  html body[data-page='home'] .route-board,
  html body[data-page='home'] .hero-grid,
  html body[data-page='home'] .history-zone.page-width,
  html body[data-page='home'] .module-deck.page-width,
  html body[data-page='home'] .play-lane.page-width {
    width: min(100% - 28px, 1320px);
  }

  html body[data-page='home'] .live-board {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0 !important;
  }

  html body[data-page='home'] .draw-main,
  html body[data-page='home'] .draw-tools {
    min-height: 0;
  }

  html body[data-page='home'] .draw-tools {
    min-height: 230px;
  }
}

@media (max-width: 620px) {
  html body[data-page='home'] .draw-main {
    padding: 22px 16px 24px !important;
  }

  html body[data-page='home'] .draw-main > .live-meta,
  html body[data-page='home'] .draw-main > .records-page-title,
  html body[data-page='home'] .draw-main > .hero-equation,
  html body[data-page='home'] .draw-main > .result-tags {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    box-sizing: border-box;
  }

  html body[data-page='home'] .hero-equation {
    justify-content: center;
    gap: clamp(3px, 1vw, 5px);
  }

  html body[data-page='home'] .hero-equation b,
  html body[data-page='home'] .hero-equation em {
    width: clamp(44px, 12vw, 50px) !important;
    height: clamp(44px, 12vw, 50px) !important;
    font-size: clamp(23px, 7vw, 30px) !important;
  }

  html body[data-page='home'] .hero-equation em {
    width: clamp(50px, 14vw, 58px) !important;
    height: clamp(50px, 14vw, 58px) !important;
  }

  html body[data-page='home'] .hero-equation i {
    font-size: clamp(17px, 5vw, 22px) !important;
  }

  html body[data-page='home'] .hero-equation .c28-draw-chime-toggle {
    flex: 0 0 30px !important;
  }

  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .live-meta,
  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .records-page-title,
  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .hero-equation,
  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .result-tags {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .hero-equation {
    justify-content: center !important;
    gap: clamp(3px, 1vw, 5px) !important;
  }

  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .hero-equation > b {
    width: clamp(44px, 12vw, 50px) !important;
    height: clamp(44px, 12vw, 50px) !important;
    font-size: clamp(23px, 7vw, 30px) !important;
  }

  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .hero-equation > em {
    width: clamp(50px, 14vw, 58px) !important;
    height: clamp(50px, 14vw, 58px) !important;
    font-size: clamp(23px, 7vw, 30px) !important;
  }

  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .hero-equation > i {
    font-size: clamp(17px, 5vw, 22px) !important;
  }

  html body[data-page='home'][data-draw-state] .race-hero .live-board .draw-main > .hero-equation > .c28-draw-chime-toggle {
    flex: 0 0 30px !important;
  }

  html body[data-page='home'] .hero-timing strong[data-countdown] {
    font-size: clamp(43px, 14vw, 60px) !important;
  }

  html body[data-page='home'] .history-layout {
    padding: 0 10px 12px;
  }

  html body[data-page='home'] .table-scroll {
    max-height: 580px;
  }
}

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