/* Weather first, prayer times below in a wide rectangular card. */
.estraha-reference-home .home-reference-widgets {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  margin-top: 2px !important;
  padding: 16px 0 18px !important;
  border-top: 1px solid var(--es-border) !important;
  border-bottom: 1px solid var(--es-border) !important;
}

.estraha-reference-home .home-reference-widgets + .reference-section-head {
  margin-top: 2px !important;
  padding-top: 2px !important;
}

.estraha-reference-home .home-weather-card {
  order: 1 !important;
  min-height: 116px !important;
  padding: 10px 14px !important;
}

.estraha-reference-home .home-prayer-card {
  order: 2 !important;
  min-height: 132px !important;
  padding: 16px 18px !important;
}

.estraha-reference-home .home-weather-card .home-reference-card-title {
  margin-bottom: 2px !important;
}

.estraha-reference-home .home-weather-card .home-reference-card-title h3 {
  font-size: 1.1rem !important;
}

.estraha-reference-home .home-weather-card .home-reference-card-title svg {
  width: 21px !important;
  height: 21px !important;
}

.estraha-reference-home .home-prayer-card .home-reference-card-title {
  margin-bottom: 10px !important;
}

.estraha-reference-home .home-weather-card .reference-weather-body {
  grid-template-columns: 58px minmax(0, 1fr) !important;
  gap: 10px !important;
}

.estraha-reference-home .home-weather-card .reference-weather-icon {
  width: 52px !important;
  height: 52px !important;
}

.estraha-reference-home .home-weather-card .reference-weather-body > div {
  gap: 0 !important;
}

.estraha-reference-home .home-weather-card .reference-weather-body strong {
  font-size: 2.25rem !important;
}

.estraha-reference-home .home-weather-card .reference-weather-body span {
  font-size: 0.9rem !important;
}

.estraha-reference-home .home-weather-card .reference-weather-body small {
  font-size: 0.78rem !important;
}

.estraha-reference-home .home-weather-card .reference-date {
  margin-top: 4px !important;
  font-size: 0.68rem !important;
  line-height: 1.2 !important;
}

.estraha-reference-home .home-prayer-card .reference-prayer-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-bottom: 8px !important;
}

.estraha-reference-home .home-prayer-card .reference-prayer-strip .stat {
  min-width: 0 !important;
  padding: 8px 3px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.estraha-reference-home .home-prayer-card .reference-prayer-strip .stat span,
.estraha-reference-home .home-prayer-card .reference-prayer-strip .stat strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.estraha-reference-home .home-prayer-card > .reference-section-link {
  justify-self: end;
}

/* Slimmer home match rows while preserving readability. */
.estraha-reference-home .reference-match-card {
  min-height: 82px !important;
}

.estraha-reference-home .reference-match-card .match-card {
  min-height: 82px !important;
  gap: 8px !important;
  padding: 12px 14px !important;
}

.estraha-reference-home .reference-match-card .team-logo {
  width: 46px !important;
  height: 46px !important;
  flex-basis: 46px !important;
}

.estraha-reference-home .reference-match-card .match-score {
  font-size: 1.45rem !important;
}

.estraha-reference-home .reference-match-card .match-teams span {
  gap: 5px !important;
  font-size: 0.88rem !important;
}

.estraha-reference-home .reference-match-card .muted {
  font-size: 0.76rem !important;
}

@media (max-width: 360px) {
  .estraha-reference-home .home-reference-widgets {
    padding-block: 14px 16px !important;
  }

  .estraha-reference-home .home-weather-card,
  .estraha-reference-home .home-prayer-card {
    padding-inline: 12px !important;
  }

  .estraha-reference-home .home-prayer-card .reference-prayer-strip {
    gap: 3px !important;
  }

  .estraha-reference-home .home-prayer-card .reference-prayer-strip .stat span {
    font-size: 0.66rem !important;
  }

  .estraha-reference-home .home-prayer-card .reference-prayer-strip .stat strong {
    font-size: 0.72rem !important;
  }

  .estraha-reference-home .reference-match-card .match-card {
    padding-inline: 10px !important;
  }
}
