.game-reference {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 15px;
  background: #f2e8fb;
  color: #302047;
}
.game-reference img {
  flex: none;
  width: 96px;
  height: 58px;
  object-fit: contain;
}
.game-reference p {
  margin: 0;
  font-size: .95rem;
  font-weight: 750;
  line-height: 1.2;
}
.reference-formula {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  font-size: .9rem;
  font-weight: 750;
  white-space: nowrap;
}
.reference-swatch {
  width: 22px;
  aspect-ratio: 1;
  border: 1px solid #3020474d;
  border-radius: 50%;
  box-shadow: inset 0 2px 3px #ffffff61;
}

@media (max-width: 700px), (orientation: landscape) and (max-height: 530px) and (hover: none) {
  .game:has(> .game-reference:not([hidden])) {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .game-reference {
    gap: 8px;
    padding: 4px 8px;
    margin: 0;
  }
  .game-reference img { width: 70px; height: 44px; }
  .game-reference p { font-size: .86rem; }
  .reference-swatch { width: 19px; }
}

@media (orientation: landscape) and (max-height: 530px) and (hover: none) {
  .game:has(> .game-reference:not([hidden])) {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .game-reference { grid-column: 1; }
  .game-reference:not([hidden]) ~ .stage { grid-column: 1; grid-row: 2; }
  .game-reference:not([hidden]) ~ :is(.guess, .game-controls) { grid-column: 2; grid-row: 1 / 3; }
}
