:root {
  --game-mark-ink: #092b20;
  --game-mark-paper: #f4f0df;
  --game-mark-acid: #d8ff4f;
  --game-mark-orange: #ff6846;
}

.game-mark {
  --mark-bg: var(--game-mark-ink);
  --mark-color: var(--game-mark-paper);
  --mark-accent: var(--game-mark-acid);
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 2.65rem;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  color: var(--mark-color);
  background: var(--mark-bg);
  border: 1px solid color-mix(in srgb, var(--mark-color) 50%, transparent);
  border-radius: .45rem;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mark-accent) 22%, transparent);
  font: 800 .62rem/1 "IBM Plex Mono", monospace;
  letter-spacing: -.04em;
  isolation: isolate;
}

.game-mark::before {
  position: absolute;
  z-index: -1;
  width: 140%;
  height: .55rem;
  background: var(--mark-accent);
  content: "";
  opacity: .88;
  transform: rotate(-42deg);
}

.game-mark--career { --mark-bg: #092b20; --mark-color: #f4f0df; --mark-accent: #ff6846; font-size: .5rem; }
.game-mark--connections { --mark-bg: #092b20; --mark-color: #d8ff4f; --mark-accent: #ff6846; }
.game-mark--position { --mark-bg: #f4f0df; --mark-color: #092b20; --mark-accent: #7bbf44; }
.game-mark--pl,
.game-mark--laliga,
.game-mark--seriea,
.game-mark--bundesliga,
.game-mark--ligue1 {
  width: 2.75rem;
  color: var(--mark-color);
  border: 2px solid #fff8e8;
  border-radius: 48% 48% 38% 38% / 28% 28% 62% 62%;
  box-shadow: 0 3px 0 #061c16, 0 7px 14px rgba(6, 28, 22, .18);
  font-size: .55rem;
  letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
  transform: rotate(-2deg);
}

.game-mark--pl::before,
.game-mark--laliga::before,
.game-mark--seriea::before,
.game-mark--bundesliga::before,
.game-mark--ligue1::before {
  width: 100%;
  height: 100%;
  background: var(--league-pattern);
  opacity: 1;
  transform: none;
}

.game-mark--pl::after,
.game-mark--laliga::after,
.game-mark--seriea::after,
.game-mark--bundesliga::after,
.game-mark--ligue1::after {
  position: absolute;
  right: -.08rem;
  bottom: -.08rem;
  width: .82rem;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 50%, #071d18 0 19%, transparent 20%),
    conic-gradient(from 18deg, #071d18 0 11%, #fff8e8 12% 27%, #071d18 28% 38%, #fff8e8 39% 57%, #071d18 58% 68%, #fff8e8 69% 86%, #071d18 87% 100%);
  border: 2px solid #fff8e8;
  border-radius: 50%;
  box-shadow: 0 2px 0 #071d18;
  content: "";
  transform: rotate(10deg);
}

.game-mark--pl {
  --mark-bg: #f7f1df;
  --mark-color: #183552;
  --league-pattern:
    linear-gradient(90deg, transparent 40%, #db3540 40% 60%, transparent 60%),
    linear-gradient(transparent 40%, #db3540 40% 60%, transparent 60%),
    #f7f1df;
}

.game-mark--laliga {
  --mark-bg: #f5c641;
  --mark-color: #611a21;
  --league-pattern: linear-gradient(#b82931 0 25%, #f5c641 25% 75%, #b82931 75%);
  transform: rotate(2deg);
}

.game-mark--seriea {
  --mark-bg: #f7f1df;
  --mark-color: #123b79;
  --league-pattern: linear-gradient(90deg, #228a59 0 33%, #f7f1df 33% 67%, #d44646 67%);
}

.game-mark--bundesliga {
  --mark-bg: #d9383f;
  --mark-color: #fff8e8;
  --league-pattern: linear-gradient(#171717 0 28%, #d9383f 28% 68%, #e9b844 68%);
  text-shadow: 0 1px 0 #171717;
  transform: rotate(2deg);
}

.game-mark--ligue1 {
  --mark-bg: #f7f1df;
  --mark-color: #142956;
  --league-pattern: linear-gradient(90deg, #2b57a6 0 33%, #f7f1df 33% 67%, #db4149 67%);
}

.result-next-games {
  display: grid;
  grid-template-columns: minmax(150px, .75fr) repeat(2, minmax(210px, 1fr));
  gap: .55rem;
  margin: 1rem 0;
  padding: .65rem;
  color: #f4f0df;
  background: #092b20;
  border: 1px solid rgba(216, 255, 79, .5);
  border-radius: .75rem;
  box-shadow: 0 16px 40px rgba(9, 43, 32, .16);
}

.result-next-games-intro {
  display: grid;
  align-content: center;
  gap: .2rem;
  padding: .65rem .8rem;
}

.result-next-games-intro span,
.result-next-games small,
.result-next-leagues > span {
  font: 700 .56rem/1.3 "IBM Plex Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-next-games-intro span { color: #d8ff4f; }
.result-next-games-intro strong { font-size: .93rem; line-height: 1.2; }

.result-next-game {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  min-height: 64px;
  padding: .55rem .65rem;
  color: #f4f0df;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(244, 240, 223, .2);
  border-radius: .55rem;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.result-next-game:hover,
.result-next-game:focus-visible {
  color: #092b20;
  background: #d8ff4f;
  border-color: #d8ff4f;
  outline: none;
  transform: translateY(-2px);
}

.result-next-game > span:last-child { display: grid; gap: .15rem; min-width: 0; }
.result-next-game strong { font-size: .78rem; line-height: 1.2; }
.result-next-game small { color: inherit; opacity: .7; }

.result-next-leagues {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .4rem;
  align-items: stretch;
  padding-top: .1rem;
}

.result-next-leagues > span {
  display: grid;
  grid-column: 1 / -1;
  align-items: center;
  padding: .25rem .35rem 0;
  color: rgba(244, 240, 223, .72);
}

.result-league-link {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: .45rem;
  align-items: center;
  padding: .35rem .45rem;
  color: #f4f0df;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(244, 240, 223, .16);
  border-radius: .5rem;
  font: 700 .62rem/1.15 "IBM Plex Mono", monospace;
  text-decoration: none;
}

.result-league-link .game-mark { width: 2.25rem; }
.result-league-link:hover,
.result-league-link:focus-visible { color: #092b20; background: #f4f0df; outline: 2px solid #d8ff4f; }

@media (max-width: 760px) {
  .result-next-games { grid-template-columns: 1fr 1fr; }
  .result-next-games-intro { grid-column: 1 / -1; padding-block: .35rem; }
  .result-next-leagues { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: .25rem; }
  .result-next-leagues > span { min-width: 110px; }
  .result-league-link { min-width: 128px; scroll-snap-align: start; }
}

@media (max-width: 460px) {
  .result-next-games { grid-template-columns: 1fr; }
  .result-next-games-intro { grid-column: auto; }
}
