:root {
  --ink: #1e2633;
  --paper: #fff8e5;
  --cream: #f8efd1;
  --red: #d62332;
  --blue: #1546a0;
  --sky: #e6f1ff;
  --green: #158150;
  --gold: #f5bd2f;
  --line: rgba(30, 38, 51, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(214, 35, 50, 0.07) 0 10%, transparent 10% 20%),
    linear-gradient(180deg, #f7fbff 0%, var(--paper) 44%, #eef7f1 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container-fluid {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.px-3 {
  padding-right: 1rem;
  padding-left: 1rem;
}

.py-3 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.d-flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.38rem 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 0.42rem 0.75rem;
  text-decoration: none;
}

@media (min-width: 992px) {
  .px-lg-4 {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
}

.site-shell {
  min-height: 100vh;
}

.top-bar {
  background: var(--ink);
  color: #fff;
  border-bottom: 6px solid var(--red);
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background:
    conic-gradient(from 90deg, var(--red), var(--red) 25%, #fff 25%, #fff 50%, var(--blue) 50%, var(--blue) 75%, #fff 75%);
  color: var(--ink);
  font-weight: 900;
}

.brand-title {
  font-size: clamp(1.35rem, 2.4vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
}

.tagline {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.nav-pills .nav-link {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-weight: 800;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
  background: #fff;
  color: var(--blue);
}

.music-button {
  min-width: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff;
}

.music-button:hover,
.music-button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.wallchart {
  position: relative;
  margin: 28px auto;
  padding: clamp(24px, 3vw, 34px);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  border: 4px solid var(--ink);
  box-shadow: 0 14px 0 var(--blue), 0 24px 36px rgba(30, 38, 51, 0.18);
}

.wallchart::before,
.wallchart::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  z-index: 0;
  background: repeating-linear-gradient(180deg, var(--red) 0 22px, #fff 22px 44px);
}

.wallchart::before {
  left: 0;
}

.wallchart::after {
  right: 0;
}

.wallchart-inner {
  position: relative;
  z-index: 1;
}

.poster-heading {
  display: grid;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
}

@media (min-width: 860px) {
  .poster-heading {
    grid-template-columns: 1fr auto;
  }
}

.poster-heading h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(2rem, 5vw, 5.2rem);
  font-weight: 950;
  line-height: 0.92;
  text-transform: uppercase;
}

.poster-heading p {
  max-width: 780px;
  margin: 10px 0 0;
  font-weight: 700;
}

.stamp {
  width: fit-content;
  padding: 10px 14px;
  border: 3px solid var(--red);
  background: #fff;
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(2deg);
}

.groups-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.group-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fffdf5;
  box-shadow: 6px 6px 0 rgba(21, 70, 160, 0.18);
}

.group-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--blue);
  color: #fff;
}

.group-card h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 950;
}

.fixture-count {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.82rem;
}

.fixture-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.fixture {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.versus {
  align-self: center;
  padding: 0 4px;
  color: var(--red);
  font-weight: 950;
}

.team-tile {
  display: grid;
  min-width: 0;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sky);
}

.owner-photo {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.owner-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.owner-photo.missing {
  background: repeating-linear-gradient(135deg, #fff 0 8px, #ffe2e5 8px 16px);
  color: var(--red);
  font-size: 1.4rem;
  font-weight: 950;
}

.team-name {
  overflow-wrap: break-word;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.08;
}

.owner-name {
  margin-top: 3px;
  color: rgba(30, 38, 51, 0.72);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
}

.owner-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.owner-card {
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 5px 5px 0 rgba(214, 35, 50, 0.18);
}

.owner-card .photo-frame {
  display: grid;
  height: 220px;
  place-items: center;
  padding: 12px;
  background: var(--sky);
}

.owner-card .photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.owner-card .photo-frame.missing {
  color: var(--red);
  font-size: 4rem;
  font-weight: 950;
}

.owner-card-body {
  padding: 14px;
}

.owner-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 950;
  text-transform: capitalize;
}

.team-chip {
  display: inline-block;
  margin: 0 6px 8px 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.9rem;
}

.coming-soon {
  display: grid;
  min-height: 54vh;
  place-items: center;
  text-align: center;
}

.flash-text {
  color: var(--red);
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 950;
  text-transform: uppercase;
  animation: flash 0.65s steps(2, jump-none) infinite;
  text-shadow: 5px 5px 0 var(--gold), 10px 10px 0 var(--blue);
}

@keyframes flash {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0.18;
  }
}

.loading,
.error-box {
  max-width: 760px;
  margin: 48px auto;
  padding: 24px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.error-box {
  border-color: var(--red);
  color: var(--red);
}

@media (max-width: 520px) {
  .top-bar .container-fluid {
    align-items: flex-start !important;
  }

  .fixture {
    grid-template-columns: 1fr;
  }

  .groups-grid {
    grid-template-columns: 1fr;
  }

  .versus {
    justify-self: center;
  }

  .team-tile {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .owner-photo {
    width: 62px;
    height: 62px;
  }
}
