/* Hub: a title and two equal game cards, each one link. */
.hub-title {
  margin: 0;
  padding: 28px 0 var(--space-4);
  font-size: var(--fs-28);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.games {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-decoration: none;
}
@media (hover: hover) {
  .game-card:hover {
    border-color: var(--line-2);
  }
}
.game-card:focus-visible {
  outline-offset: 4px;
}
.game-visual {
  aspect-ratio: 2 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #151925;
}
.game-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) 18px 18px;
}
.game-body h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-22);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.game-body p {
  margin: 0;
  font-size: var(--fs-16);
  color: var(--text-2);
}
.game-body .meta {
  margin-bottom: var(--space-3);
  font-size: var(--fs-14);
  color: var(--text-3);
}
/* Today's game in this browser, written by a hub script (hub-le-mot.ts): « Joué » and how it
   went, as the Advent card says its door and progress. */
.game-body .game-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-3);
}
.game-status[hidden] {
  display: none;
}
.game-status strong {
  font-size: var(--fs-18);
  font-weight: 700;
  color: var(--text);
}
.game-status span {
  font-size: var(--fs-15);
  font-weight: 600;
  color: var(--gold);
}
.game-status[data-played='true'] strong {
  color: var(--text-2);
}
/* The button sits at the foot of the card, so both cards align it. */
.game-body .btn {
  min-height: var(--target);
  min-width: 132px;
  margin-top: auto;
  align-self: flex-start;
}

/* The game's name in its tiles, LE above MOT; MOT shows the three marks: well placed,
   misplaced, absent. */
.mot-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mot-word {
  display: flex;
  gap: 8px;
}
.mot-tile {
  position: relative;
  isolation: isolate;
  width: 56px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #48536c;
  border-radius: var(--r);
  background: #232a3a;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.mot-tile.correct {
  border-color: #e7002a;
  background: #e7002a;
  color: #fff;
}
.mot-tile.present {
  color: #171717;
}
.mot-tile.present::before {
  content: '';
  position: absolute;
  inset: 7%;
  z-index: -1;
  border-radius: 50%;
  background: #ffbd00;
}
.mot-tile.absent {
  border-color: #343943;
  background: #343943;
  color: #fff;
}

/* Le Carré: its board of nine cells, the player's cards in cyan, the Maître's in gold, the
   borne in grey, two cells still empty. */
.carre-board {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 6px;
}
.carre-cell {
  aspect-ratio: 1;
  border: 1px solid #343943;
  border-radius: var(--r);
  background: #1b2030;
}
.carre-cell.mine {
  border-color: var(--cyan);
  background: #143130;
}
.carre-cell.theirs {
  border-color: var(--gold);
  background: #312816;
}
.carre-cell.borne {
  border-color: #6b7385;
  background: #343943;
}

@media (min-width: 720px) {
  .hub-title {
    padding: var(--space-14) 0 var(--space-8);
    font-size: var(--fs-36);
  }
  .games {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .game-visual {
    aspect-ratio: 16 / 9;
  }
  .game-body {
    gap: 6px;
    padding: var(--space-6) 28px 28px;
  }
  .game-body .meta {
    margin-bottom: 14px;
  }
  .game-body .btn {
    min-height: 48px;
  }
  .mot-visual,
  .mot-word {
    gap: 10px;
  }
  .mot-tile {
    width: clamp(56px, 6vw, 88px);
    font-size: clamp(28px, 3vw, 44px);
  }
  .carre-board {
    grid-template-columns: repeat(3, clamp(40px, 4.4vw, 60px));
    gap: 8px;
  }
}
