/* 28pc.win result-first homepage polish, 2026-10-29 */
html body[data-page='home'] .site-header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: 24px !important;
  min-height: 78px !important;
  padding: 0 max(24px, calc((100vw - 1320px) / 2)) !important;
}

html body[data-page='home'] .c28-brand-row {
  display: contents !important;
}

html body[data-page='home'] .c28-brand-row > .brand {
  grid-column: 1;
  grid-row: 1;
}

html body[data-page='home'] .c28-brand-row > .header-actions {
  grid-column: 3;
  grid-row: 1;
}

html body[data-page='home'] .primary-nav {
  grid-column: 2;
  grid-row: 1;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  justify-content: center !important;
  gap: clamp(10px, 2.1vw, 30px) !important;
}

html body[data-page='home'] .primary-nav a {
  min-height: 78px;
  white-space: nowrap;
}

@media (min-width: 1101px) {
  html body[data-page='home'] .site-header {
    grid-template-columns: minmax(150px, auto) minmax(180px, 220px) minmax(0, 1fr) auto !important;
    gap: 18px !important;
    min-height: 86px !important;
    align-items: center !important;
  }

  html body[data-page='home'] .c28-brand-row > .brand {
    grid-column: 1;
  }

  html body[data-page='home'] .site-header > .c28-ads {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    width: 100% !important;
    max-width: 220px !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
  }

  html body[data-page='home'] .site-header > .c28-ads .c28-label {
    display: none !important;
  }

  html body[data-page='home'] .site-header > .c28-ads .c28-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
  }

  html body[data-page='home'] .site-header > .c28-ads .c28-card {
    min-height: 52px !important;
    height: 52px !important;
    border-radius: 12px !important;
  }

  html body[data-page='home'] .site-header > .c28-ads .c28-card > span {
    padding: 7px 12px !important;
  }

  html body[data-page='home'] .primary-nav {
    grid-column: 3;
    grid-row: 1;
    height: 86px !important;
    padding: 0 !important;
  }

  html body[data-page='home'] .primary-nav a {
    min-height: 86px;
    padding-inline: clamp(7px, 0.8vw, 12px) !important;
  }

  html body[data-page='home'] .c28-brand-row > .header-actions {
    grid-column: 4;
  }
}

html body[data-page='home'] .route-board {
  display: grid !important;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) !important;
  margin-top: 16px;
  overflow: hidden;
}

html body[data-page='home'] .route-board .route-band {
  display: grid !important;
  min-width: 0;
}

html body[data-page='home'] .route-board .route-band-primary {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

html body[data-page='home'] .route-board .route-band-tools {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html body[data-page='home'] .route-board a {
  min-height: 56px !important;
  border-bottom: 0 !important;
}

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

html body[data-page='home'] .draw-main,
html body[data-page='home'] .draw-tools {
  min-height: 350px;
  border-radius: 18px !important;
}

html body[data-page='home'] .draw-main {
  padding: 28px 34px 30px !important;
}

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

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

html body[data-page='home'] .history-zone {
  border-radius: 18px !important;
}

html body[data-page='home'] .history-zone > header.section-heading {
  min-height: 74px !important;
  padding: 15px 24px !important;
}

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

html body[data-page='home'] .data-surface {
  border-radius: 12px !important;
}

html body[data-page='home'] .data-surface th {
  height: 42px;
  background: #f5f7fa !important;
  color: #586171 !important;
}

html body[data-page='home'] .data-surface td {
  height: 44px;
  padding-top: 8px;
  padding-bottom: 8px;
}

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

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

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

@media (max-width: 1100px) {
  html body[data-page='home'] .site-header {
    gap: 14px !important;
    padding-inline: 18px !important;
  }

  html body[data-page='home'] .primary-nav {
    gap: 12px !important;
  }

  html body[data-page='home'] .primary-nav a {
    font-size: 13px;
  }

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

  html body[data-page='home'] .route-board .route-band {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  html body[data-page='home'] .site-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-height: 68px !important;
  }

  html body[data-page='home'] .c28-brand-row {
    display: flex !important;
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  html body[data-page='home'] .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100% !important;
    justify-content: flex-start !important;
  }

  html body[data-page='home'] .primary-nav a {
    min-height: 48px;
  }

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

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

@media (max-width: 620px) {
  html body[data-page='home'] .site-header {
    padding-inline: 12px !important;
  }

  html body[data-page='home'] .route-board {
    display: none !important;
  }

  html body[data-page='home'] .draw-main {
    padding: 22px 16px 24px !important;
  }

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

